A decentralized application (dApp) for secure and transparent voting, utilizing blockchain technology. Specifically made for Comelec
Voter dApp is built to provide a secure, transparent, and decentralized election system.
- COMELEC Management: A user with a specified address can Add candidates and Register voters
- Decentralized voting: Eliminates the possibility of one party Monopoly.
- Records: Records are stored in the chain, which is tamper-proof.
- Live Vote-Counting: End-users will be able to see the vote count after they vote.
- Sepolia: This application uses Sepolia Testnetwork.
Before setting up the project, ensure you have the following installed:
Clone the repository
git clone https://github.com/dejely/vAppNew.gitRename the file in src/node.js to src/index.js
To run this project using Docker, follow the steps below:
-
Navigate to the project root directory.
-
Build and start the services using Docker Compose:
cd srcnpm install
docker build -t [app-name] . docker-compose up --buildIf problems persist, recontainerize the directory.
-
Access the application at
http://localhost:5500.
- Connect to your MetaMask Wallet
- COMELEC Only:
- Register a Voter
- Add a Candidate
- Reset Voter vote weight
- Cast a Vote
- Select a candidate to vote via drop down
- Type your VoteID
- View Live Results
- Results are displayed below
- QR Scanning
- Uses PhilSys with a Mock Dataset registered in the chain
The core of the application is the eVoter.sol smart contract, located in the root directory. It handles:
- Voter Verification and Registration
- Candidate addition and management
- Voting and counting of Votes
- The application runs on Node.js version
22.13.1 or later. - The service exposes port
5500for external access. - The
NODE_ENVenvironment variable is set toproduction.
- If additional environment variables are required, create a
.envfile in the project root and uncomment theenv_fileline in thedocker-compose.ymlfile. - The application uses a non-root user for enhanced security.
For further details, refer to the Dockerfiles and Compose file included in the project.