Skip to content

mohdali0x01/voting-system

Repository files navigation

Blockchain Based Voting System

This project is a blockchain-based voting decentralized application (DApp) created using React and Solidity.

Project Description

“Blockchain Based Voting System” is a web-based online voting system built on the Ethereum blockchain. It leverages blockchain technology to provide a transparent, distributed, immutable, and trustless ledger, addressing issues in traditional voting systems such as security and trust.

Key Features

  • Decentralized & Transparent: No central authority controls the votes.
  • Trustless: The system's integrity is guaranteed by the blockchain, not a third party.
  • Immutable: Once cast, votes cannot be altered.

How it Works

The system is deployed by an Admin who adds eligible voters and candidates. The admin starts the election, allowing voters to cast their ballots for their preferred candidate. Once the election ends, results are immediately available and verifiable.

Installation and Setup

Prerequisites

  • Ganache: A personal blockchain for Ethereum development.
  • Node.js & Yarn: For running the client application.
  • Truffle: For compiling and migrating smart contracts.
  • MetaMask: A crypto wallet browser extension.

Step-by-Step Guide

1. Start Ganache

Open the Ganache GUI client to start your local blockchain instance.

2. Compile & Deploy Smart Contract

Open a terminal in the project root and run:

truffle migrate --reset

Note: You must migrate the election smart contract each time you restart Ganache.

3. Configure MetaMask

  • Unlock MetaMask in your browser.
  • Connect MetaMask to the local Ethereum blockchain provided by Ganache (usually http://127.0.0.1:7545).
  • Import an account provided by Ganache into MetaMask using its private key.

4. Run the Front End Application

Navigate to the client directory and start the application:

cd client
yarn install # Only the first time
yarn start

Visit http://localhost:3000 in your browser to interact with the application.

About

A decentralized, immutable voting application built with Ethereum (Solidity) and React.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors