This project is a decentralized application (DApp) for an election voting system built on the Ethereum blockchain. The system allows users to vote in a secure and transparent manner, ensuring that votes are immutable and publicly verifiable.
- Secure Voting: Ensures that each voter can vote only once.
- Transparency: All votes are publicly verifiable on the Ethereum blockchain.
- Decentralization: No single point of failure; voting is handled by smart contracts.
- Immutability: Votes cannot be changed once cast.
Before you begin, ensure you have met the following requirements:
- Node.js and npm installed
- Truffle framework installed globally (
npm install -g truffle) - Ganache installed for local Ethereum blockchain (
npm install -g ganache-cli) - MetaMask extension installed in your browser
-
Clone the repository:
git clone https://github.com/retr0-kernel/Voting-System.git cd Voting-System -
Install dependencies:
npm install
-
Compile the smart contracts:
truffle compile
-
Migrate the smart contracts to the local blockchain:
truffle migrate
-
Run the development server:
npm start
-
Start Ganache to run a local Ethereum blockchain:
ganache-cli
-
Open your browser and connect MetaMask to the local blockchain (usually
http://127.0.0.1:8545). -
Import one of the Ganache accounts into MetaMask.
-
Open the application in your browser (usually
http://localhost:3000). -
Use the application to register candidates and cast votes.