Skip to content

htrahddis-hub/Blockchain-voting

Repository files navigation

E-Voting System using Blockchain

This is the website made using React, NodeJS, MongoDB and Ganache for a Blockchain based, easy to use, face recognization voting system.

For details on this project read the this report.

Installation


Requirements

  1. Ganache
  2. Docker
  3. Node Js (18.12 verion or up)
  4. Google Chrome
  5. Metamask Extension
  6. A MongoDB Database connection

Ganache


You can donwload Ganache from here

Follow the basic installation steps and open the Quickstart or New Workspace as per your need.

Docker


You can donwload Docker Desktop from here

Follow the basic installation steps.

NodeJS


You can download the NodeJS from here

Follow the basic installation steps.

Google Chrome and Metamask


Download it from chrome website and Metamask from here.

Install chrome , sign up and add the Metamask Extension and make an wallet account in metamask.

MongoDB


You need to create your own MongoDB databse instance , follow the "Using the MongoDB Atlas UI" in this guide and make your first databse and name it Blockchain.

Installation Step


  1. Install Compreface for Face recongnization , whose installtion steps can be found here

  2. After its done you need to open http://localhost:8000/login in there make account and login

  3. Go to Test Tab Create two services Detection Service and Verfication service.

  4. You will get The APIs for both service from that page. Now in the server folder of the project directory make .env folder and write the below code.

#paste the APIS you just created
APIDETECT=[Detecttion service API]
APIVERIFY=[Verification service API]
PRIVATEKEY=[add a random 16 deigit secret]
  1. Now open Ganache and start a quickservice.

  2. Now login into you MongoB account and create a user for the cluster and then click on the Connect Alt text and click on drivers option and copy this URL Alt text now in .env folder created in step 4 add this

CONNECTION_URL=mongodb+srv://admin-siddharth:<password>@cluster0.ziuav.mongodb.net/<your DB name here example Blockchain>?retryWrites=true&w=majority
  1. Now open terminal with directory as server and run the command below and wait for the $ server is live message.
$ npm i
$ npm start
  1. Now cd to the project directory and run the below command, make sure Ganache is runinng.
$ npm i
$ truffle migrate
  1. Now cd to client folder and run the following command.
$ npm i
$ npm start
  1. A website opens on(http://localhost:3000/login). Now in Metamask link the ganache 1st account using its private key and organise the election

  2. Mkae sure to change the metamask account when logging in as a new user.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors