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.
- Ganache
- Docker
- Node Js (18.12 verion or up)
- Google Chrome
- Metamask Extension
- A MongoDB Database connection
You can donwload Ganache from here
Follow the basic installation steps and open the Quickstart or New Workspace as per your need.
You can donwload Docker Desktop from here
Follow the basic installation steps.
You can download the NodeJS from here
Follow the basic installation steps.
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.
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.
-
Install Compreface for Face recongnization , whose installtion steps can be found here
-
After its done you need to open http://localhost:8000/login in there make account and login
-
Go to Test Tab Create two services Detection Service and Verfication service.
-
You will get The APIs for both service from that page. Now in the server folder of the project directory make
.envfolder 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]-
Now open Ganache and start a quickservice.
-
Now login into you MongoB account and create a user for the cluster and then click on the Connect
and click on drivers option and copy this URL
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- Now open terminal with directory as server and run the command below and wait for the
$ server is livemessage.
$ npm i
$ npm start- Now
cdto the project directory and run the below command, make sure Ganache is runinng.
$ npm i
$ truffle migrate
- Now
cdto client folder and run the following command.
$ npm i
$ npm start-
A website opens on(http://localhost:3000/login). Now in Metamask link the ganache 1st account using its private key and organise the election
-
Mkae sure to change the metamask account when logging in as a new user.