How sachinsahu460368/bharat-standard-ai works
Bharat Standards AI turns procurement documents into explainable Indian Standards recommendations and structured reports. The main workflow starts in the web dashboard, submits a document to the analysis API, extracts requirements, retrieves and ranks standards, and returns recommendations with compliance, version, and explanation details for display or reporting. The README documents these capabilities, while sampled source confirms the frontend calls, search orchestration, and report service behavior. Analysis-route wiring and several domain service interactions are represented at the documented capability level because their source was not sampled.
Main entry points: analyze.py Analysis Endpoint · App.tsx Dashboard Workflow · hybrid_search_service.py Hybrid Search · apiService.ts API Client
Components 21
Web Dashboard
- Dashboard Workflow
frontend/src/App.tsx - Results Panels
frontend/src/components - API Client
frontend/src/apiService.ts
API
- Analysis Endpoint
backend/app/api/routes/analyze.py - Search Endpoint
backend/app/api/routes/search.py - Reports Endpoint
backend/app/api/routes/reports.py
Analysis
- Document Processing
backend/app/services/document_service.py - Requirement Extraction
backend/app/services/requirement_extraction_service.py - Local Fallback
backend/app/services/local_extraction_service.py - Compliance Checks
backend/app/services/compliance_service.py - Recommendation Explanations
backend/app/services/explanation_service.py - Version Alerts
backend/app/services/version_service.py
Standards Retrieval
- Hybrid Search
backend/app/services/hybrid_search_service.py - Lexical Search
backend/app/services/lexical_search_service.py - Semantic Search
backend/app/services/semantic_search_service.py - Relevance Reranking
backend/app/services/reranking_service.py - Standards Knowledge Base
backend/app/services/standards_service.py - Related Standards
backend/app/services/standards_graph_service.py
Reporting
- Report Generation
backend/app/services/report_service.py
Other components
- Procurement User
- LLM Provider
Connections 27
- Procurement User → Dashboard Workflow: uploads document
- Dashboard Workflow → API Client: requests analysis
- API Client → Analysis Endpoint: posts document
- Analysis Endpoint → Document Processing: processes file
- Document Processing → Requirement Extraction: provides text
- Requirement Extraction → LLM Provider: extracts with
- Requirement Extraction → Local Fallback: falls back to
- Analysis Endpoint → Hybrid Search: retrieves standards
- Hybrid Search → Lexical Search: queries
- Hybrid Search → Semantic Search: queries
- Lexical Search → Standards Knowledge Base: reads records
- Semantic Search → Standards Knowledge Base: reads records
- Hybrid Search → Standards Knowledge Base: checks metadata
- Analysis Endpoint → Relevance Reranking: ranks candidates
- Analysis Endpoint → Compliance Checks: checks QCO status
- Analysis Endpoint → Recommendation Explanations: builds explanations
- Analysis Endpoint → Version Alerts: checks versions
- Analysis Endpoint → Related Standards: finds related standards
- Analysis Endpoint → Dashboard Workflow: returns findings
- Dashboard Workflow → Results Panels: displays results
- Dashboard Workflow → API Client: requests report
- API Client → Reports Endpoint: posts analysis ID
- Reports Endpoint → Report Generation: generates report
- Reports Endpoint → Dashboard Workflow: returns report
- Search Endpoint → Lexical Search: dispatches lexical
- Search Endpoint → Semantic Search: dispatches semantic
- Search Endpoint → Hybrid Search: dispatches hybrid