How krazzyjoshh/anhsvotingsystem works
ANHS Vote is a school-election system combining an admin portal, student and candidate management, token or verified-email voter access, ballot submission, receipts, public results, and Solana Devnet integration. The workflow runs from election setup and voter preparation through publication, voting, and result review. The graph separates the active web client, API workflows, shared server state, and chain integration. Source excerpts show key route and storage relationships; unsampled capabilities are included where documented, but their internal calls are not inferred.
Main entry points: index.js HTTP API server · database.js SQLite database · voter.js Voter access and ballots · chain.js Solana client
Components 21
Active web client
- Admin portal
web/src/App.jsx - Admin UI utilities
web/src/admin.jsx - Web API client
web/src/api.js - Voter ballot flow
web/src/pages/Vote.jsx
Election API
- Admin operations
server/src/routes/admin.js - Voter access and ballots
server/src/routes/voter.js - Election publishing
server/src/routes/blockchain.js - Public election views
server/src/routes/public.js - Election ledger
server/src/routes/ledger.js - HTTP API server
server/src/index.js
Server state
- Admin authentication
server/src/auth.js - Voter sessions
server/src/voter-sessions.js - Election state logic
server/src/election.js - Election data models
server/src/models.js - Election settings
server/src/settings.js - SQLite database
server/src/database.js
Blockchain
- Solana client
server/src/chain.js - Voting program
chain/programs/voting-system/src/lib.rs
Other components
- Student voter
- Election administrator
- Solana Devnet
Connections 29
- Election administrator → Admin portal: uses portal
README.md - Student voter → Voter ballot flow: casts ballot
README.md - Admin portal → Web API client: requests data
web/src/api.js - Voter ballot flow → Web API client: submits votes
web/src/pages/Vote.jsx - Admin portal → Admin UI utilities: uses utilities
web/src/App.jsx - Web API client → HTTP API server: calls HTTP API
- HTTP API server → Admin operations: mounts routes
server/src/index.js - HTTP API server → Election publishing: mounts routes
server/src/index.js - HTTP API server → Election ledger: mounts routes
server/src/index.js - HTTP API server → Voter access and ballots: mounts routes
server/src/index.js - HTTP API server → Public election views: mounts routes
server/src/index.js - HTTP API server → Admin authentication: checks admins
server/src/index.js - Admin operations → Election data models: uses models
server/src/routes/admin.js - Admin operations → Election settings: checks election state
server/src/routes/admin.js - Admin operations → SQLite database: reads and writes
server/src/routes/admin.js - Voter access and ballots → Voter sessions: manages sessions
server/src/routes/voter.js - Voter access and ballots → Election state logic: checks election
server/src/routes/voter.js - Voter access and ballots → Solana client: submits vote
server/src/routes/voter.js - Voter access and ballots → SQLite database: reads and writes
server/src/routes/voter.js - Election publishing → Election state logic: gets snapshot
server/src/routes/blockchain.js - Election publishing → Solana client: publishes election
server/src/routes/blockchain.js - Election publishing → SQLite database: stores election state
server/src/routes/blockchain.js - Election state logic → Election settings: reads settings
server/src/election.js - Election state logic → Solana client: reads chain
server/src/election.js - Election data models → SQLite database: uses database
server/src/models.js - Election settings → SQLite database: reads and writes
server/src/settings.js - Voter sessions → SQLite database: stores sessions
server/src/voter-sessions.js - Solana client → Solana Devnet: uses Devnet
README.md - Solana client → Voting program: calls program