尚未偵測到更新。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.