尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Live stat tracker for 'Bobby's Triple Threat' on Food Network
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Fan-made stat tracker for Food Network's Bobby's Triple Threat. Live at triple-threat.vercel.app.
Titan Tracker is a data-driven Next.js app that presents performance analytics for the show's titans, including rankings, records, per-round performance, and best score breakdowns. The page is generated statically at build time from PostgreSQL so it loads fast and remains cache-friendly, and it regenerates on demand when a new episode is entered through a password-gated admin portal.
.sql files, one TypeScript type per table, components that only render/admin) for entering episodes, with a dry-run preview (a real transaction, rolled back) before anything is writtenpg) on Neonapp/
layout.tsx # Root layout shared by every route: <html>, <body>, global CSS
styles/ # Global CSS: design tokens (variables.css) and base styles
(public)/ # Route group (not part of the URL) for the public site
layout.tsx # Header, footer, site metadata, analytics
page.tsx # The homepage ("/"): fetches data and composes sections
admin/ # /admin route: layout + page (password-gated episode entry)
metadata.ts # SEO / OG metadata
robots.ts, sitemap.ts
components/
Layout/ # Site header, nav, footer
Cards/ # Win/loss, leaderboard, per-titan cards, notes
Admin/ # Admin portal UI: login, episode form, review panel (+ shared.module.css)
HeroBanner.tsx, Section.tsx, ShareButtons.tsx
lib/
db.ts # PostgreSQL pool (+ parsing COUNT/AVG results as numbers)
queries.ts # Public-site data access: runs lib/queries/*.sql, shapes results
queries/ # The SQL, one file per query (+ sql-loader.cjs, see below)
types.ts # One row type per table, plus shaped view types
ranking.ts # Rank labels and the active/inactive split
format.ts # Display formatting (averages, win %, name slugs)
admin/ # Admin logic: auth, server actions, data access, validation, draft autosave
*.test.ts # Unit tests, next to the code they cover
docs/
DATABASE.md # Schema, keys, rules, handy queries, schema history
ADMIN.md # How the admin portal works
.githooks/pre-push # tsc + ESLint + Prettier + tests before every push
.github/workflows/ # The same checks in CI
lib/queries/**/*.sql and are built into the bundle as strings (a small Turbopack loader, lib/queries/sql-loader.cjs, wired up in next.config.mjs).lib/queries.ts runs them and shapes the rows into typed objects and lookup maps (getTitans, getWinLoss, getAvgScores, …).app/(public)/page.tsx calls those in parallel at build time; app/(public)/layout.tsx adds the header, footer, site metadata and analytics.force-static: built once, served from the CDN. Committing an episode through /admin calls revalidatePath("/"), so new stats appear within seconds without a redeploy.lib/queries.ts (public) and lib/admin/queries.ts (admin) expose get* functions that return render-ready data. getTitans is wrapped in React's cache(), so the page and the site header share one query per render..sql files that can be opened and run in a SQL client. They're compiled into the bundle rather than read from disk at runtime, which matters because on-demand regeneration runs in a serverless function where loose files aren't guaranteed to exist. Postgres returns COUNT/AVG results as strings by default; lib/db.ts parses them as numbers once, so the SQL needs no JavaScript-motivated casts.lib/types.ts has one type per table (Titan, Episode, Round); query and view types are built from them with Pick/Omit, so a column is described in one place.NOT NULL and value rules (scores within range, max score by round, one round per titan per episode), so bad data can't get in from anywhere. The admin form validates the same rules first to show friendly, specific messages. See docs/DATABASE.md.(public) route group gives the public site its header, footer, metadata and analytics; /admin uses only the minimal root layout, so it never runs the header's query or loads analytics.docs/DATABASE.md rather than managed by a migration tool.Create .env.local:
POSTGRES_URL=postgres://username:password@host/database
ADMIN_PASSWORD=choose-a-password # gates /admin; also set in Vercel project settings
next build prerenders the homepage from the database, so POSTGRES_URL must be set for builds too (a missing value makes pg fall back to a local Postgres and fail with relation "titan_rounds" does not exist). Vars pulled with vercel env pull land in .env.development.local, which next dev reads but next build doesn't; a local, gitignored .envrc (direnv) can export them for builds.
Requires Node 24 (pinned in .nvmrc).
npm install
npm run dev
The app runs at http://localhost:3000.
npm run dev # dev server
npm run build # production build
npm start # serve the production build
npm run lint # ESLint (Next.js + TypeScript rules)
npm test # unit tests (Vitest)
npm run test:watch # tests in watch mode
npm run format # format with Prettier
npm run format:check # check formatting
A tracked pre-push hook (.githooks/pre-push) type-checks with tsc, lints with ESLint, checks formatting and runs the tests before every push; npm install enables it (the prepare script sets core.hooksPath). GitHub Actions runs the same checks on every push and pull request.
Titan Tracker showcases practical full-stack analytics work: SQL modeling and database integrity, a strongly typed data-access layer, stat-focused frontend presentation, and a rendering strategy that keeps a static site fresh.