How saikrishna-bathina/cricbot works
CricBot is a cricket-law adjudication platform: officials ask a question or describe an incident, the Express API coordinates retrieval and answer generation, and the interface presents rulings with citations. Separate product paths support clause search, exams, discrepancy reports, and administrator-managed rulebook ingestion. The graph combines documented capabilities with sampled call relationships; unsampled feature internals are represented at their source paths, and their unverified links are omitted.
Main entry points: App.jsx CricBot interface · app.js REST gateway · adminController.js Admin controller · pythonRagClient.js Python service adapter
Components 24
Official-facing client
- CricBot interface
client/src/App.jsx - Adjudication desk
client/src/pages/ChatPage.jsx - Scenario analyser
client/src/pages/ScenarioPage.jsx - Clause search
client/src/pages/LawsSearchPage.jsx - Document console
client/src/pages/AdminDocumentsPage.jsx - Umpire exams
client/src/pages/QuizPage.jsx
Express application
- REST gateway
server/src/app.js - Chat controller
server/src/controllers/chatController.js - Scenario controller
server/src/controllers/scenarioController.js - Law search controller
server/src/controllers/lawSearchController.js - Admin controller
server/src/controllers/adminController.js - RAG orchestrator
server/src/services/rag/ragOrchestrator.js - Python service adapter
server/src/services/rag/pythonRagClient.js
Grounded answer service
- FastAPI service
rag-service/app/main.py - Answer synthesis
rag-service/app/generation/answer_service.py - Hybrid retrieval
rag-service/app/retrieval/retriever.py
Rulebook knowledge
- Chunk repository
rag-service/app/db/repositories/chunks.py - MongoDB Atlas
rag-service/app/db/mongo.py - PDF ingestion
rag-service/app/ingestion/pipeline.py - Document administration
server/src/services/ingestion/documentAdminService.js
Assessment and oversight
- Quiz controller
server/src/controllers/quizController.js - Discrepancy reports
server/src/controllers/reportController.js - Exam scoring
server/src/services/quizzes/quizService.js
Other components
- Match official
Connections 25
- Match official → CricBot interface: uses
README.md - CricBot interface → Adjudication desk: routes to
client/src/App.jsx - CricBot interface → Scenario analyser: routes to
client/src/App.jsx - CricBot interface → Clause search: routes to
client/src/App.jsx - CricBot interface → Document console: routes to
client/src/App.jsx - CricBot interface → Umpire exams: routes to
client/src/App.jsx - CricBot interface → REST gateway: REST requests
README.md - REST gateway → Chat controller: routes
server/src/app.js - REST gateway → Scenario controller: routes
server/src/app.js - REST gateway → Law search controller: routes
server/src/app.js - REST gateway → Admin controller: routes
server/src/app.js - REST gateway → Quiz controller: routes
server/src/app.js - Chat controller → RAG orchestrator: delegates
server/src/controllers/chatController.js - Scenario controller → Python service adapter: analyzes via
- RAG orchestrator → Python service adapter: proxies queries
- Python service adapter → FastAPI service: HTTP requests
server/src/services/rag/pythonRagClient.js - FastAPI service → Answer synthesis: registers API
rag-service/app/main.py - Answer synthesis → Hybrid retrieval: retrieves evidence
rag-service/app/generation/answer_service.py - Hybrid retrieval → Chunk repository: searches chunks
rag-service/app/retrieval/retriever.py - PDF ingestion → Chunk repository: writes chunks
rag-service/app/ingestion/pipeline.py - Admin controller → Document administration: delegates ingestion
server/src/controllers/adminController.js - Clause search → Law search controller: searches clauses
client/src/pages/LawsSearchPage.jsx - Quiz controller → Exam scoring: scores exams
- Admin controller → MongoDB Atlas: reads documents
- Discrepancy reports → MongoDB Atlas: stores reports