How competitivecoder1240/pitwall works
PitWall answers F1 regulation, telemetry, and race-strategy questions through a streamed chat workflow: the web client sends a query to the FastAPI service, which orchestrates retrieval/calculation, synthesizes a response, and streams it back. The README documents the main agent stages and cloud capabilities; sampled backend excerpts confirm orchestration, strategy-tool invocation, and database behavior. Retrieval internals and the citation guardrail are represented at the documented level because their implementation details were not fully excerpted.
Main entry points: db.py Database access · api.py FastAPI endpoints · graph.py StateGraph orchestration · useSSEChat.ts SSE chat hook
Components 23
Chat client
- Chat interface
frontend-next/app/page.tsx - SSE chat hook
frontend-next/hooks/useSSEChat.ts
API and identity
- FastAPI endpoints
backend/api.py - Authentication
backend/auth.py - Database access
backend/db.py
Agent workflow
- StateGraph orchestration
backend/graph.py - Intent router
backend/graph.py - Strategy calculator
backend/tools.py - Hybrid ML models
backend/tools.py - Response synthesis
backend/graph.py - Citation guardrail
backend/graph.py
Knowledge and data
- Regulation retrieval
backend/graph.py - Hybrid search
backend/graph.py - Regulation graph
backend/graph.py - Telemetry queries
backend/tools.py - Telemetry database
backend/db.py
Telemetry pipeline
- Telemetry extraction
scripts/extract_telemetry.py - Model training
scripts/train_hybrid_model.py
Other components
- Engineer
- Gemini inference
- Pinecone
- BM25 corpus
- Supabase PostgreSQL
Connections 26
- Engineer → Chat interface: asks
README.md - Chat interface → SSE chat hook: uses
README.md - SSE chat hook → FastAPI endpoints: streams query
README.md - FastAPI endpoints → StateGraph orchestration: invokes
backend/api.py - FastAPI endpoints → Authentication: authenticates
backend/api.py - Authentication → Database access: checks users
backend/auth.py - FastAPI endpoints → Database access: reads/writes sessions
backend/api.py - StateGraph orchestration → Intent router: dispatches
README.md - Intent router → Regulation retrieval: routes query
README.md - Intent router → Telemetry queries: routes query
README.md - Intent router → Strategy calculator: routes query
README.md - Regulation retrieval → Hybrid search: retrieves context
README.md - Regulation retrieval → Regulation graph: traverses graph
backend/graph.py - Hybrid search → Pinecone: semantic search
README.md - Hybrid search → BM25 corpus: keyword search
README.md - Telemetry queries → Database access: queries
backend/tools.py - Database access → Telemetry database: reads/writes
backend/db.py - Strategy calculator → Hybrid ML models: loads predictions
backend/tools.py - StateGraph orchestration → Strategy calculator: invokes calculator
backend/graph.py - StateGraph orchestration → Response synthesis: synthesizes context
README.md - Response synthesis → Gemini inference: generates response
README.md - Response synthesis → Citation guardrail: verifies citations
README.md - Citation guardrail → SSE chat hook: streams result
README.md - Telemetry extraction → Telemetry database: populates
scripts/extract_telemetry.py - Model training → Hybrid ML models: trains artifacts
- Database access → Supabase PostgreSQL: uses when configured
backend/db.py