How skygod07/sih-2026 works
Sarthi is an innovation-procurement platform: government officers discover and compare startups, simulate pilot outcomes, then manage a pilot’s milestones, evidence, payments, and audit history; startups participate through company profiles and challenge responses. The backend separates HTTP routing, deterministic procurement rules, persistence, simulation, and AI-assisted discovery/explanations. The README documents RAG retrieval and an immutable milestone ledger. Some subsystem links are documented rather than visible in sampled implementation; those are marked dashed where necessary.
Main entry points: index.ts API route registry · workflow.routes.ts Procurement endpoints · (console) Procurement console · sarthi.routes.ts Sarthi endpoints
Components 26
User experience
- Procurement console
frontend/src/app/(console) - Startup portal
frontend/src/app/(console)/startup - Sarthi API client
frontend/src/lib/api/sarthi.ts - Workflow API client
frontend/src/lib/api/workflow.ts
API and identity
- Express application
backend/src/app.ts - API route registry
backend/src/routes/index.ts - Authentication and roles
backend/src/auth/authenticate.ts - Identity management
backend/src/auth/auth.controller.ts - Procurement endpoints
backend/src/workflow/http/workflow.routes.ts - Sarthi endpoints
backend/src/sarthi/http/sarthi.routes.ts - AI endpoints
backend/src/sarthi/ai/ai.routes.ts - Pilot simulation endpoints
backend/src/sarthi/pilotsim/pilotsim.routes.ts
Procurement lifecycle
- Company profiles
backend/src/workflow/company.service.ts - Challenge-to-pilot workflow
backend/src/workflow/workflow.service.ts - Workflow audit
backend/src/workflow/audit.ts - Milestone ledger
backend/src/sarthi/ledger/ledger.service.ts
Simulation and AI
- Pilot outcome simulation
backend/src/sarthi/pilotsim/pilotsim.service.ts - Confidence and risk
backend/src/sarthi/simulator/simulator.service.ts - Startup discovery
backend/src/sarthi/ai/discovery.service.ts - AI assistance
backend/src/sarthi/ai/ai.service.ts - Policy RAG retrieval
backend/src/sarthi/rag/rag.service.ts
Domain data
- Pilot corpus
backend/src/sarthi/corpus/pilotCorpus.repository.ts - Procurement repositories
backend/src/workflow/repositories.ts
Other components
- Procurement officer
- Startup user
- Ollama model service
Connections 27
- Procurement officer → Procurement console: uses
- Startup user → Startup portal: uses
- Procurement console → Workflow API client: requests procurement data
- Procurement console → Sarthi API client: requests Sarthi services
- Startup portal → Workflow API client: requests workflow
- Express application → API route registry: mounts API routes
backend/src/app.ts - API route registry → Procurement endpoints: registers
backend/src/routes/index.ts - API route registry → Sarthi endpoints: registers
backend/src/routes/index.ts - API route registry → AI endpoints: registers
backend/src/routes/index.ts - API route registry → Pilot simulation endpoints: registers
backend/src/routes/index.ts - API route registry → Identity management: registers
backend/src/routes/index.ts - Identity management → Authentication and roles: requires identity
backend/src/auth/auth.routes.ts - Procurement endpoints → Challenge-to-pilot workflow: dispatches workflow calls
backend/src/workflow/http/workflow.routes.ts - Procurement endpoints → Company profiles: dispatches company calls
backend/src/workflow/http/workflow.routes.ts - Challenge-to-pilot workflow → Procurement repositories: reads and writes
backend/src/workflow/workflow.service.ts - Company profiles → Procurement repositories: reads and writes
backend/src/workflow/company.service.ts - Challenge-to-pilot workflow → Workflow audit: records audit events
backend/src/workflow/workflow.service.ts - Procurement endpoints → Authentication and roles: authenticates callers
backend/src/workflow/http/workflow.routes.ts - Sarthi endpoints → Milestone ledger: dispatches ledger operations
- Sarthi endpoints → Policy RAG retrieval: dispatches retrieval
- AI endpoints → AI assistance: calls assistance tasks
backend/src/sarthi/ai/ai.routes.ts - AI endpoints → Startup discovery: calls discovery
backend/src/sarthi/ai/ai.routes.ts - Pilot simulation endpoints → Pilot outcome simulation: starts and queries runs
backend/src/sarthi/pilotsim/pilotsim.routes.ts - Pilot outcome simulation → Confidence and risk: uses outcome analysis
- AI assistance → Ollama model service: requests model assistance
- Startup discovery → Ollama model service: requests model assistance
- Policy RAG retrieval → Pilot corpus: retrieves pilot records