A smartphone based voting app using blockchain technology. Allows pre-registered users to login via OTP verification and vote registered candidates.
- OTP Verification
- Fingerprint authenticated Voting
- Realtime Voting Status
- Deployed Public Contracts
Required API Parameters - Refer Documentation
client.verify.v2.services
Parameter | Type | Description |
---|---|---|
accountSid |
string |
Account Service Id |
verifySid |
string |
Verify Service Id |
authToken |
string |
Your API Key |
Refer the above documentation for code snippets and example response
Used for spinning up your own Ethereum Node
Parameter | Type | Description |
---|---|---|
HTTP Provider |
URL |
API Endpoint |
Go to quicknode.com to set up your own sepolia endpoint or your prefered endpoint
MetaMask Private Key
Setup your MetaMask Wallet to get your Private Keys and add some test ethers in the Sepolia network or your prefered network
To run this project, you will need to add the following environment variables to your .env file in respective Folders
Folder: server
TWILIO_AUTH_TOKEN
TWILIO_ACC_ID
TWILIO_VERIFY_ID
QuickNode_URL
PRIVATE_KEY1
VOTING_CONTRACT
VOTER_CONTRACT
Folder: voter-contract & voting-contract
QUICKNODE_KEY
PRIVATE_KEY
All the above API tokens and private keys can be obtained by following the API reference guides
VOTING_CONTRACT
& VOTER_CONTRACT
can be put once you deploy your contract.
QUICKNODE_KEY
& QuickNode_URL
are one and the same
PRIVATE_KEY
obtained by setting up a metamask wallet
Clone the project
git clone https://github.com/sandeepB3/Decentralised-Voting-App.git
Open 5 terminals and go to the each of the project directories
cd server
cd voter-contract
cd voting-contract
cd voting-App
cd voting-portal
Install dependencies in all
npm install
Create .env file in voter-contract & voting-contract folder & fill the env variables as stated above
touch .env
Once you have setup the two enviorment variables deploy both the contract in both folders
npx hardhat run scripts/deploy.js --network sepolia
Inside the voting-portal folder change the value of contractAddress variable inside VotersPortal.js
& VotingPortal.js
to the new deployed contractAddressess
Similarly change the contents of Voters.json
& VotingPortal.json
inside the utils folder to the new contract ABI's present inside artifacts folder of voter-contract & voting-contract folder.
Start the Client
npm start
Create .env file in server folder & fill the env variables as stated above
touch .env
Once you have setup the two enviorment variables run the server
nodemon index.js
Start Client and scan the expo QR code using expo app
npm start
Client: React, react-router, Redux, React Native, Expo, Axios, Ethers.js
Server: Node.js, Express.js, Web3.js
Blockchain: Solidity, Hardhat, Sepolia
Tools: Metamask, QuickNode, Twilio
The below Screenshots shows the outputs of the step by step proccess flow
- Improving Transaction Speed with Solana Backend
- Scalability using cloud platforms (AWS)
- Implementing Advanced Security Measure
- Improved UI & UX