How debbyg-001/agrova works
Agrova is a farm-management application with animal, health, feed and production records, plus a conversational assistant. The main workflow is a farmer’s chat request reaching the API, where the assistant can consult farm records and retrieved knowledge, then return a reply; record changes through chat require confirmation. The frontend also includes onboarding and farm dashboard areas for health, livestock, finance, alerts and AI. Backend and chatbot relationships are supported by excerpts and the source index; frontend-to-API wiring and knowledge ingestion details were not shown.
Main entry points: chatbot.py Chat orchestrator · main.py Farm API · database.py Database sessions · crud.py Record operations
Components 22
Farmer experience
- Web application
frontend/src/app - Farm onboarding
frontend/src/app/onboarding/page.tsx - Farm dashboard
frontend/src/app/app/page.tsx - Health view
frontend/src/app/app/health/page.tsx - Livestock view
frontend/src/app/app/livestock/page.tsx - Finance view
frontend/src/app/app/finance/page.tsx - Alerts view
frontend/src/app/app/alerts/page.tsx - AI view
frontend/src/app/app/ai/page.tsx
Farm API and records
- Farm API
backend/main.py - Record schemas
backend/schemas.py - Record operations
backend/crud.py - Farm record models
backend/models.py - Database sessions
backend/database.py - Farm database
backend/database.py
Conversational assistant
- Chat orchestrator
chatbot/chatbot.py - Confirmed record logging
chatbot/record_logging.py - Pidgin detection
chatbot/lang_utils.py - Offline responder
chatbot/local_responder.py
Knowledge base
- Knowledge retrieval
knowledge/retriever.py - Knowledge index
knowledge/retriever.py - Knowledge ingestion
knowledge/ingest.py
Other components
- Farmer
Connections 16
- Farmer → Farm API: sends chat
backend/main.py - Farm API → Record schemas: validates records
backend/main.py - Farm API → Record operations: dispatches record calls
backend/main.py - Farm API → Chat orchestrator: calls assistant
backend/main.py - Farm API → Database sessions: opens sessions
backend/main.py - Record operations → Farm record models: queries and writes
backend/crud.py - Farm record models → Database sessions: uses base
backend/models.py - Database sessions → Farm database: connects
backend/database.py - Chat orchestrator → Confirmed record logging: handles log requests
chatbot/chatbot.py - Chat orchestrator → Knowledge retrieval: retrieves knowledge
chatbot/chatbot.py - Chat orchestrator → Offline responder: builds offline replies
chatbot/chatbot.py - Chat orchestrator → Pidgin detection: detects language
chatbot/chatbot.py - Chat orchestrator → Farm database: reads farm records
chatbot/chatbot.py - Confirmed record logging → Farm database: writes after confirmation
chatbot/record_logging.py - Knowledge retrieval → Knowledge index: loads and searches
knowledge/retriever.py - Farmer → Web application: uses