{"id":26713397,"url":"https://github.com/haritej2003/decentralized-voting-system","last_synced_at":"2026-04-12T06:34:27.413Z","repository":{"id":284727207,"uuid":"955866201","full_name":"Haritej2003/Decentralized-Voting-System","owner":"Haritej2003","description":"A decentralized voting system developed using blockchain","archived":false,"fork":false,"pushed_at":"2025-03-27T10:27:19.000Z","size":1774,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T11:31:13.851Z","etag":null,"topics":["css","expressjs","ganache","metamask","postgresql","prisma-orm","reactjs","solidity","truffle","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Haritej2003.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":"2025-03-27T10:20:25.000Z","updated_at":"2025-03-27T10:33:15.000Z","dependencies_parsed_at":"2025-03-27T11:41:39.105Z","dependency_job_id":null,"html_url":"https://github.com/Haritej2003/Decentralized-Voting-System","commit_stats":null,"previous_names":["haritej2003/decentralized-voting-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haritej2003%2FDecentralized-Voting-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haritej2003%2FDecentralized-Voting-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haritej2003%2FDecentralized-Voting-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haritej2003%2FDecentralized-Voting-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haritej2003","download_url":"https://codeload.github.com/Haritej2003/Decentralized-Voting-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245841757,"owners_count":20681196,"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":["css","expressjs","ganache","metamask","postgresql","prisma-orm","reactjs","solidity","truffle","typescript"],"created_at":"2025-03-27T12:19:58.847Z","updated_at":"2025-10-06T18:46:35.773Z","avatar_url":"https://github.com/Haritej2003.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Decentralized Voting System\n\nA secure and transparent blockchain-based voting system that ensures election integrity through decentralized technology.\n\n## 📋 Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Technology Stack](#technology-stack)\n- [Screenshots](#screenshots)\n- [Installation](#installation)\n- [Environment Variables](#environment-variables)\n- [Usage](#usage)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n- [License](#license)\n\n\n## 🔍 Overview\n\nThis decentralized voting system leverages blockchain technology to create a secure, transparent, and tamper-proof electronic voting platform. By utilizing Ethereum smart contracts, the application ensures that votes are immutable once cast and provides real-time election results while maintaining voter privacy.\n\n## ✨ Features\n\n### User Roles\n\n- **Admin Dashboard**\n\n- Manage candidates (add/delete)\n- Conduct and end elections\n- View election statistics\n- Monitor real-time election results\n- Track voting percentage turnout\n\n\n\n- **Voter Dashboard**\n\n- View personal voter details\n- Access current election information\n- Check upcoming election schedules\n- Cast votes securely\n- View real-time election results (updated every minute)\n\n\n\n\n\n### Security Features\n\n- Blockchain-based vote storage\n- JWT authentication\n- Secure user registration and login\n- Smart contract validation\n\n\n### Home Page\n\n- System instructions\n- Developer information\n- Project overview\n\n\n## 🛠️ Technology Stack\n\n### Frontend\n\n- React.js\n- TypeScript\n- Metamask integration\n\n\n### Backend\n\n- Node.js\n- Express.js\n- TypeScript\n- JWT authentication\n\n\n### Database\n\n- PostgreSQL\n- Prisma ORM\n\n- Voter table\n- Candidate table\n- Election table\n\n\n\n\n\n### Blockchain\n\n- Ethereum\n- Solidity (smart contracts)\n- Ganache (local blockchain)\n- Truffle (development framework)\n\n\n## 📸 Screenshots\n\n### 🏠 Home Page\n![Home Page](screenshots/homePage.png)\n\n### 🔑 Login Page\n![Login Page](screenshots/Login.png)\n\n### 🗳️ Voter Dashboard\n![Voter Dashboard](screenshots/VoterDashboard.png)\n\n### 🗳️ Confirmation\n![Vote Confirmation](screenshots/Confirmation.png)\n\n### 📊 Result\n![Real Time Result](screenshots/Result.png)\n\n### 🗳️ Election Statistics\n![Election Statistics](screenshots/Stats.png)\n\n\n\n## 🚀 Installation\n\nFollow these steps to set up the project locally:\n\n### Prerequisites\n\n- Node.js (v14 or higher)\n- npm or yarn\n- PostgreSQL database\n- Ganache\n- Metamask browser extension\n\n\n### Setup Steps\n\n1. **Clone the repository**\n\n```shellscript\ngit clone https://github.com/Haritej2003/Decentralized-Voting-System.git\ncd decentralized-voting-system\n```\n\n\n2. **Install dependencies for both frontend and backend**\n\n```shellscript\n# Install backend dependencies\ncd backend\nnpm install\n\n# Install frontend dependencies\ncd ../frontend\nnpm install\n```\n\n\n3. **Set up the database**\n\n```shellscript\n# In the backend directory\nnpx prisma migrate dev --name init\nnpx prisma generate\n```\n\n\n4. **Set up Ganache and Truffle**\n\n```shellscript\n# Install Truffle globally if not already installed\nnpm install -g truffle\n\n# Start Ganache (GUI or CLI)\nganache-cli\n\n# In a new terminal, deploy smart contracts\ncd backend\ntruffle migrate --reset\n```\n\n\n5. **Configure Metamask**\n\n1. Connect Metamask to your Ganache network \n2. Import at least one Ganache account into Metamask using the private key\n\n\n\n\n\n## 🔐 Environment Variables\n\nCreate a `.env` file in the `backend` directory with the following variables:\n\n```plaintext\n# Database\nDATABASE_URL=\"postgresql://username:password@localhost:5432/name\"\n\n# Authentication\nJWTPassword=\"your-jwt-secret\"\nSaltRounds=10\n\n# Blockchain\nRPC_URL=\"your-RPC-url\"\nADMIN_PRIVATE_KEY=\"your-metamask-private-key\"\ncontractAddress=\"your-deployed-contract-address\"\n```\n\n## 📝 Usage\n\n1. **Start the Blockchain Network**\n```shellscript\ntruffle compile\ntruffle migrate\ncopy the contractAdress and store in .env\n```\n\n2. **Start the backend server**\n\n```shellscript\ncd backend\nnpx tsc -b\nnode dist/index.js\n```\n\n\n3. **Start the frontend application**\n\n```shellscript\ncd frontend\nnpm run dev\n```\n\n\n### Admin Access\n\n- Login with admin credentials\n- Navigate to the admin dashboard to manage elections and candidates\n\n\n### Voter Access\n\n- Register as a new voter or login with existing credentials\n- View election information and cast your vote during active elections\n\n\n## 👥 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n---\n\n*Made with ❤️*\n\n## 👨‍💻 Contributors\n\n🚀 Juvvagani Hari Tej - Developer \u0026 Maintainer","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharitej2003%2Fdecentralized-voting-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharitej2003%2Fdecentralized-voting-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharitej2003%2Fdecentralized-voting-system/lists"}