How kaarthick6-tech/sih-is works
This is an Indian Standards recommendation engine: users submit procurement text or a PDF and receive matching standards, related standards, mandatory certifications, and a shared rationale. The frontend sends typed requests to a FastAPI API; PDF submissions are extracted before both input modes share embedding, database candidate search, and LLM reranking. The backend also includes database schema setup and standards seeding. The README is empty, so capability and relationship coverage here is based on the sampled source and SOURCE INDEX; unsampled modules are not inferred beyond those references.
Main entry points: analyze.py Shared analysis pipeline · seed_standards.py Standards seeding · page.tsx Submission and results · session.py Database connection
Components 13
User interface
- Submission and results
frontend/app/page.tsx - Typed API client
frontend/lib/api.ts
API intake
- FastAPI app
backend/main.py - Analysis routes
backend/routers/analyze.py - PDF text extraction
backend/routers/analyze.py
Recommendation analysis
- Shared analysis pipeline
backend/routers/analyze.py - Text embeddings
backend/routers/analyze.py - LLM reranking
backend/services/reranker.py
Standards data
- Standards database
backend/db/models.py - Database connection
backend/db/session.py - Standards seeding
backend/data_ingestion/seed_standards.py
Other components
- Procurement user
- Groq or OpenAI
Connections 17
- Procurement user → Submission and results: submits input
frontend/app/page.tsx - Submission and results → Typed API client: calls analysis
frontend/app/page.tsx - Typed API client → FastAPI app: POSTs requests
frontend/lib/api.ts - FastAPI app → Analysis routes: mounts routes
backend/main.py - Analysis routes → PDF text extraction: extracts PDF text
backend/routers/analyze.py - Analysis routes → Shared analysis pipeline: analyzes text
backend/routers/analyze.py - PDF text extraction → Shared analysis pipeline: passes extracted text
backend/routers/analyze.py - Shared analysis pipeline → Text embeddings: encodes query
backend/routers/analyze.py - Shared analysis pipeline → Database connection: opens connection
backend/routers/analyze.py - Database connection → Standards database: queries candidates
backend/db/models.py - Shared analysis pipeline → LLM reranking: reranks candidates
backend/routers/analyze.py - LLM reranking → Groq or OpenAI: requests selection
backend/services/reranker.py - Shared analysis pipeline → Standards database: reads relations and certifications
backend/routers/analyze.py - Standards seeding → Text embeddings: encodes scopes
backend/data_ingestion/seed_standards.py - Standards seeding → Database connection: opens connection
backend/data_ingestion/seed_standards.py - Standards seeding → Standards database: inserts seed records
backend/data_ingestion/seed_standards.py - Shared analysis pipeline → Submission and results: returns recommendations