BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2,或任何藍牙控制器搭配 MyWhoosh、Rouvy、Zwift 等。可於 iOS、Android、Windows 與 macOS 免費試用。
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
An in-depth fantasy football stats dashboard. Next.js, backed by Postgres via Prisma, on
Vercel — the same setup used by coaching-dash, board-game-night and
honeymoon-research in this folder. Rosters (which players are on which team) live in the
database, not the browser, so they survive a cleared cache or a new device. Player identity,
status/injury info, and weekly stats are synced from Sleeper, free, no API key.檢視完整 README ↗An in-depth fantasy football stats dashboard. Next.js, backed by Postgres via Prisma, on
Vercel — the same setup used by coaching-dash, board-game-night and
honeymoon-research in this folder. Rosters (which players are on which team) live in the
database, not the browser, so they survive a cleared cache or a new device. Player identity,
status/injury info, and weekly stats are synced from Sleeper, free, no API key.
Sleeper has two relevant hosts:
api.sleeper.app/v1 — documented, stable public API. Used here for player identity/status
(/players/nfl, ~12k players) and the current NFL week (/state/nfl). Sleeper asks that the
players endpoint only be called about once a day, since it's a ~15MB payload.api.sleeper.com — undocumented (it's what Sleeper's own app calls), but it's the only place
that still serves weekly stats; Sleeper pulled the stats endpoint from the documented v1 API at
their data provider's request. GET /stats/nfl/{season}/{week}?season_type=regular returns
every stat category Sleeper tracks per player per week (passing/rushing/receiving/defense/
kicking/punting, snap counts, red zone usage, PPR/half-PPR/standard points — 200+ possible
fields), which is what "mirror Sleeper's stats" is built on.Both are free and need no auth, but api.sleeper.com is undocumented — if Sleeper ever changes
its shape, src/lib/sleeper.ts is the one place that would need updating.
Neither Sleeper host carries real kickoff times (their stats/projections payloads only have a bare
date). For that, the Matchups page calls ESPN's free public scoreboard API
(site.api.espn.com, also undocumented, also no key) — see src/lib/espn-schedule.ts. It's called
live per page view (cached 1 hour via Next's fetch cache), not synced into the database.
prisma/schema.prisma:
Team — a fantasy team.Player — one row per real NFL player, id = Sleeper's own player_id (so re-syncing is a
plain upsert). fantasyTeamId points at the team that currently rosters them; null means a
free agent.PlayerStatLine — one row per player per week. stats keeps Sleeper's entire raw stat blob
(it varies a lot by position) as JSON, with ptsStd/ptsPpr/ptsHalfPpr pulled out as columns
since every view needs to sort on those.SyncState — a singleton row tracking the last successful sync (season/week/timestamp), so
the UI knows what it's showing without calling Sleeper on every page load.src/lib/sleeper.ts — the Sleeper API client.src/lib/sync.ts — syncSleeperData(): pulls players + the current week's stats and bulk-
upserts both (raw SQL INSERT ... ON CONFLICT, batched, since Prisma has no native upsert-many).
Pass { backfillWeeks: true } once to pull every earlier week of the season too.src/app/api/sync/route.ts — the route the daily cron hits. Checks the CRON_SECRET header
Vercel sends on cron requests so randos can't trigger a sync.src/app/actions.ts — server actions for creating teams, reassigning a player to a different
team or free agency, and a manual runManualSync (used by the "Sync now" button on the page —
the same function the cron calls, just triggered by hand).vercel.json — the cron: once a day. Why daily, not hourly: Vercel's free Hobby plan caps
cron jobs at once per day; hourly needs the paid Pro plan. Keeping this free was the point.DATABASE_URL and DATABASE_URL_UNPOOLED automatically for all environments.
Note: creating the database alone isn't enough — click Connect to Project on the
database itself (Storage → your database) so it actually attaches to this Vercel project.CRON_SECRET. Project → Settings → Environment Variables → add CRON_SECRET with
a random value (openssl rand -hex 32), for Production (and Preview/Development if you want
the cron tested there too). Vercel automatically sends it as a header on cron-triggered
requests to /api/sync — you don't wire anything else up.prisma generate && prisma migrate deploy && next build, see package.json) creates the
tables on the first deploy by applying prisma/migrations/.vercel.json, currently 13:00 UTC) keeps the current week current
automatically — no more manual syncs needed.npm install
vercel env pull .env # once the project is linked + the database is attached
npm run dev
.env.example shows the shape of .env if you'd rather point at your own local Postgres instead.