How hashmith017/securevote works
SECUREVote is a web voting application whose main flow is password login, OTP verification, role-based access, and— for voters—casting one time-window-restricted vote. Administrators configure elections and candidates, monitor turnout and results, export CSV, reset election state, and inspect the hash-linked audit ledger. The backend keeps election and user data in memory; the blockchain module provides vote-block hashing and chain validation. Edges reflect calls shown in excerpts or capabilities explicitly documented in the README. Registration is shown calling an API endpoint, but the sampled backend excerpt does not establish that endpoint’s implementation.
Main entry points: server.js Auth API · client.js Voting Interface · admin.js Admin Panel · login.js Login Form
Components 14
Authentication
- Login Form
frontend/login.js - Registration Form
frontend/register.js - OTP Verification
frontend/otp.js - Auth API
backend/server.js
Voting
- Voting Interface
frontend/client.js - Election API
backend/server.js - Election State
backend/server.js
Administration
- Admin Panel
frontend/admin.js - Admin Operations
backend/server.js - User Directory
backend/server.js - Results Export
backend/server.js
Audit Ledger
- Vote Ledger
backend/blockchain.js
Other components
- Voter
- Administrator
Connections 18
- Voter → Login Form: starts login
README.md - Administrator → Login Form: starts login
README.md - Login Form → Auth API: submits credentials
frontend/login.js - Auth API → OTP Verification: requests verification
README.md - OTP Verification → Auth API: submits OTP
frontend/otp.js - Auth API → User Directory: checks credentials
backend/server.js - Registration Form → Auth API: requests registration
frontend/register.js - Voter → Voting Interface: casts ballot
README.md - Voting Interface → Election API: fetches election
frontend/client.js - Voting Interface → Election API: submits vote
frontend/client.js - Election API → Election State: reads and updates
backend/server.js - Election API → Vote Ledger: appends vote block
backend/server.js - Administrator → Admin Panel: manages election
README.md - Admin Panel → Admin Operations: requests management
frontend/admin.js - Admin Operations → Election State: configures and reports
backend/server.js - Admin Operations → User Directory: searches users
backend/server.js - Admin Panel → Results Export: downloads CSV
frontend/admin.js - Admin Operations → Vote Ledger: reads and validates chain
backend/server.js