How dev-manussssss/esaksham-portal works
SAKSHAM is a role-aware MPLADS risk-monitoring and decision-support platform: officers use dashboards and operational pages to review projects, procurement, vendors, inspections, alerts, and audit history. The browser API layer talks to a backend that applies access controls, persists domain records, and runs document extraction and deterministic/AI-assisted project analysis. The README also describes vision, geospatial, fraud-graph, and investigative capabilities; the tree shows a fraud-graph page, but specialized service implementations are not present in the supplied tree. Links are limited to shown imports/calls or README statements.
Main entry points: App.jsx Role-based portal · routes Domain routes · projectController.js Project workflows · ProjectDetail.jsx Project review
Components 27
Officer application
- Role-based portal
frontend/src/App.jsx - Session and roles
frontend/src/auth/AuthContext.jsx - Role dashboards
frontend/src/pages/DistrictDashboard.jsx - Project review
frontend/src/pages/ProjectDetail.jsx - Vendor risk views
frontend/src/pages/VendorRiskProfile.jsx - Tender management
frontend/src/pages/ManageTenders.jsx - Investigation views
frontend/src/pages/InvestigationDashboard.jsx - Fraud relationship graph
frontend/src/pages/FraudGraph.jsx - Document upload
frontend/src/components/DocumentUploadModal.jsx - API and offline cache
frontend/src/api/sakshamApi.js
Backend API
- HTTP application
backend/src/index.js - Domain routes
backend/src/routes - Authentication
backend/src/middleware/auth.js - Role permissions
backend/src/middleware/rbac.js - Project workflows
backend/src/controllers/projectController.js - Tender workflows
backend/src/controllers/tenderController.js - Vendor workflows
backend/src/controllers/vendorController.js - Inspection records
backend/src/controllers/inspectionController.js - Audit history
backend/src/controllers/auditController.js - Risk alerts
backend/src/controllers/alertController.js
Risk analysis
- Document extraction
backend/src/ai/extractor.js - Deterministic checks
backend/src/ai/ruleEngine.js - AI failover analysis
backend/src/ai/groqFailover.js - Vendor risk scoring
backend/src/vendorRiskEngine.js
Persistence
- Database client
backend/src/supabase.js
Other components
- Government officer
- Supabase database
Connections 26
- Government officer → Role-based portal: uses
README.md - Role-based portal → Session and roles: wraps
frontend/src/App.jsx - Role-based portal → Role dashboards: routes to
frontend/src/App.jsx - Role-based portal → Project review: routes to
frontend/src/App.jsx - Role-based portal → Vendor risk views: routes to
frontend/src/App.jsx - Role-based portal → Tender management: routes to
frontend/src/App.jsx - Role-based portal → Fraud relationship graph: routes to
frontend/src/App.jsx - Project review → Document upload: renders
frontend/src/pages/ProjectDetail.jsx - Project review → API and offline cache: requests data
frontend/src/pages/ProjectDetail.jsx - Tender management → API and offline cache: requests data
frontend/src/pages/ManageTenders.jsx - API and offline cache → HTTP application: calls API
frontend/src/api/sakshamApi.js - HTTP application → Domain routes: mounts
backend/src/index.js - Domain routes → Project workflows: dispatches
backend/src/routes/projects.js - Domain routes → Tender workflows: dispatches
backend/src/routes/tenders.js - Domain routes → Vendor workflows: dispatches
- Domain routes → Inspection records: dispatches
backend/src/routes/inspections.js - Domain routes → Audit history: dispatches
backend/src/routes/audit.js - Domain routes → Risk alerts: dispatches
backend/src/routes/alerts.js - Project workflows → Document extraction: extracts documents
backend/src/controllers/projectController.js - Project workflows → Deterministic checks: checks anomalies
backend/src/controllers/projectController.js - Project workflows → AI failover analysis: requests analysis
backend/src/controllers/projectController.js - Vendor workflows → Vendor risk scoring: calculates risk
backend/src/controllers/vendorController.js - Project workflows → Database client: reads and writes
backend/src/controllers/projectController.js - Vendor risk scoring → Database client: reads records
backend/src/vendorRiskEngine.js - Database client → Supabase database: connects
backend/src/supabase.js - Project review → Investigation views: supports review