Make bare /race-hub resolve to a completed session and never open empty post-session analysis for a future race. - Backend: add `default_analysis_session` to the Weekend context. It never resolves to a future session (picks the richest completed session, ties toward the later one; 0 when everything is upcoming). Existing `default_session_key` and deep links are unchanged. - Frontend default resolution prefers the most recently completed weekend (`pickAnalysisFocusMeeting`) and consumes `default_analysis_session`, falling back to the switcher when only upcoming sessions exist. - New `sessionState` lib maps timing + coverage to user language (upcoming/live/preparing/partial/ready/cancelled); the session rail, active sub-bar, and WeekendSwitcher now label states instead of raw x/11 counts. - Future sessions render a purpose-built PreSessionView (expected availability + countdown) instead of empty Winner/Podium/Pole/Strategy/Compare cards. - Analysis navigation regrouped into Story / Analysis / Data & Context; every existing tab is preserved. Diagnostics (renamed from Data Status) is now a secondary action and the raw dataset strip is hidden behind an explicit toggle, so operational coverage no longer precedes fan content. - Loading/error states offer Retry and a path back to Weekend. Tests: Go query tests for future-exclusion; Vitest for default selection, future pre-session, partial state, error/retry, grouped nav, and sessionState; hermetic Playwright for bare/completed/future/return-to-Weekend; new race-hub-future visual snapshots. Seed adds a far-future session inside the Monaco meeting (kept in-meeting so Command Center focus is unaffected). Note: `default_analysis_session` is an additive field on the existing `/weekend` contract (no new endpoint), per the spec's "context contract" scope. Co-authored-by: Cursor <cursoragent@cursor.com>
box-box
"Box, box. Box, box." Every F1 race engineer, ever.
box-box is an unofficial F1 race-weekend command center: live timing, Race Hub analytics, championship context, paddock briefing feeds, and local historical data in one Go + React app, with a preserved Bubble Tea TUI.
Live demo: box-box.amantahiliani.com
What It Does
- Command Center: current race-weekend home with GP identity, live status, schedule, championship leaders, and direct analysis links.
- Race Hub: session workspace for overview, race story, strategy, laps, weather, race control, and dataset coverage.
- Live Timing: official F1 SignalR feed bridged through the Go server to the browser via SSE.
- Championship View: standings, form, teammate context, cumulative points, and a simulator.
- Paddock Briefing: RSS/Atom news ingestion for a local race-weekend briefing surface.
- Local-first history: OpenF1 data ingested into a SQLite domain database for fast historical browsing.
- Terminal Mode: Bubble Tea TUI with standings, calendar, driver profiles, live timing, track map, battles, pit window, and replay.
Quickstart
git clone https://github.com/AmanTahiliani/box-box.git
cd box-box
npm install
npm install --prefix frontend
npm run build --prefix frontend
go run ./cmd/main.go --web
# http://localhost:8080
For a local frontend development loop with seeded data, see docs/getting-started.md.
Project Shape
| Area | What lives there |
|---|---|
cmd/main.go |
Entry point for TUI, web server, and ingestion CLI |
internal/web/ |
Go REST API, SSE live bridge, SPA serving |
internal/live/ |
Official F1 SignalR client shared by Web and TUI |
internal/store/, internal/ingest/, internal/query/ |
Local SQLite domain database, ingestion, and read models |
internal/ui/ |
Bubble Tea TUI |
frontend/ |
React + Vite + TypeScript web app |
tests/ |
Playwright e2e and visual coverage |
The Web UI is local-first and should call the Go APIs under /api/v1/...; it should not read OpenF1 directly.
Documentation
- Getting Started: install, build, run modes, TUI keybindings, and web routes.
- Data and Operations: ingestion, environment variables, local files, and live timing notes.
- Testing: Go, frontend, e2e, and visual regression commands.
- Architecture Notes: deeper design rationale, data-source decisions, and phase history.
Status
Pre-beta and actively developed. The Web UI is the primary surface; the TUI is preserved and still useful for terminal workflows. Live timing depends on F1 broadcasting timing data, so it is only fully active during live sessions.
License
MIT © Aman Tahiliani
Unofficial project; not associated with Formula 1 or the FIA.
