How prajaakeeya/prajaakeeya-frontend works
Prajaakeeya is a React web frontend for voters, aspirants, guests, and election administrators. Users enter through the routed application, then browse election and constituency information, complete voter or aspirant workflows, participate in civic and communication features, or administer users and election structures; domain services connect these experiences to the backend. The README also documents multilingual and installable/offline capabilities. Some page-to-service wiring is inferred from module names and README features because those implementations were not sampled.
Main entry points: App.tsx Routes and access · apiClient.ts HTTP client · useAuthStore.ts Session state · AdminDashboardPage.tsx Admin operations
Components 33
Application shell
- Routes and access
src/App.tsx - Authentication layout
src/layouts/AuthLayout.tsx - Voter layout
src/layouts/UserLayout.tsx - Guest layout
src/layouts/GuestLayout.tsx - Admin layout
src/layouts/AdminLayout.tsx - Session state
src/store/useAuthStore.ts - Language resources
src/i18n/index.ts - Offline experience
src/components/OfflineBanner.tsx - Push service worker
public/firebase-messaging-sw.js
Voter and public
- Landing and login
src/pages/HomePage.tsx - Registration and profile
src/pages/UserRegisterPage.tsx - Voter dashboard
src/pages/UserDashboardPage.tsx - Candidates and results
src/pages/VotingResultPage.tsx - Civic issues
src/pages/CivicIssuesPage.tsx - Voter chat
src/pages/UserChatPage.tsx
Aspirant experience
- Aspirant registration
src/pages/AspirantRegistrationPage.tsx - Documents and SOP
src/pages/DocumentsUploadPage.tsx - Aspirant profile
src/pages/aspirant/AspirantProfilePage.tsx - Posts and meetings
src/pages/aspirant/AspirantPostsPage.tsx - Requests and chat
src/pages/aspirant/AspirantRequestsPage.tsx
Election administration
- Admin operations
src/pages/AdminDashboardPage.tsx - User management
src/pages/admin/AdminUsersListPage.tsx - Election geography
src/pages/admin/AdminAssemblyPage.tsx
Domain services
- Voting and voter data
src/services/voteService.ts - Civic issue service
src/services/civicIssuesService.ts - Aspirant service
src/services/aspirantService.ts - Aspirant chat service
src/services/aspirantChatService.ts - Administration services
src/services/adminService.ts - Authentication service
src/services/authService.ts - HTTP client
src/services/apiClient.ts
Other components
- Platform participants
- Prajaakeeya backend
- Firebase messaging
Connections 39
- Platform participants → Routes and access: navigate
- Routes and access → Authentication layout: routes auth
- Routes and access → Voter layout: routes users
- Routes and access → Guest layout: routes guests
- Routes and access → Admin layout: routes admins
- Routes and access → Landing and login: routes landing
- Routes and access → Session state: restores session
- Session state → Authentication service: loads profile
- Session state → Prajaakeeya backend: loads ward
- Platform participants → Registration and profile: register
- Registration and profile → Authentication service: register profile
- Authentication service → HTTP client: sends requests
- HTTP client → Prajaakeeya backend: calls API
- Platform participants → Voter dashboard: browse
- Voter dashboard → Candidates and results: browse candidates
- Platform participants → Civic issues: raise issues
- Platform participants → Voter chat: chat
- Voter chat → Aspirant chat service: loads conversations
- Platform participants → Aspirant registration: apply
- Aspirant registration → Documents and SOP: continue application
- Documents and SOP → Aspirant service: submits materials
- Platform participants → Aspirant profile: manage profile
- Platform participants → Posts and meetings: manage posts
- Platform participants → Requests and chat: handle requests
- Requests and chat → Aspirant chat service: uses chat
- Aspirant service → HTTP client: sends requests
- Aspirant chat service → HTTP client: sends requests
- Platform participants → Admin operations: administer
- Admin operations → User management: manage users
- Admin operations → Election geography: manage elections
- User management → Administration services: manages accounts
- Election geography → Administration services: manages structures
- Administration services → HTTP client: sends requests
- Voting and voter data → HTTP client: sends requests
- Civic issues → Civic issue service: loads and submits
- Civic issue service → HTTP client: sends requests
- Routes and access → Language resources: renders translations
- Routes and access → Offline experience: shows network status
- Push service worker → Firebase messaging: handles messaging