Pitwall

Pitwall · Private · runs locally

How Pitwall runs

Pitwall runs on your own computer: a Python backend that holds the race data, a React app in the browser, and the Claude Code CLI for the strategist. Nothing is hosted, and the source is on request.

What it needs

from the README
RequirementWhat it is for
Python 3.11 or newer The backend, the ingestion scripts and the MCP server. Its dependencies are pinned.
Node.js 18 or newer The React frontend, served by Vite.
The Claude Code CLI, installed and signed in The strategist. The backend starts claude itself for each question, under your own sign-in, so there is no API key to set.
A connection for the first seed FastF1 downloads the timing data once. After that the race pages work offline; the strategist still needs the CLI’s connection.
No GPU The radio transcripts ship with the code. A GPU only speeds things up if you transcribe more races yourself.

How the pieces fit

From timing data to an answer

Dashed boxes start only when you ask the strategist. All of it runs on your machine except the model itself, which the CLI reaches under your own Claude account.
  1. Once Seed

    seed_races.py pulls ten races through FastF1 (Bahrain, Monaco, Silverstone and Hungary in 2024, Melbourne in 2025, and five 2026 races) and normalizes them into SQLite: laps and sectors in milliseconds, stints worked out from tyre changes, weather per lap, race control messages and car telemetry. It then loads the 390 team radio transcripts that ship as JSON.

  2. Every page Replay

    FastAPI serves the races as REST JSON, computing things like the gap to the leader on the fly, and the React app draws them: the race screen with Recharts, the 2D track with Konva, the 3D pit wall with three.js.

  3. Every question Ask

    The chat posts your question and the conversation so far. The backend starts the Claude Code CLI with an MCP config for that race; the model calls the race tools, which read SQLite, and the CLI’s output streams back to the browser as server-sent events, with a status line for each tool call.

A session

What running it looks like

Seed once, then start the backend and the frontend in two terminals and open localhost:5173. Pick a race, scrub or play it, switch to the 3D pit wall, and open the strategist with the A key.

While the strategist works, the chat says which tool is running. A strategy question can take a minute or two and a dozen tool calls; the backend stops one after five minutes, and accepts ten questions a minute.

The strategist chat with the question 'What if P2 stayed out 5 more laps?' and, below it, the status line 'Simulating alternate strategy' while the answer is being worked out.
A what-if in progress: the strategist is running simulate_alternate_strategy.
Terminal after you have the source
# once, in backend/
$ pip install -r requirements.txt
$ cp .env.example .env
  the defaults work
$ python scripts/seed_races.py
  ten races, 2024 to 2026, plus the radio

# each session: backend/
$ uvicorn app.main:app --reload
  http://localhost:8000

# and frontend/
$ npm install
$ npm run dev
  http://localhost:5173

# optional
$ python scripts/backtest_sim.py
  score the simulator against
  the real results
$ pytest tests/

Inside a strategist call

A CLI with one thing to touch

For each question the backend writes an MCP config into a scratch directory and runs the CLI there, so it picks up no CLAUDE.md or project settings from wherever the server was started. Its built-in tools are switched off entirely, shell and file access included, so the one thing it can reach is the race database, through the MCP server.

Your own settings files and hooks don’t apply to these calls. The prompt goes in on stdin, so a long conversation can’t overrun the argument limit, and the model is the sonnet alias unless you change it in .env.

backend/app/services/llm.py the command it runs
claude -p \
  --system-prompt \
    "<strategist persona>" \
  --output-format stream-json \
  --verbose \
  --include-partial-messages \
  --model sonnet \
  --mcp-config mcp.json \
  --strict-mcp-config \
  --tools "" \
  --allowedTools mcp__pitwall \
  --setting-sources ""

Built with

Frontend
React 19, TypeScript, Material UI, Recharts, Konva, three.js, Vite
Backend
FastAPI, SQLAlchemy, SQLite, sse-starlette, NumPy
Data
FastF1 3.8.3, OpenF1 radio audio, Whisper large-v3
Strategist
Claude Code CLI, MCP 1.26

Source on request

The repository is private.

To read the code or run Pitwall yourself, message me on LinkedIn with a line about what you have in mind.