A production-grade, security-first digital voting system designed with zero-trust principles, end-to-end encryption, and high availability in mind.
This system ensures:
- Voter privacy (no intermediate result leakage)
- Cryptographic integrity (RSA + Shamir Secret Sharing)
- Fair elections (results only after closure + delay)
- Transparent auditing (audit logs for all actions)
-
Backend (Render): https://securevoting.onrender.com/
-
Frontend (Firebase): https://evoting-76d.web.app/
-
Admin Panel: https://evoting-76d.web.app/admin.html
- Secure registration & login
- Vote casting with encrypted payloads
- Real-time participation percentage (no result leakage)
- One-vote-per-user enforcement
- Election creation & scheduling
- Candidate management
- Election lifecycle control (pending → active → ended)
- Secure result decryption using key shares
- Audit log visibility
- RSA-based vote encryption
- Shamir Secret Sharing (3 shares, 2 required)
- Private key destroyed after split
- Reconstructed only post-election
- JWT-based authentication (separate voter/admin secrets)
- Rate limiting + CORS protection
- No candidate-wise visibility during voting
- Only participation % visible
- Results automatically available 30 minutes after election ends
Frontend (Firebase Hosting)
↓
Backend API (Render - Node.js/Express)
↓
Database (Neon PostgreSQL)
- Frontend: HTML, CSS, JavaScript (Vanilla)
- Backend: Node.js, Express
- Database: PostgreSQL (Neon)
- Auth: JWT
- Security: bcrypt, RSA, Shamir Secret Sharing
- Deployment: Render + Firebase
- Process Manager (Dev): PM2
git clone <repo-url>
cd securevoting/backend
npm installCreate .env:
PORT=3000
DATABASE_URL=your_local_db_url
JWT_VOTER_SECRET=your_secret
JWT_ADMIN_SECRET=your_secret
ADMIN_USERNAME=admin
ADMIN_EMAIL=admin@test.com
ADMIN_PASSWORD=StrongPassword123!node scripts/migrate.jsnpm install -g pm2
pm2 start server.js --name securevote-dev
pm2 logspm2 restart securevote-dev
pm2 stop securevote-dev
pm2 delete securevote-dev- Root Directory:
backend - Build Command:
npm install - Start Command:
node server.js
NODE_ENV=production
PORT=10000
DATABASE_URL=your_neon_url
JWT_VOTER_SECRET=...
JWT_ADMIN_SECRET=...
ALLOWED_ORIGINS=https://evoting-76d.web.appcd backend/frontend
firebase deployAdmin is created using:
NODE_ENV=production node scripts/migrate.jsAfter creation, remove:
ADMIN_PASSWORD=...- Admin logs in
- Creates election
- Adds candidates
- Starts election
- Voters register & vote
- Admin ends election
- Key shares submitted
- Results decrypted after delay
Every critical action is logged:
- login attempts
- vote casting
- election changes
- result decryption
- Never expose
.envfiles - Use strong JWT secrets (64-byte hex)
- Enforce HTTPS (handled via Render/Firebase)
- Use secure cookies in future upgrades
- Secure cookie-based auth (HTTP-only)
- Dockerized microservices
- Real-time monitoring dashboard
- CI/CD pipeline
- AI-based fraud detection
- Multi-region deployment
SecureVote is a production-ready, security-focused voting platform that demonstrates:
- distributed system design
- applied cryptography
- full-stack engineering
- real-world deployment
Shashwat