How modulus19/digital-voting-system-voxa- works
VOXA is a poll-and-voting application: users register and verify email, browse or create polls, cast votes, and review results; administrators manage polls and users. The frontend routes those experiences and calls the Express API, whose controllers delegate to domain services and MongoDB models. The README confirms a MongoDB-backed frontend/backend application, but does not detail capabilities; route and component coverage therefore follows the source index. Several domain pages and services are unsampled, so their internal links are omitted rather than inferred.
Main entry points: app.ts Express application · AppRoutes.jsx Page routing · otpService.ts OTP service · pollRoutes.ts Poll routes
Components 28
Web application
- Page routing
Frontend/src/routes/AppRoutes.jsx - Account pages
Frontend/src/pages/auth - Auth context
Frontend/src/context/AuthContext.jsx - Poll pages
Frontend/src/pages/user - Admin pages
Frontend/src/pages/admin - Auth API client
Frontend/src/services/authApi.js - API client
Frontend/src/services/api.js
API and access
- Express application
Backend/src/app.ts - Auth routes
Backend/src/Routes/authRoutes.ts - Poll routes
Backend/src/Routes/pollRoutes.ts - Vote routes
Backend/src/Routes/voteRoutes.ts - Result routes
Backend/src/Routes/resultRoutes.ts - JWT authentication
Backend/src/Middleware/auth.ts
Identity
- Auth controller
Backend/src/Controllers/authController.ts - Account service
Backend/src/Services/authService.ts - OTP service
Backend/src/Services/otpService.ts - Email delivery
Backend/src/Services/emailService.ts - User records
Backend/src/Models/user.model.ts - OTP records
Backend/src/Models/OTP.ts
Poll lifecycle
- Poll controller
Backend/src/Controllers/pollController.ts - Poll service
Backend/src/Services/pollService.ts - Poll records
Backend/src/Models/poll.model.ts
Voting and results
- Vote controller
Backend/src/Controllers/voteController.ts - Vote service
Backend/src/Services/voteService.ts - Result controller
Backend/src/Controllers/resultController.ts - Result service
Backend/src/Services/resultService.ts
Other components
- User
- Administrator
Connections 29
- User → Page routing: uses
- Administrator → Page routing: uses
- Page routing → Account pages: routes to
Frontend/src/routes/AppRoutes.jsx - Page routing → Poll pages: routes to
Frontend/src/routes/AppRoutes.jsx - Page routing → Admin pages: routes to
Frontend/src/routes/AppRoutes.jsx - Account pages → Auth API client: calls
Frontend/src/pages/auth/Register.jsx - Auth context → Auth API client: calls
Frontend/src/context/AuthContext.jsx - Auth API client → API client: uses
Frontend/src/services/authApi.js - API client → Express application: HTTP requests
- Express application → Auth routes: mounts
Backend/src/app.ts - Express application → Poll routes: mounts
Backend/src/app.ts - Express application → Vote routes: mounts
Backend/src/app.ts - Express application → Result routes: mounts
Backend/src/app.ts - Auth routes → Auth controller: dispatches
Backend/src/Routes/authRoutes.ts - Poll routes → JWT authentication: authenticates
Backend/src/Routes/pollRoutes.ts - Poll routes → Poll controller: dispatches
Backend/src/Routes/pollRoutes.ts - Vote routes → JWT authentication: authenticates
Backend/src/Routes/voteRoutes.ts - Result routes → JWT authentication: authenticates
Backend/src/Routes/resultRoutes.ts - Auth controller → Account service: calls
Backend/src/Controllers/authController.ts - Auth controller → OTP service: calls
Backend/src/Controllers/authController.ts - Account service → User records: reads and writes
Backend/src/Services/authService.ts - Account service → OTP service: requests verification
Backend/src/Services/authService.ts - OTP service → OTP records: reads and writes
Backend/src/Services/otpService.ts - OTP service → User records: reads and updates
Backend/src/Services/otpService.ts - OTP service → Email delivery: sends codes
Backend/src/Services/otpService.ts - Poll controller → Poll service: calls
Backend/src/Controllers/pollController.ts - Poll service → Poll records: reads and writes
Backend/src/Services/pollService.ts - Vote controller → Vote service: calls
Backend/src/Controllers/voteController.ts - Result controller → Result service: calls
Backend/src/Controllers/resultController.ts