尚未检测到更新。GitHub 发布版本后会显示在这里。
Gooners: live standings and duo matchups for a 12-manager ESPN fantasy basketball league (Next.js, Neon, Vercel)
翻译准备中
正在加载完整 README。
查看完整 README ↗Live site for a 12-manager ESPN fantasy basketball league played as six two-person duos. Each week the duos' combined ESPN stats go head to head across nine categories, and the site keeps the standings, weekly matchups, payouts and punishments up to date on its own.
src/lib/espn.ts reads the league from ESPN's fantasy JSON endpoint (the league is public, so no login is needed). Page views trigger a sync when data is more than 5 minutes old, and a Vercel Cron job runs a backup sync daily.src/lib/scoring.ts sums both managers' raw stats, then compares duos category by category. FG% and FT% come from summed makes and attempts, never from averaging percentages. Turnovers are lower-is-better.src/lib/db/schema.ts): one config row, one row per ESPN team per week, and a week-final flag. Rows typed in by hand are marked manual and are never overwritten by a sync./admin is password protected. It maps ESPN teams to managers, edits duo names, punishments and pairings, and corrects scores.Next.js 16 (App Router, TypeScript), Drizzle ORM, Neon Postgres, Vitest, hosted on Vercel.
pnpm install
cp .env.example .env.local # fill in values
pnpm db:migrate # create tables in Neon
pnpm dev
Without DATABASE_URL the site still runs read-only, pulling straight from ESPN.
pnpm test # scoring and calendar tests
pnpm typecheck
pnpm lint
| Name | Purpose |
|---|---|
DATABASE_URL | Neon connection string. Added automatically by the Vercel Neon integration. |
ADMIN_PASSWORD | Password for /admin. |
CRON_SECRET | Shared secret Vercel Cron sends to /api/sync. |
ESPN_S2, ESPN_SWID | Only if the ESPN league is made private. |