OpenAthlete
AGPLv3 endurance training platform: EU-oriented hosting, transparent CTL/ATL/TSB logic in code, self-hosting, and full export. Built in Grenoble.
NFL、NBA、MLB 台灣時間賽程、球隊與聯盟入門、中文運動商業週報與美國觀賽旅遊規劃。
Translation pending
Sports & fitnessTypeScript · PLpgSQLGitHub @eklovecolorful-dotcomOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗依《美國三大職業運動:商業產業 × 賽事 × 中文平台事業手冊》(Playbook 02)建立的 Next.js 專案。
三層產品:免費台灣時間賽程與台灣球員追蹤 → 付費運動商業週報(Stripe)→ 美國觀賽旅遊(轉介合法旅行社)。
| 項目 | 選擇 |
|---|---|
| 框架 | Next.js 16 App Router(Cache Components、Partial Prefetching)、TypeScript |
| 樣式 | Tailwind CSS v4,390px 手機優先 |
| 資料庫/登入 | Supabase(Postgres + RLS + Email magic link) |
| 金流 | Stripe Checkout + Customer Portal + Webhook |
| 排程 | Vercel Cron 每 15 分鐘同步賽程 |
| Resend(觀賽詢價轉寄旅行社) | |
| 測試 | Vitest(時區/夏令時間) |
npm install
npm run dev # http://localhost:3000
沒有設定 Supabase 時,網站會使用示範資料(src/lib/sports-data/mock.ts、content/brief/*.md),每張賽程卡都會標示「示範資料」。
cp .env.example .env.local # 填入下列各項
.env.localnpx supabase login
npx supabase link --project-ref <your-ref>
npm run db:push # supabase/migrations/*
# 再到 Dashboard → SQL Editor 執行 supabase/seed.sql
https://<domain>/auth/callbackSTRIPE_PRICE_BRIEF_MONTHLY / STRIPE_PRICE_BRIEF_YEARLYnpm run stripe:listen # 把顯示的 whsec_... 填進 STRIPE_WEBHOOK_SECRET
https://<domain>/api/stripe/webhook,訂閱事件:
checkout.session.completed、customer.subscription.created|updated|deleted/pricing 頁顯示的價格目前是佔位文字,記得在 src/lib/stripe.ts 改成跟 Stripe Price 一致SPORTS_DATA_PROVIDER=espn 會讀取 ESPN 公開比分(真實賽程與比分,免金鑰)。它不是授權資料,Vercel 正式環境會自動停用。mock 不顯示任何比賽(避免錯誤比分);DEMO_SCHEDULE=true 只顯示隨機版面測試資料,不顯示比分。sportsdataio、填入 SPORTSDATAIO_API_KEY,並先對照你方案的 API 文件,確認 src/lib/sports-data/sportsdataio.ts 裡的欄位對應。CRON_SECRET)vercel.json 已設定每 15 分鐘的 Cron。注意:每 15 分鐘的頻率需要 Vercel Pro;Hobby 方案只能每天執行一次。src/
app/
page.tsx 首頁:今日賽程、MLB 勞資倒數、三層產品
schedule/[league]/ 台灣時間賽程(?date=YYYY-MM-DD)
teams/[league]/[team]/ 92 支球隊靜態頁(SEO)
leagues/[league]/ 聯盟入門:賽制、季後賽、制度、重要日期
calendar/ 三大聯盟重要日期
insights/ · insights/[slug]/ 深度分析:經營模式、營運、商業故事(content/insights/*.md)
business/ · business/topics/[topic]/ 產業商業與主題頻道(轉播權、勞資…)
brief/ · brief/[slug]/ 週報列表/內文(RLS 付費牆)
pricing/ · account/ 訂閱方案/我的帳號
trips/ 觀賽詢價(UC-03:2027 MLB 只收候補)
login/ · auth/callback/ Email magic link
api/stripe/{checkout,portal,webhook}
api/cron/sync-schedule/ Vercel Cron → 授權 API → upsert games
legal/ 隱私權、退款(草稿)、免責聲明
components/ GameCard、PaywallCard、TopicChips…
lib/
time.ts (+ test) UTC ↔ Asia/Taipei,夏令時間安全
catalog.ts 聯盟、球隊(seed 的來源)
data/ 'use cache' 資料存取層
sports-data/ 資料供應商介面:mock / SportsDataIO
supabase/ server / client / public / admin / proxy
proxy.ts 更新 Supabase session、保護 /account
supabase/migrations/ 0001_core.sql、0002_billing_content.sql
features/ BDD 規格(台灣時間、付費牆、觀賽詢價)
docs/ P1–P8 規劃文件、ADR、12 週路線
.claude/commands/ /weekly-biz-brief、/sync-schedule、/gen-team-pages、/implement
content/brief/ 週報 Markdown
| 指令 | 用途 |
|---|---|
npm run dev / build / start | 開發/建置/正式啟動 |
npm test | 時區與夏令時間測試 |
npm run typecheck / lint | 型別檢查/ESLint |
npm run db:seed:gen | 由 catalog.ts 重新產生 supabase/seed.sql |
npm run db:push | 套用 migrations |
npm run brief:publish 2026-41 | 發佈已查證的週報(內文還有 [待查證] 時會拒絕發佈) |
上線前檢查清單見 docs/roadmap.md。