Skip to content

Blockchain based Decentralised Voting System For DBMS Lab project

Notifications You must be signed in to change notification settings

PrathicaShettyM/VotersChain2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—³οΈ VotersChain

Secure β€’ Decentralized β€’ Transparent

A next-generation voting system powered by blockchain technology


Made with Blockchain License: MIT Built with Hardhat

Demo

Demo of the project

✨ Overview

VotersChain revolutionizes traditional voting systems by combining blockchain security with user-friendly interfaces. Our platform ensures transparent, tamper-proof elections while maintaining voter privacy and system integrity.


🎯 Core Features

πŸ” Security & Authentication

  • Role-based JWT authentication
  • Protection against common attacks:
    • NoSQL injection
    • CORS vulnerabilities
    • XSS attacks
  • Military-grade input validation
  • Secure session management

πŸ‘€ Admin Controls

  • Comprehensive voter management
  • Election creation & oversight
  • Secure credential distribution
  • Ethereum wallet provisioning
  • Real-time monitoring dashboard

πŸ—½ Voter Experience

  • Intuitive election interface
  • MetaMask wallet integration
  • One-vote guarantee
  • Real-time results
  • Complete privacy protection

⛓️ Blockchain Power

  • Smart contract automation
  • Immutable vote records
  • Transaction verification
  • Transparent audit trail
  • Decentralized security

πŸ› οΈ Technology Stack

Frontend

React TailwindCSS Vite

Backend

Node.js Express.js MongoDB

Blockchain

Solidity Ethereum Web3.js


πŸš€ Installation & Setup

Prerequisites

βœ… Node.js
βœ… MongoDB
βœ… MetaMask
βœ… Git

πŸ”— Blockchain Setup

# Terminal 1: Fire up the local blockchain
cd client
npx hardhat node

# Terminal 2: Deploy your contracts
cd client
npx hardhat compile
npx hardhat run scripts/deploy.js --network localhost

Create .env in client directory:

VITE_CONTRACT_ADDRESS=<your_deployed_contract_address>

πŸ–₯️ Backend Configuration

# Terminal 3: Set up your server
cd server
npm install

Create .env in server directory:

PORT=<port_number>
MONGO_URI=<mongodb_connection_string>
JWT_SECRET=<your_jwt_secret>
ADMIN_EMAIL=<admin_email>
ADMIN_PASSWORD=<admin_password>
EMAIL_ID=<your_gmail_address>
EMAIL_PASS=<google_app_password>

Launch the server:

nodemon server.js

🎨 Frontend Launch

# Terminal 4: Fire up the frontend
cd client
npm install
npm run dev

🦊 MetaMask Configuration

  1. πŸ“₯ Install MetaMask extension
  2. πŸ”“ Launch MetaMask
  3. ⚑ Select "Import Account"
  4. πŸ”‘ Enter your private key
  5. 🌐 Connect to local network

πŸ“Š System Architecture

Our system is built on a robust database schema with the following core components:

πŸ”· User Management

  • Device tracking
  • Voter profiles
  • Authentication records
  • Access controls

πŸ”· Election System

  • Campaign details
  • Candidate profiles
  • Voting records
  • Result tabulation

πŸ”· Security Layer

  • Audit trails
  • Transaction logs
  • Device fingerprints
  • Security metrics

πŸ›‘οΈ Security Features

πŸ”’ Authentication

  • JWT session management
  • Role-based access
  • Secure credential handling

πŸ” Protection

  • NoSQL injection guards
  • CORS security
  • XSS prevention
  • Input sanitization

⛓️ Blockchain

  • Smart contract verification
  • Transaction validation
  • Immutable records

πŸ“± Device Security

  • Fingerprinting
  • Browser monitoring
  • OS tracking

🀝 Contributing

graph LR
    A[Fork] -->B[Feature Branch]
    B --> C[Commit Changes]
    C --> D[Push]
    D --> E[Pull Request]
Loading
  1. 🍴 Fork the repository
  2. 🌿 Create feature branch (git checkout -b feature/amazing-feature)
  3. πŸ’Ύ Commit changes (git commit -m 'Add amazing feature')
  4. ‴️ Push to branch (git push origin feature/amazing-feature)
  5. 🎯 Open Pull Request

Made with ❀️ by ChainSecure Solutions

About

Blockchain based Decentralised Voting System For DBMS Lab project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •