How sakshamnagar2805/krishisahyog-ai works
KrishiSahyog AI is a farmer-facing guidance kiosk, currently configured as an unauthenticated public-information shell; the README says records are demo data and verified public catalogs may be empty. The main public workflow is browsing verified schemes and policies, with separate research previews clearly marked unapproved. Other documented branches cover PMFBY, PACS, documents, grievances, and a multilingual voice assistant. The server also has source collection, extraction, review, and publication components. Edges reflect excerpts, SOURCE INDEX references, or README statements; unsampled wiring is not inferred.
Main entry points: App.tsx App shell · pool.ts PostgreSQL · worker.ts Source ingestion worker · previewApi.ts Local preview API
Components 26
Farmer experience
- App shell
src/App.tsx - Navigation and voice
src/components/layout/Header.tsx - Service navigation
src/components/layout/Sidebar.tsx - Verified services
src/components/public/VerifiedServices.tsx - PMFBY, PACS, documents, grievances
src/pages
Public information
- Government content client
src/services/public/governmentContentClient.ts - Public content API
server/publicContentApi.ts - Published catalog repository
server/publicContent/repository.ts - Scheme discovery API
server/discovery/api.ts - Relevance ranking
server/discovery/engine.ts
Content operations
- Source ingestion worker
server/ingestion/worker.ts - Safe source fetching
server/ingestion/secureFetch.ts - Document extraction
server/extraction/extract.ts - Extraction persistence
server/extraction/persist.ts - Content review workflow
server/review/workflow.ts
Research preview
- Research preview panel
src/components/public/ResearchPreviewPanel.tsx - Research journey client
src/services/public/researchJourney.ts - Local preview API
server/research/previewApi.ts - Preview record model
server/research/model.ts
Voice assistant
- Voice assistant interface
src/components/assistant/VoiceAssistantContext.tsx - Live voice session
src/services/assistant/liveVoiceSession.ts - Assistant API
server/assistantApi.ts - Grounded answer API
server/assistant/groundedApi.ts
Other components
- Farmer
- PostgreSQL
server/db/pool.ts - Gemini services
Connections 26
- Farmer → App shell: uses
README.md - App shell → Navigation and voice: renders
src/App.tsx - App shell → Service navigation: renders
src/App.tsx - App shell → Government content client: loads catalogs
src/App.tsx - App shell → Verified services: renders
src/App.tsx - Farmer → PMFBY, PACS, documents, grievances: uses
README.md - Government content client → Public content API: requests catalogs
README.md - Public content API → Published catalog repository: queries
server/publicContentApi.ts - Published catalog repository → PostgreSQL: reads
server/publicContent/repository.ts - Scheme discovery API → Relevance ranking: ranks candidates
server/discovery/api.ts - Scheme discovery API → PostgreSQL: queries
server/discovery/api.ts - Source ingestion worker → Safe source fetching: fetches sources
server/ingestion/worker.ts - Source ingestion worker → Extraction persistence: persists extraction
server/ingestion/worker.ts - Extraction persistence → Document extraction: extracts documents
server/extraction/persist.ts - Source ingestion worker → PostgreSQL: records runs
server/ingestion/worker.ts - Research preview panel → Research journey client: loads previews
src/components/public/ResearchPreviewPanel.tsx - Research journey client → Local preview API: requests preview
- Local preview API → Preview record model: maps records
server/research/previewApi.ts - Local preview API → PostgreSQL: reads records
server/research/previewApi.ts - Navigation and voice → Voice assistant interface: opens voice guide
README.md - Voice assistant interface → Live voice session: starts session
src/components/assistant/VoiceAssistantContext.tsx - Live voice session → Assistant API: fetches live token
src/services/assistant/liveVoiceSession.ts - Live voice session → Gemini services: streams audio
src/services/assistant/liveVoiceSession.ts - Assistant API → Gemini services: uses models
README.md - Grounded answer API → Published catalog repository: retrieves content
server/assistant/groundedApi.ts - Grounded answer API → PostgreSQL: queries
server/assistant/groundedApi.ts