How yogananda151/sevm_onlinevotingsystem works
Smart EVM is an educational online-voting simulation with commissioner, election-officer, and touchscreen voting interfaces. Its main workflow is election and polling-place setup, voter verification, ballot submission, vote-integrity/VVPAT recording, and result reporting. The active backend in the tree is FastAPI/SQLAlchemy; the README describes an older Express/Prisma stack, and the Node backup is therefore excluded. Backend excerpts show application/router wiring and vote-service behavior, but not router internals; some feature links rely on README descriptions.
Main entry points: App.tsx Role-based routing · api.service.ts API client · main.py FastAPI application · vote_service.py Vote processing
Components 26
Role-based interfaces
- Role-based routing
client/src/App.tsx - Sign-in
client/src/pages/auth/LoginPage.tsx - Officer portal
client/src/pages/officer/OfficerDashboard.tsx - Machine controls
client/src/pages/officer/MachineControlPage.tsx - Voting machine
client/src/pages/voting/VotingMachinePage.tsx - VVPAT display
client/src/pages/voting/VvpatPage.tsx - API client
client/src/services/api.service.ts - Auth client
client/src/services/auth.service.ts
Election administration
- Election setup
client/src/pages/admin/ElectionSetupPage.tsx - Voter registry
client/src/pages/admin/VotersPage.tsx - Station management
client/src/pages/admin/PollingStationsPage.tsx - Candidate management
client/src/pages/admin/CandidatesPage.tsx - Admin operations
client/src/pages/admin
API and domain services
- FastAPI application
server/app/main.py - Authentication service
server/app/services/auth_service.py - Election endpoints
server/app/routers/elections.py - Management endpoints
server/app/routers/management.py - Vote processing
server/app/services/vote_service.py - Bulk Excel import
server/app/services/bulk_excel_service.py - Reports
server/app/services/report_service.py
Voting records
- SQL database
server/app/database.py - Vote and election records
server/app/models/vote.py - Election domain records
server/app/models/election.py
Other components
- Commissioner
- Election officer
- Voter
Connections 36
- Commissioner → Role-based routing: opens portal
client/src/App.tsx - Election officer → Role-based routing: opens portal
README.md - Voter → Role-based routing: uses machine
client/src/App.tsx - Role-based routing → Sign-in: routes to
client/src/App.tsx - Role-based routing → Election setup: routes to
client/src/App.tsx - Role-based routing → Voter registry: routes to
client/src/App.tsx - Role-based routing → Station management: routes to
client/src/App.tsx - Role-based routing → Candidate management: routes to
client/src/App.tsx - Role-based routing → Admin operations: routes to
client/src/App.tsx - Role-based routing → Officer portal: routes to
README.md - Role-based routing → Machine controls: routes to
README.md - Role-based routing → Voting machine: routes to
client/src/App.tsx - Role-based routing → VVPAT display: routes to
client/src/App.tsx - Sign-in → Auth client: submits credentials
- Election setup → API client: requests management
- Voter registry → API client: requests voter data
- Station management → API client: requests management
- Candidate management → API client: requests management
- Officer portal → API client: requests operations
- Machine controls → API client: controls station
- Voting machine → API client: submits ballot
- VVPAT display → API client: requests receipt
- Auth client → FastAPI application: calls API
- API client → FastAPI application: calls API
- FastAPI application → Authentication service: mounts auth routes
server/app/main.py - FastAPI application → Election endpoints: mounts routes
server/app/main.py - FastAPI application → Management endpoints: mounts routes
server/app/main.py - FastAPI application → Vote processing: mounts voting routes
server/app/main.py - FastAPI application → Reports: mounts reports route
server/app/main.py - Vote processing → Vote and election records: creates vote and VVPAT
server/app/services/vote_service.py - Vote processing → Election domain records: checks election and station
server/app/services/vote_service.py - FastAPI application → SQL database: creates tables
server/app/main.py - Bulk Excel import → Election domain records: imports domain records
server/app/services/bulk_excel_service.py - Authentication service → SQL database: queries user records
- Vote processing → SQL database: reads and writes
- Reports → SQL database: reads report data