尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A Next.js application for the 2026 FIA Formula One World Championship: a live-timing tower, lap and sector analysis, tyre strategy, track map, race control, telemetry, results, schedule, drivers, teams and championship standings.
Its organising rule is data integrity. Every dataset carries provenance (provider, mode, source timestamp, fetch time, completeness). The UI shows one of LIVE, HISTORICAL, SIMULATED DATA, OFFLINE or NO DATA, and providers never stand in for each other. A failed live request shows an error, never demo or historical data presented as live.
Requires Node.js 20.9 or later (tested on Node 24).
npm install
npm run dev
Open http://localhost:3000 (it redirects to /timing). No credentials are needed: completed 2026 sessions load from OpenF1's free historical API, results load from Jolpica-F1, and the Demo button in the header opens a fully simulated session.
| Command | Purpose |
|---|---|
npm run dev | Development server |
npm run build / npm start | Production build and server |
npm test | Unit and API tests (Vitest) |
npm run typecheck | TypeScript strict check |
npm run sync:season | Regenerate the 2026 calendar from OpenF1 + Jolpica-F1 |
All variables are server-only (no NEXT_PUBLIC_ prefix). Copy .env.example to .env.local.
| Variable | Required | Meaning |
|---|---|---|
OPENF1_USERNAME, OPENF1_PASSWORD | Only for live timing | A paid OpenF1 account (openf1.org/auth.html). The server exchanges these for a one-hour bearer token at POST https://api.openf1.org/token. Without them, a session in progress shows "Live timing unavailable" with the reason. |
OPENF1_BASE_URL | No | Defaults to https://api.openf1.org |
JOLPICA_BASE_URL | No | Defaults to https://api.jolpi.ca/ergast/f1 |
OPENF1_MIN_REQUEST_SPACING_MS | No | Minimum gap between upstream OpenF1 requests (default 350 ms), to stay within free-tier limits |
| Feature | Live (with credentials) | Without credentials | Demo mode |
|---|---|---|---|
| Timing tower (positions, gaps, intervals, laps, sectors, speed trap, tyres, pits, status) | OpenF1 live REST, polled every 4–30 s (user setting) | OpenF1 historical, completed sessions only; races can be replayed lap by lap | Simulated |
| Track status, session phase, lap deletions | Race-control messages (OpenF1) | Same, historical | Simulated, fictional messages |
| Race-control feed | OpenF1 | OpenF1 | Fictional, prefixed [DEMO] |
| Lap history, lap chart, sector comparison | OpenF1 laps + stints + pits + race control | Same | Simulated |
| Tyre strategy | OpenF1 stints (sourced); tyre age derived and marked * | Same | Simulated |
| Track map | Outline traced from OpenF1 position data for that session; car markers from OpenF1 location | Same; markers at the replay instant | Fictional circuit; simulated markers |
| Telemetry | OpenF1 car_data (speed, throttle, brake on/off, gear, RPM) | Same | Synthetic trace, labelled |
| Weather | OpenF1 | OpenF1 | Simulated, labelled |
| Results | Jolpica-F1 (GP, Sprint, Qualifying); OpenF1 session_result (Practice, Sprint Qualifying) | Same | Not used |
| Championship, drivers, teams | Computed from Jolpica-F1 classified results, cross-checked against Jolpica's published standings | Same | Not used |
| Schedule | lib/config/season-2026.data.json, generated from OpenF1 + Jolpica-F1 | Same | Not used |
Demo mode affects only Live Timing and Telemetry. Other pages always show real published data and say so while demo mode is on.
rb, which is mapped in lib/config/teams-2026.ts.STALE, and a failed poll keeps the last data on screen labelled OFFLINE.Browser UI ──► /api/timing/[resource] ──► OpenF1 provider (live | historical) ──► zod validation ──► normalisation ──► { data, provenance }
──► /api/results, /api/season, /api/circuit ──► Jolpica-F1 / OpenF1
──► demo provider (deterministic, runs in the browser; also exposed at /api/timing/*?mode=demo)
lib/config/: the 2026 grid, teams, scoring and calendar (typed, validated at load).lib/timing/: domain types, formatters, calculations, the track-status state machine, zod schemas, pure OpenF1 normalisation, telemetry alignment.lib/timing/providers/demo/: a fictional circuit and a seeded race simulation. Everything is computed up front, so any instant is a pure function of time.lib/server/: upstream HTTP (rate spacing, retries, cache), OpenF1 and Jolpica clients, the OpenF1 providers, results and standings.lib/client/: settings (localStorage), column visibility (sessionStorage), the timing feed (provider selection, polling, out-of-order protection, freshness) and the demo clock.components/: the shell, timing tower and panels, track map, race control, strategy, telemetry and pages.Deploying to Vercel works as-is: API routes are serverless functions and the cache is per instance.
npm test runs 135 tests covering:
There are no automated browser end-to-end tests; the main flows (timing tower with real and demo data, lap replay, track map, race control, results, schedule, driver/team pages, championship, telemetry, light theme, mobile width) were checked manually in a browser during development.
lib/config/scoring.ts. Displayed totals use the provider's published per-result points, which include penalties. The Championship page shows whether the computed standings match the published standings. Ties are broken by Grand Prix countback.PROVISIONAL.drs channel is not shown. "Overtake enabled/disabled" race-control messages are categorised as such. No battery, energy or brake-temperature channels exist in any source, so none are shown.npm run sync:season to pick up changes.lib/config/drivers-2026.ts was cross-checked against OpenF1's entry list for the United States GP weekend and Jolpica-F1's driver list on 2026-10-24. Results data shows substitute appearances (Yuki Tsunoda at Racing Bulls and Liam Lawson at Red Bull in rounds 12–14). Results and standings always use each session's actual entrant.