How milan-019/sahay_ai works
Sahay-AI is a FastAPI backend for rural-business feasibility advice and credit navigation. Its principal full-report workflow evaluates a proposed business, matches eligible financing schemes, routes the best offer to a nearby partner, and can add document-readiness status. Separate endpoints expose scheme matching, EMI schedules, DigiLocker verification, and document checks. The graph follows the sampled router calls and documented capabilities; unsampled internals are represented only where the source index or explicit documentation supports them.
Main entry points: advisory.py Advisory endpoints · sih_schemes.py Scheme endpoints · main.py FastAPI app · feasibility.py Feasibility analysis
Components 12
API workflows
- FastAPI app
main.py - Advisory endpoints
routers/advisory.py - Scheme endpoints
routers/sih_schemes.py
Business advisory
- Feasibility analysis
engine/feasibility.py
Credit and readiness
- Scheme and EMI engine
engine/finance.py - Document readiness
engine/document_readiness.py
Partner routing
- Partner routing engine
engine/spatial.py - PostGIS database
Other components
- API client
- OpenStreetMap
- Generative AI
- DigiLocker service
Connections 13
- API client → FastAPI app: sends requests
main.py - FastAPI app → Advisory endpoints: mounts routes
main.py - FastAPI app → Scheme endpoints: mounts routes
main.py - Advisory endpoints → Feasibility analysis: requests analysis
routers/advisory.py - Feasibility analysis → OpenStreetMap: queries competitors
engine/feasibility.py - Feasibility analysis → Generative AI: generates synthesis
engine/feasibility.py - Advisory endpoints → Scheme and EMI engine: matches schemes
routers/advisory.py - Advisory endpoints → Partner routing engine: routes application
routers/advisory.py - Advisory endpoints → Document readiness: checks readiness
routers/advisory.py - Scheme endpoints → Scheme and EMI engine: matches and calculates EMI
routers/sih_schemes.py - Scheme endpoints → Document readiness: checks documents
routers/sih_schemes.py - Scheme endpoints → DigiLocker service: exchanges tokens and fetches records
routers/sih_schemes.py - Partner routing engine → PostGIS database: queries eligible branches
engine/spatial.py