This project is a Blockchain-based Voting System application built using Python and Tkinter. It uses blockchain technology to ensure the integrity and transparency of the voting process by securely recording each vote in a tamper-proof ledger.
-
Blockchain Integration
- Each vote is added as a block to the blockchain, containing a timestamp, candidate choice, and hash of the previous block.
- Blockchain ensures that once recorded, a vote cannot be altered, providing transparency and immutability.
-
Voter Registration
- Unique voter IDs are hashed and stored to securely register voters and prevent duplicate votes.
- Voter information is securely loaded from a
voter_data.json
file.
-
Vote Casting
- Users enter their Voter ID and select a candidate from predefined options.
- The system verifies the voter's registration and voting status before allowing a vote to be cast.
-
Results Display
- After voting, results show the number of votes each candidate received.
- Results update in real-time as votes are cast.
-
Blockchain Viewing
- View the blockchain to display each block's details, such as index, timestamp, data (candidate choice), and hash.
- This transparency enhances trust in the voting process.
-
Educational Section
- A simple explanation of blockchain technology and its application in this system is provided.
-
Setup
- Ensure Python is installed along with required dependencies.
- Run the main script to start the application.
-
Cast Vote
- Enter a valid Voter ID and choose a candidate to cast a vote.
- Each voter can vote only once.
-
View Results and Blockchain
- Click on "Show Results" to view the voting outcomes.
- Click on "View Blockchain" to see the chain of blocks and verify each recorded vote.
This application serves as a prototype for secure, transparent voting systems. It highlights how blockchain technology can be leveraged to securely manage sensitive data and provide transparent voting records.
This application is a demonstration and should not be used in real elections without further security and scalability considerations.
git clone https://github.com/whitehatboy005/Blockchain-Based-Voting-System
cd Blockchain-Based-Voting-System
pip install -r requirements.txt
python registration.py
python voter.py
This project is licensed under the terms of the MIT license.