Pitbrain — AI Formula 1 live race intelligence, built on OpenF1 #430
GCloke
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
|
Looks very nice and comprehensive! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all
I wanted to share Pitbrain.ai — a Formula 1 site I've been building that leans heavily on OpenF1 for its live and historical data. First off, a big thank you to @br-g and everyone here: OpenF1 is the backbone of the whole live side, and it's been a genuine pleasure to build on.
What it is
Pitbrain takes real session data and turns it into three things: a "what's happening right now" live view, an AI race oracle that publicly forecasts each Grand Prix, and a set of prediction games — all designed to keep people engaged across a race weekend.
How it uses OpenF1
The live experience is driven by the OpenF1 MQTT feed (mqtt.openf1.org). A worker subscribes to:
v1/car_data, v1/location, v1/laps, v1/intervals, v1/stints, v1/pit, and v1/race_control
..and fans those out to browsers over a WebSocket, so the Paddock Live page updates in near-real-time during sessions — positions, gaps, tyre stints, pit stops, race-control messages and weather.
For results, classifications and historical sessions I use the OpenF1 REST API (/v1/sessions, /v1/stints, /v1/laps, /v1/pit, /v1/race_control, etc.), which powers a full session archive you can replay after the fact, plus a race-pace heat-map built from lap times.
AI Race Oracle
About 30 minutes before lights-out, an AI model posts its podium prediction for the race — reasoning over qualifying results, each driver's recent and historical form, weather, and current F1 news. The interesting part: after the chequered flag, every call is scored against the actual result, so there's a public, running accuracy tracker across the season. It's an AI that has to show its work and own its misses, not just make vibes-based picks. Qualifying and historical-results data from OpenF1 are a big part of what it reasons over.
The games (all auto-scored off real session data)
Race predictions — podium, fastest lap & first retirement.
Grid Challenge — predict the top-10 qualifying order.
Pit Wall / Strategy — call the race winner's starting tyre, pit-stop count, first-stop window, and whether a safety car appears.
Fantasy league, trivia, and a few arcade-style mini-games.
Everything auto-scores from the data once a session finishes — no manual entry.
Stack (for the curious)
Next.js + React, PostgreSQL, a small live-WS service bridging the MQTT feed to browsers, and Bunny CDN up front. Recently moved it onto a hardened, containerised server.
Would love any feedback — especially from people who know the data well, since edge cases (wet-tyre stints, red-flag classifications, stewards' penalties) are exactly where it gets interesting. And thanks again for OpenF1 — it makes projects like this possible.
Pitbrain.ai
Beta Was this translation helpful? Give feedback.
All reactions