尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗CoasterTrak is an MVP rollercoaster tracking app with:
npm installcopy .env.example .env.local.env.local:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYSYNC_CRON_SECRETRESEND_API_KEY (friend notification emails)EMAIL_FROM (optional, defaults to CoasterTrak <[email protected]>)supabase/schema.sqlwikidata_coasters.json): supabase/migrations/003_catalog_storage_bucket.sqlnpm run devnpm run data:ingest-wikidatanpm run data:normalize-wikidata -- --latestnpm run data:materialize-snapshot -- --latestnpm run data:enrich-wikipedia -- --enrich-limit 200npm run data:publish-catalog -- --apply (requires service role key)curl -X POST "http://localhost:3000/api/sync/catalog" -H "Authorization: Bearer <SYNC_CRON_SECRET>"/ - landing page/guides - original coaster credit guides/map - interactive map with country and name filter/login - sign up / sign in/wishlist - user wishlist/stats - personal stats dashboard/api/health - health endpointPOST /api/sync/catalog - protected Wikidata catalog sync (JSON → Supabase).Manual units render only when both are set:
NEXT_PUBLIC_ADSENSE_ENABLED=trueNEXT_PUBLIC_ADSENSE_GUIDE_SLOT=<slot id from AdSense>Ads are mounted on guides and selected content pages only — never on thin stubs, login, or app chrome. Keep the flag off until AdSense approves the site.
Vercel Cron hits GET /api/cron/weekly-digest Sundays 18:00 UTC (Authorization: Bearer <SYNC_CRON_SECRET>).
Users get digests by default (notify_weekly_digest). They can uncheck at signup or under Account → Weekly credit digest. Apply migrations 20261006180000_notify_weekly_digest.sql and 20261006183000_weekly_digest_default_on.sql.
.env.local in Vercel project settings.Primary catalog (map pins, coaster rows): built by the CoasterTrak Data pipeline and stored as data/wikidata_coasters.json (working snapshot). The server reads that file from the deployment root, or from WIKIDATA_COASTERS_URL if set (recommended for Vercel, since the JSON is gitignored). Optional override: WIKIDATA_COASTERS_PATH.
Supabase Storage (recommended): apply supabase/migrations/003_catalog_storage_bucket.sql once. Monthly CI gated publish uploads the approved snapshot to the public catalog bucket.
Set WIKIDATA_COASTERS_URL to that URL in Vercel (and locally if you test remote sync).
Optional env overrides: WIKIDATA_STORAGE_BUCKET (default catalog), WIKIDATA_STORAGE_OBJECT (default wikidata_coasters.json), WIKIDATA_COASTERS_ALLOWED_HOSTS (comma-separated host allowlist for WIKIDATA_COASTERS_URL; by default your Supabase project host is allowed).
Avoid checking multi‑MB JSON into git; generate in CI and upload to Storage, then point WIKIDATA_COASTERS_URL at the stable URL.
The GitHub Action .github/workflows/refresh-wikidata.yml runs monthly:
ingest → normalize → materialize → Wikipedia enrich → analyze → validate → gated publish (--apply) → DB Wikipedia backfill
For a full park/coaster upsert from the same Storage URL, Vercel’s weekly cron hits /api/cron/sync-catalog so syncCatalogFromWikidata re-reads WIKIDATA_COASTERS_URL.
Required env vars for server-side sync:
SUPABASE_SERVICE_ROLE_KEYSYNC_CRON_SECRETWIKIDATA_COASTERS_URLSecurity notes:
/api/sync/catalog, /api/cron/sync-catalog) require Authorization: Bearer <SYNC_CRON_SECRET> and are rate-limited.Run manually (local dev server, after materializing a snapshot):
curl -X POST http://localhost:3000/api/sync/catalog -H "Authorization: Bearer <SYNC_CRON_SECRET>"vercel.json schedules /api/cron/sync-catalog weekly (Sundays 05:00 UTC — Wikidata catalog apply).
Stats come from Wikidata (SPARQL → CoasterTrak Data pipeline) and optional Wikipedia enrich/backfill. Empty stats usually mean Wikidata has no quantity, the snapshot was never published, or enrich has not run yet.
Wikipedia infobox DB backfill (optional): for rows that already have wikidata_id but still lack numbers:
npm run wikipedia:backfill — fills null columns only; use --dry-run to preview.Wikidata exposes RCDB IDs (property P2751). Catalog sync stores them on coasters.rcdb_id and coaster pages may deep-link to rcdb.com.
We do not fetch, scrape, or import RCDB stats or other content. RCDB does not share data with other projects; identifiers come from Wikidata only.
Backfill IDs from the Wikidata snapshot: npm run data:backfill-rcdb-ids after migration 20260904120000_coasters_rcdb_id.sql.
Compare the live catalog against ThemeParks.wiki (existence / naming — not stats):
npm run data:match-themeparks — auto-matches all catalog parks by name + cached DB links; writes data/themeparks-match-report.jsonnpm run data:match-themeparks -- --write-db — persists links, findings, and review queue/admin/data/catalog20260811122151_*, 20260811122641_*, 20260811123330_*data_coaster_name_aliases · field overrides: data_coaster_field_overridesLives under src/lib/coastertrak-data/.
data:ingest-wikidata
↓
data:normalize-wikidata
↓
data:materialize-snapshot → data/wikidata_coasters.json
↓
data:enrich-wikipedia
↓
data:analyze-catalog
data:validate-wikidata
↓
data:publish-catalog [--apply]
| Command | Purpose |
|---|---|
data:ingest-wikidata | Immutable SPARQL bindings → data/raw/wikidata/{runId}/ |
data:normalize-wikidata | Deduped rows → data/processed/wikidata/{runId}/ |
data:materialize-snapshot | Copy processed → working data/wikidata_coasters.json |
data:enrich-wikipedia | Fill gaps from enwiki infobox HTML |
data:backfill-rcdb-ids | Set coasters.rcdb_id from Wikidata snapshot P2751 (IDs only) |
data:validate-wikidata | Quality report → data/reports/wikidata/{runId}/ |
data:analyze-catalog | Dedupe/conflicts + ThemeParks snapshot verify |
data:publish-catalog | Dry-run by default; --apply uploads to Supabase |
npm test | Vitest unit tests (also in .github/workflows/ci.yml) |
Gated publish applies known fixes + approved data_coaster_field_overrides before Storage/DB upload. Catalog sync endpoints read the Storage URL that gated publish updates.