How chesterbaltazar/ssc_voting_system works
This repository implements a school student-council election platform: users register or sign in, candidates/partylists are subject to administrative approval, eligible voters cast one vote, and approved-party totals are broadcast to connected clients. The graph distinguishes those domain stages and the authentication, persistence, and live-update layers. README excerpts describe centralized data gathering and evaluation goals, but the available tree and sampled source do not establish a separate data-gathering workflow. Several README capabilities are documented but their routes were not sampled, so uncertain links are omitted.
Main entry points: App.jsx App navigation · server.js HTTP and WebSocket server · Auth.js Authentication routes · Votehandler.js Vote processing
Components 19
Web client
- App navigation
client/src/App.jsx - Home and login entry
client/src/Pages/Home.jsx - Login
client/src/Pages/Login.jsx - Registration
client/src/Pages/Register.jsx - Partylist view
client/src/Pages/Partylist.jsx - Vote screen
client/src/Pages/Vote.jsx - Party approval
client/src/AdminParties.jsx - Account approval
client/src/Pages/AdminAccountRequest.jsx
Identity and access
- Authentication routes
server/Auth.js - Google token verification
server/Utils/googleAuth.js - Token and role guard
server/Routes/Auth.js
Election operations
- HTTP and WebSocket server
server/server.js - Student registration
server/server.js - Admin operations
server/Routes/Admin.js - Vote processing
server/ws/Votehandler.js
Persistent state and live updates
- User accounts
server/models/user.js - Party records and tallies
server/models/Party.js
Other components
- Student
- Election admin
Connections 29
- Student → App navigation: uses
- Election admin → App navigation: uses
- App navigation → Home and login entry: renders
- App navigation → Login: opens
- App navigation → Registration: opens
- App navigation → Vote screen: renders
- App navigation → Partylist view: renders
- App navigation → Party approval: renders
- App navigation → Account approval: renders
- Login → Authentication routes: submits credentials
- Registration → Student registration: submits registration
- Registration → Authentication routes: Google registration
- Login → Google token verification: Google sign-in
- Authentication routes → Google token verification: verifies token
- Authentication routes → User accounts: reads and writes
- Student registration → User accounts: creates account
- Party approval → Admin operations: manages requests
- Account approval → Admin operations: manages requests
- Admin operations → User accounts: reviews accounts
- Admin operations → Party records and tallies: reviews partylists
- Partylist view → HTTP and WebSocket server: loads partylists
- Vote screen → HTTP and WebSocket server: sends vote
- HTTP and WebSocket server → Vote processing: dispatches messages
- HTTP and WebSocket server → Party records and tallies: loads approved parties
- Vote processing → User accounts: checks and marks voter
- Vote processing → Party records and tallies: validates and increments tally
- HTTP and WebSocket server → Authentication routes: mounts routes
- Token and role guard → HTTP and WebSocket server: protects routes
- Vote processing → HTTP and WebSocket server: broadcasts updates