Skip to content

A decentralized voting system using blockchain for secure and transparent elections. πŸš€

Notifications You must be signed in to change notification settings

SkyRex06/Decentralized_Voting_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Voting System πŸ—³οΈ

A blockchain-based decentralized voting system built using React, Solidity, and Web3.js to ensure secure and transparent elections.


πŸ”— Features

βœ… Secure Voting: Uses blockchain to prevent tampering.
βœ… Decentralized: No central authority controls the votes.
βœ… Real-time Verification: Admin can verify registered voters.
βœ… Transparent Results: Anyone can verify the election outcome.
βœ… User-Friendly Interface: Simple UI for voters and admins.


πŸ’οΈ Project Structure

Voting_System/
│── public/                 # Static assets
│── src/                    # Main source code
β”‚   β”œβ”€β”€ components/         # Reusable UI components
β”‚   β”œβ”€β”€ contracts/          # Solidity smart contracts
β”‚   β”œβ”€β”€ pages/              # Main pages (Registration, Voting, Verification)
β”‚   β”œβ”€β”€ utils/              # Helper functions & Web3 setup
│── .gitignore
│── package.json
│── README.md
│── truffle-config.js       # Truffle configuration for deploying smart contracts

πŸ› οΈ Tech Stack

  • Frontend: React, CSS
  • Backend: Solidity (Ethereum Smart Contracts)
  • Blockchain Integration: Web3.js
  • Development Framework: Truffle

πŸš€ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/yourusername/Voting_System.git
cd Voting_System

2️⃣ Install Dependencies

npm install

3️⃣ Start Local Blockchain (Ganache)

  • Download & install Ganache.
  • Open Ganache and start a new workspace.

4️⃣ Compile & Deploy Smart Contracts

truffle compile
truffle migrate --network development

5️⃣ Start the React Application

npm start

πŸ“‰ Smart Contract Functions

Function Description
registerVoter(address, name, phone) Registers a new voter
getTotalVoter() Returns the total number of voters
verifyVoter(address) Admin verifies a voter
vote(candidateId) Voter casts their vote
getResults() Fetches election results

πŸ“Œ Future Improvements

πŸ”Ή Add biometric authentication for voter verification.
πŸ”Ή Improve UI/UX with animations and better accessibility.
πŸ”Ή Deploy on Ethereum Mainnet instead of local blockchain.


🐝 License

This project is open-source under the MIT License.

About

A decentralized voting system using blockchain for secure and transparent elections. πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published