{"id":21184552,"url":"https://github.com/theoddysey/voting-dapp-solidity","last_synced_at":"2026-05-04T16:38:06.288Z","repository":{"id":262872427,"uuid":"879294748","full_name":"TheODDYSEY/Voting-DApp-Solidity","owner":"TheODDYSEY","description":"Decentralized Voting ✅ DApp  🕍","archived":false,"fork":false,"pushed_at":"2024-11-16T19:47:07.000Z","size":935,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T14:47:35.811Z","etag":null,"topics":["contract","dapp","decentralized-applications","ethereum","ganache-network","solidity"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheODDYSEY.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-27T14:33:26.000Z","updated_at":"2024-11-16T19:47:10.000Z","dependencies_parsed_at":"2024-11-14T19:24:47.058Z","dependency_job_id":"436d1300-5f6f-49b0-89cb-1828b2bdcf73","html_url":"https://github.com/TheODDYSEY/Voting-DApp-Solidity","commit_stats":null,"previous_names":["theoddysey/voting-dapp-solidity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FVoting-DApp-Solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FVoting-DApp-Solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FVoting-DApp-Solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FVoting-DApp-Solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheODDYSEY","download_url":"https://codeload.github.com/TheODDYSEY/Voting-DApp-Solidity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243654400,"owners_count":20325893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contract","dapp","decentralized-applications","ethereum","ganache-network","solidity"],"created_at":"2024-11-20T18:09:18.853Z","updated_at":"2026-05-04T16:38:06.246Z","avatar_url":"https://github.com/TheODDYSEY.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artemis: A Decentralized Voting DApp\n\n![Login Screen](./homepage.png)\n**Artemis** is a decentralized application (DApp) that leverages Ethereum blockchain technology to provide a secure and transparent voting system. Built with Solidity, Hardhat, and a React frontend, Artemis allows users to vote for candidates in a decentralized manner using their MetaMask wallets.\n\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Technologies Used](#technologies-used)\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n  - [Compile Smart Contracts](#compile-smart-contracts)\n  - [Deploy Smart Contracts](#deploy-smart-contracts)\n  - [Run Tests](#run-tests)\n  - [Launch React Frontend](#launch-react-frontend)\n- [Application Overview](#application-overview)\n  - [Voting Contract](#voting-contract)\n  - [Frontend Components](#frontend-components)\n  - [Screenshots](#screenshots)\n- [Commands Summary](#commands-summary)\n- [Future Enhancements](#future-enhancements)\n\n## Introduction\n\nArtemis provides a secure, transparent voting platform where each vote is recorded on the blockchain, ensuring integrity and immutability. The application is built to simulate real-world voting systems in a Web3 environment, using Solidity for the backend logic and a React frontend for an engaging user experience.\n\n## Technologies Used\n- **Solidity**: For implementing the voting logic as a smart contract on Ethereum.\n- **Hardhat**: Ethereum development environment to compile, test, and deploy the contract.\n- **Ganache**: Local blockchain for testing and development.\n- **React**: Frontend framework for building the Web3 interface.\n- **Ethers.js**: Ethereum JavaScript library for interacting with the blockchain.\n- **Tailwind CSS**: Styling library for a responsive, modern UI.\n\n## Features\n\n- **Blockchain-Backed Voting**: Ensures secure and immutable records of votes.\n- **MetaMask Wallet Authentication**: Users connect their MetaMask wallet to verify identity and cast votes.\n- **Real-Time Voting Status**: Displays active voting session status and remaining time.\n- **Vote Once Mechanism**: Each voter can cast only one vote per session, enforcing fairness.\n\n## Prerequisites\n\n- **Node.js** (v14 or later)\n- **Hardhat** for contract development\n- **Ganache** for local blockchain testing\n- **MetaMask** for connecting to the Ethereum network via browser\n\n## Installation\n\nClone the repository and install dependencies:\n\n```bash\ngit clone https://github.com/TheODDYSEY/Voting-DApp-Solidity\ncd Voting-DApp-Solidity\nnpm install\n```\n\n## Configuration\n\n1. **Environment Variables**: Create a `.env` file in the project root directory with the following:\n   ```plaintext\n   API_URL=http://127.0.0.1:7545\n   PRIVATE_KEY=your_ganache_private_key\n   ```\n   \n2. **Ganache Setup**: Start Ganache on `http://127.0.0.1:7545` and use one of its account private keys in the `.env` file.\n\n## Usage\n\n### Compile Smart Contracts\nGenerate the necessary ABI and bytecode by compiling the contracts:\n```bash\nnpx hardhat compile\n```\n\n### Deploy Smart Contracts\nDeploy the `Voting` contract to the local Ganache blockchain:\n```bash\nnpx hardhat run scripts/deploy.js --network ganache\n```\n\n### Run Tests\nTo validate the functionality and accuracy of the smart contract:\n```bash\nnpx hardhat test --network ganache\n```\n\n### Launch React Frontend\nStart the React frontend to interact with the deployed contract:\n```bash\nnpm start\n```\n\n## Application Overview\n\n### Voting Contract\n\nThe Solidity-based voting contract defines core functionalities, including:\n- **Candidate Management**: Initializes candidates and allows voting on them.\n- **Vote Tracking**: Keeps track of individual votes and prevents multiple voting attempts per session.\n- **Session Timing**: Limits voting to a specified duration, after which voting is closed and results can be viewed.\n\n### Frontend Components\n\nThe React frontend facilitates user interactions and displays voting details. Key components include:\n\n- **Login Component**: Enables users to connect their MetaMask wallet to access the application.\n- **Connected Component**: Displays the main voting interface with candidate options, remaining time, and vote submission.\n- **Finished Component**: Displays a message indicating the end of the voting session, thanking users for their participation.\n\nEach component is styled with Tailwind CSS, providing a clean, responsive interface. The app uses React’s state and props to update in real-time as users connect their wallets, cast votes, and monitor session status.\n\n\n### Screenshots\n\n- **Login Screen**  \n  Allows users to connect their MetaMask wallet to access the DApp.  \n  ![Login Screen](./homepage.png)\n\n- **Voting Interface (Connected)**  \n  Shows the candidate list, remaining time, and vote submission options.  \n  ![Voting Interface](./votingpage.png)\n\n- **Voting Finished Screen**  \n  Displays a thank-you message when the voting session concludes.  \n  ![Finished Screen](./finished.png)\n\n\n## Commands Summary\n\n| Command                                | Description                                    |\n|----------------------------------------|------------------------------------------------|\n| `npm install`                          | Install project dependencies                   |\n| `npx hardhat compile`                  | Compile the smart contracts                    |\n| `npx hardhat run scripts/deploy.js --network ganache` | Deploy contracts on Ganache        |\n| `npx hardhat test --network ganache`   | Run contract tests on Ganache                  |\n| `npm start`                            | Start the React frontend                       |\n\n## Future Enhancements\n\n- **Analytics and Visualization**: Add visual components for displaying vote counts and participation statistics.\n- **Blockchain Explorer Integration**: Link votes and results to a blockchain explorer for greater transparency.\n- **Enhanced Session Management**: Implement automated session management to close or restart voting sessions based on smart contract logic.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoddysey%2Fvoting-dapp-solidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheoddysey%2Fvoting-dapp-solidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoddysey%2Fvoting-dapp-solidity/lists"}