How sandeepkr24/gridmind works
GridMind is an AI Formula 1 analyst whose main workflow turns a user question into resolved race/session entities, fetches missing timing data, runs validated read-only SQL, and returns an answer with evidence. Separate product branches provide race dashboards, championship standings, and generated reports. The README documents these capabilities and API behavior; source excerpts confirm key agent, ingestion, database, and standings relationships. Several route and UI internals were not sampled, so those connections are shown only where the README supports them.
Main entry points: routes HTTP routes · client.ts API client · orchestrator.py Chat orchestrator · database.py Postgres
Components 23
Web experience
- Chat page
frontend/app/chat/page.tsx - Race pages
frontend/app/races/[id]/page.tsx - Dashboard
frontend/app/page.tsx - Report page
frontend/app/reports/[id]/page.tsx - Ingestion progress
frontend/components/LoadingPit.tsx - API client
frontend/lib/api/client.ts
API surface
- HTTP routes
backend/app/api/routes - Application wiring
backend/app/main.py
Chat analysis
- Chat orchestrator
backend/app/agent/orchestrator.py - Entity resolution
backend/app/agent/entity_resolver.py - Ingestion gate
backend/app/agent/ingestion_gate.py - SQL answering
backend/app/agent/sql_agent.py - LLM provider
backend/app/llm
Race data
- Session job runner
backend/app/ingestion/runner.py - FastF1 provider
backend/app/ingestion/fastf1_provider.py - Timing normalizer
backend/app/ingestion/normalizer.py - Race statistics
backend/app/analytics/race_stats.py - Postgres
backend/app/db/database.py
Standings and reports
- Standings cache
backend/app/ingestion/standings_service.py - Jolpica standings
backend/app/ingestion/standings_provider.py - Report generation
backend/app/reports - Report jobs
backend/app/reports/jobs.py
Other components
- F1 fan
Connections 32
- F1 fan → Chat page: asks question
README.md - F1 fan → Race pages: views race
README.md - F1 fan → Dashboard: views season
README.md - F1 fan → Report page: reads report
README.md - Chat page → API client: requests data
- Race pages → API client: requests data
- Dashboard → API client: requests data
- Report page → API client: requests report
- API client → HTTP routes: calls API
README.md - HTTP routes → Application wiring: registered by
backend/app/main.py - HTTP routes → Chat orchestrator: dispatches chat
README.md - Chat orchestrator → Entity resolution: resolves entities
backend/app/agent/orchestrator.py - Chat orchestrator → Ingestion gate: checks data
backend/app/agent/orchestrator.py - Chat orchestrator → SQL answering: queries sessions
backend/app/agent/orchestrator.py - Chat orchestrator → LLM provider: generates answer
backend/app/agent/orchestrator.py - Entity resolution → LLM provider: extracts mentions
backend/app/agent/entity_resolver.py - Ingestion gate → Session job runner: submits fetch
backend/app/agent/ingestion_gate.py - Session job runner → FastF1 provider: fetches session
backend/app/ingestion/runner.py - Session job runner → Timing normalizer: normalizes data
backend/app/ingestion/runner.py - Timing normalizer → Postgres: stores timing
- SQL answering → Postgres: runs read-only SQL
README.md - HTTP routes → Session job runner: starts ingestion
README.md - Ingestion progress → API client: polls job
- HTTP routes → Race statistics: serves race stats
README.md - Race statistics → Postgres: reads timing
- HTTP routes → Standings cache: serves standings
README.md - Standings cache → Jolpica standings: refreshes standings
backend/app/ingestion/standings_service.py - Standings cache → Postgres: caches standings
backend/app/ingestion/standings_service.py - HTTP routes → Report jobs: starts report job
README.md - Report jobs → Report generation: builds report
backend/app/reports/jobs.py - Report generation → LLM provider: writes prose
README.md - Report generation → Postgres: stores report