Skip to content

aiichaa/votingSystem

Repository files navigation

Blockchain-based voting system

This Application is the implementation of our paper, this is a proof-of-concept application and therefore cannot be used in a real life election.

Dependencies

This project used a collection of technologies and tools, to run the application, you need to install the following dependencies:

  1. Node Package Manager that comes with Node.js
  2. Truffle Framework : it will allow us to build decentralized applications on the Ethereum blockchain, it comes with a suite of tools that allow writing smart contracts with Solidity programming language, test smart contracts and deploy them to the blockchain, develop client-side application.
  3. Ganache : a local in-memoryblockchain. it come with 10 external accounts with addresses on the local Ethereum blockchain, each account with 100 fake ether.
  4. Metamask : a chrome extension, allow us to connect to the blockchain with local accounts.

Project structure

  • contracts directory: contains smart contracts, plus a Migration contract that handles migrations
  • migrations directory: contains migration files. migrations are similar to other web development frameworks that require migrations to change the state of a database. whenever a smart contract is deployed, we update the blockchain's state and therefore need a migration.
  • node_modules directory: all the node dependecies.
  • test directory: tests for smart contracts
  • truffle.js file: main configuration file for the truffle project.

Run Project

  • Clone the project
git clone https://github.com/aiichaa/votingSystem.git
  • Install dependencies
$ cd votingSystem
$ npm install
  • Run Ganache GUI client in your machine, it will start with 10 accounts each with 100 ETH. You can start ganache via ganache application UI or via command:
$ ganache-cli
  • Compile and Deploy Smart Contracts by running :
$ truffle migrate --reset

This will generate the build/contracts json files

  • Run the Front End application with lite-server with command:
$ npm run dev

This will open a new tab in your browser with url : http://localhost:3000

  • Configure Metamask will allow you to switch ganache accounts and validate transactions.

About

blockchain based voting system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published