How praveen0815/ai-based-government-scheme-eligibility-predictor works
Scheme Predictor is a citizen and administrator portal for maintaining a socio-economic wallet, exploring schemes, and preparing for applications. The main path is profile data into the hybrid documented-rule/Decision Tree evaluation, then explanations and recommendations; citizens can compare results and track readiness, documents, history, and application progress. FastAPI routes and services implement these capabilities over authenticated records, while a React client calls the API. README describes additional scanner, knowledge, assistant, reporting, and evaluation features; their exact call paths are not established by the excerpts, so those links are omitted.
Main entry points: main.py FastAPI app · App.tsx Portal routes · application_service.py Application tracking · notification_service.py Notifications
Components 30
Citizen portal
- Portal routes
frontend/src/App.tsx - API client
frontend/src/services/api.ts - Profile wallet
frontend/src/pages/AccountPage.tsx - Eligibility results
frontend/src/pages/ResultsPage.tsx - Scheme discovery
frontend/src/pages/SchemesPage.tsx - Admin portal
frontend/src/pages/AdminDashboardPage.tsx
Backend API
- FastAPI app
backend/app/main.py - Authentication
backend/app/services/auth_service.py - Evaluation routes
backend/app/routes/evaluation.py - Wallet services
backend/app/services/wallet_service.py
Eligibility and discovery
- Rule evaluation
backend/app/services/rule_engine_service.py - Documented conditions
ml/src/eligibility_rules.py - Scheme catalog
backend/app/services/scheme_service.py - Hybrid prediction
backend/app/services/hybrid_prediction_service.py - Recommendations
backend/app/services/recommendation_service.py - Result explanations
backend/app/services/explanation_service.py - Scheme comparison
backend/app/services/compare_service.py
Preparation tracking
- Document scanner
backend/app/services/document_scanner_service.py - Scheme knowledge
backend/app/services/scheme_knowledge_service.py - Scheme assistant
backend/app/services/scheme_assistant_service.py - Recommendation history
backend/app/services/history_service.py - Document checklist
backend/app/services/document_checklist_service.py - Application tracking
backend/app/services/application_service.py - Notifications
backend/app/services/notification_service.py - PDF reports
backend/app/services/report_service.py - Profile readiness
backend/app/services/readiness_service.py
Persistence
- Database sessions
backend/app/db/session.py - User data models
backend/app/models/applications.py - Application database
Other components
- Citizen
Connections 34
- Citizen → Portal routes: uses
frontend/src/App.tsx - Portal routes → Profile wallet: routes to
frontend/src/App.tsx - Portal routes → Eligibility results: routes to
frontend/src/App.tsx - Portal routes → Scheme discovery: routes to
frontend/src/App.tsx - Portal routes → Admin portal: routes to
frontend/src/App.tsx - Profile wallet → API client: requests
- Eligibility results → API client: requests
- Scheme discovery → API client: requests
- API client → FastAPI app: calls API
- FastAPI app → Evaluation routes: registers
backend/app/main.py - FastAPI app → Authentication: imports
backend/app/main.py - Evaluation routes → Hybrid prediction: evaluates
- Evaluation routes → Wallet services: reads profile
- Rule evaluation → Scheme catalog: loads schemes
backend/app/services/rule_engine_service.py - Rule evaluation → Documented conditions: calls rules
backend/app/services/rule_engine_service.py - Hybrid prediction → Rule evaluation: uses rules
- Hybrid prediction → Result explanations: explains result
- Recommendations → Hybrid prediction: uses prediction
- FastAPI app → Document scanner: imports errors
backend/app/main.py - FastAPI app → Scheme knowledge: imports errors
backend/app/main.py - FastAPI app → Recommendation history: imports errors
backend/app/main.py - FastAPI app → Application tracking: imports errors
backend/app/main.py - FastAPI app → Notifications: imports errors
backend/app/main.py - FastAPI app → PDF reports: registers
backend/app/main.py - FastAPI app → Scheme comparison: registers
backend/app/main.py - Application tracking → Scheme catalog: resolves scheme
backend/app/services/application_service.py - Application tracking → User data models: persists rows
backend/app/services/application_service.py - Application tracking → Database sessions: uses session
backend/app/services/application_service.py - Database sessions → Application database: connects
backend/app/db/session.py - User data models → Application database: maps records
- Notifications → Recommendation history: reads history
backend/app/services/notification_service.py - Notifications → Profile readiness: reads readiness
backend/app/services/notification_service.py - Notifications → Document checklist: reads checklist
backend/app/services/notification_service.py - Scheme assistant → Scheme catalog: fetches catalog