Polestar
Polestar is a free, open-source leveling guide addon for WoW: Forever: an in-game arrow and leveling routes that make sense for every race 1 to 60, plus class quests.
翻译准备中
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
MMAnomaly Fantasy App
翻译准备中
正在加载完整 README。
查看完整 README ↗Invite-only UFC season fantasy for private leagues. Snake draft, 13-slot rosters, scoring based on DraftKings Classic MMA.
MMAnomaly is not affiliated with, endorsed by, or sponsored by UFC or DraftKings.
SQLite is not used. A file database cannot run on Vercel serverless; local and production share the same Postgres schema.
Requires Docker for Postgres.
cp .env.example .env
# set AUTH_SECRET and CRON_SECRET (openssl rand -base64 32)
# DATABASE_URL and DIRECT_URL already match docker-compose.yml
docker compose up -d
npm install
npm run setup # prisma generate + migrate deploy + seed 640 fighters
npm run dev
Open http://localhost:3000.
npm run setup expects Postgres to be reachable at DATABASE_URL. If migrate has not been applied yet, that command creates tables and seeds fighters.
First-time alternative (no migration history): npx prisma db push && npm run db:seed.
| Variable | Purpose |
|---|---|
DATABASE_URL | Pooled or direct Postgres URL (postgresql://… or postgres://…) |
DIRECT_URL | Unpooled URL for prisma migrate deploy. Local Docker: same as DATABASE_URL |
AUTH_SECRET | JWT signing key (required, ≥16 chars). Generate: openssl rand -base64 32 |
APP_URL | Public origin (invite/script URLs). Local: http://localhost:3000 |
CRON_SECRET | Bearer token for /api/jobs/sunday-score and /api/jobs/draft-tick. Generate: openssl rand -base64 32 |
ADMIN_IMPORT_SECRET | Bearer token for POST /api/admin/import. Same value on Vercel and the ops machine. Generate: openssl rand -base64 32 |
BLOB_READ_WRITE_TOKEN | Optional. Stores uploaded team pictures in Vercel Blob. Without it, local dev writes public/uploads/avatars (gitignored). On Vercel without it, members paste a public image URL |
SEED_DEMO | If true, seed also creates demo users/league |
Do not commit real secrets. Copy .env.example and generate values locally / in the Vercel dashboard.
Provision Postgres — Vercel Postgres or Neon (or another hosted Postgres). Copy the connection strings; do not invent them.
Import the GitHub repo at vercel.com/new. Framework preset: Next.js. Build command: npm run build (runs prisma generate, then prisma migrate deploy when DATABASE_URL is set, then next build). Install runs postinstall → prisma generate.
Set environment variables (Production; Preview if you use a separate database):
| Name | Value |
|---|---|
AUTH_SECRET | openssl rand -base64 32 |
CRON_SECRET | openssl rand -base64 32 (Vercel Cron sends Authorization: Bearer <CRON_SECRET> automatically when this is set) |
ADMIN_IMPORT_SECRET | openssl rand -base64 32. Ops sends this as Authorization: Bearer <ADMIN_IMPORT_SECRET> to POST /api/admin/import |
DATABASE_URL | Pooled URL. Vercel Postgres: POSTGRES_PRISMA_URL or POSTGRES_URL. Neon: the pooled (-pooler) URL |
DIRECT_URL | Direct / non-pooling URL. Vercel Postgres: POSTGRES_URL_NON_POOLING. Neon: the non-pooler URL. Same as DATABASE_URL if the host has no pooler |
APP_URL | https://your-project.vercel.app (or your custom domain) |
BLOB_READ_WRITE_TOKEN | Optional. Vercel project → Storage → Blob → copy the read/write token. Enables team picture uploads in production |
Deploy. When DATABASE_URL is set, the Vercel build runs prisma migrate deploy before next build. That is how schema changes reach production: the ops machine cannot open Postgres on port 5432, and Vercel can. The command only applies migrations that are not already recorded. It does not seed and it does not delete scores. is the unpooled URL Prisma uses for migrate; if it is unset, the build uses . A local without skips migrate. If the database is unreachable, the production build fails instead of shipping a schema the app cannot read.
vercel.json schedules Sunday 22:00 UTC. Vercel cron expressions are always UTC.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗
DIRECT_URLDATABASE_URLnpm run buildDATABASE_URLFirst deploy / empty database — seed once (migrate already ran in the build when the database env vars were set):
npx vercel env pull .env.production.local
npx prisma migrate deploy
npx prisma db seed
Equivalent: npm run db:provision with DATABASE_URL and DIRECT_URL pointing at that database.
If you skip the migration folder, npx prisma db push then npx prisma db seed also creates the schema.
Seed loads data/fighters_by_class.json (640 fighters) and, when a card file is present, the UfcCard rows used by Fighting this week. Optional SEED_DEMO=true is for local demos, not production.
prisma/migrations/20260926193600_ufc_card adds UfcCard. prisma/migrations/20261110183000_league_season_dates adds League.seasonStart and League.seasonEnd and sets MMAnomaly League Season 5 to 2026-07-01 through 2026-12-31. The Vercel build applies both. The manual npx prisma migrate deploy above is the fallback when a build could not reach the database. Re-run the seed after replacing the upcoming-card file so the standings panel picks up the new bouts. If that file is absent, seed leaves existing UfcCard rows alone and the page derives the next card from Fighter.nextBoutJson.
Confirm Settings → Cron Jobs shows GET /api/jobs/sunday-score on 0 22 * * 0. Cron runs on production deployments only.