How subukavya/govscheme works
GovScheme AI helps citizens find welfare schemes, assess eligibility, prepare documents, and track applications; administrators manage schemes and oversee operations. The citizen journey is coordinated by the React app, with discovery and eligibility as key domain stages, and a Node/Express backend providing APIs and persistence. The README documents capabilities beyond the sampled code, so those are included without asserting unverified internal call paths. Some frontend and backend subsystems are represented at their exact tree paths; their detailed wiring was not sampled.
Main entry points: App.tsx Application shell · SchemeDiscovery.tsx Scheme discovery · server.js HTTP server · schemeRoutes.js Scheme routes
Components 30
Citizen experience
- Application shell
src/App.tsx - Scheme discovery
src/components/SchemeDiscovery.tsx - Eligibility wizard
src/components/EligibilityWizard.tsx - AI assistant
src/components/AIAssistant.tsx - Citizen profile
src/components/ProfileView.tsx - Document vault
src/components/DocumentVault.tsx - OCR scanner
src/components/OCRScanner.tsx - OCR service
src/services/ocrService.ts - Application tracker
src/components/ApplicationTracker.tsx - CSC kiosk
src/components/KioskMode.tsx - Localization
src/i18n.ts
Administration
- Admin platform
src/components/admin/AdminPlatform.tsx - Admin analytics
src/components/admin/AdminAnalytics.tsx - Scheme operations
src/components/admin/SchemeOperationsView.tsx
Backend services
- API client
src/api/apiClient.ts - HTTP server
server/server.js - Scheme routes
server/routes/schemeRoutes.js - Scheme controller
server/controllers/schemeController.js - Authentication
server/controllers/authController.js - Access control
server/middleware/authMiddleware.js - Application service
server/controllers/applicationController.js - Notifications
server/controllers/notificationController.js - User records
server/models/User.js - Scheme records
server/models/Scheme.js - Application records
server/models/Application.js
Eligibility and data
- Eligibility rules
src/engine/ruleEngine.ts - Recommendation scoring
src/engine/mlEngine.ts - Backend eligibility
server/services/eligibilityEngine.js - Scheme catalog
src/data/schemes.ts
Other components
- Citizen
Connections 28
- Citizen → Application shell: uses
README.md - Application shell → Scheme discovery: presents
src/App.tsx - Application shell → Eligibility wizard: presents
src/App.tsx - Application shell → AI assistant: offers
README.md - Application shell → Citizen profile: presents
src/App.tsx - Application shell → Document vault: offers
README.md - Application shell → OCR scanner: offers
README.md - OCR scanner → OCR service: uses
- Application shell → Application tracker: presents
README.md - Application shell → CSC kiosk: presents
src/App.tsx - Application shell → Localization: localizes
src/App.tsx - Scheme discovery → Eligibility rules: checks eligibility
README.md - Scheme discovery → Recommendation scoring: ranks matches
README.md - Scheme discovery → Scheme catalog: browses schemes
README.md - Admin platform → Scheme operations: manages schemes
README.md - Admin platform → Admin analytics: views metrics
README.md - Application shell → Admin platform: opens
src/App.tsx - API client → HTTP server: calls APIs
- HTTP server → Scheme routes: mounts
server/server.js - Scheme routes → Scheme controller: routes requests
server/routes/schemeRoutes.js - Scheme routes → Access control: protects routes
server/routes/schemeRoutes.js - Scheme controller → Backend eligibility: evaluates eligibility
server/controllers/schemeController.js - Scheme controller → Scheme records: queries schemes
server/controllers/schemeController.js - Authentication → User records: authenticates users
server/controllers/authController.js - Access control → User records: loads user
server/middleware/authMiddleware.js - Application service → Application records: records applications
server/controllers/applicationController.js - Notifications → User records: looks up users
server/controllers/notificationController.js - HTTP server → Scheme catalog: seeds catalog
server/server.js