尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Run through December. Every day you run 1 km, an Advent door opens and you give the ornament inside to a friend's tree. Friends hang kawaii pixel ornaments on your tree, and every message stays sealed until Christmas Day.
Runners log in with Strava, and their runs open the doors. Trees, ornaments and progress are stored in Supabase. Without logging in, the app runs as a demo in the browser, so it stays clickable without a Strava account.
| Route | Screen |
|---|---|
/ | Landing: sign up, or log in with Strava (straight to Strava, no login page) |
/signup | Pick a tree name → connect Strava → confirm time zone |
/tree | My tree, countdown, tap an ornament to see the sealed sheet |
/tree/photo | Photo booth with your tree |
/t/[nickname] | A friend's tree (try /t/ayop, the official AYOP tree) |
/t/[nickname]/hang | Hang or edit your ornament (one per tree) |
/t/[nickname]/done | Ornament hung |
/calendar | Advent doors with km per day, catch-ups, weekly bonus |
/gift | Unwrap an earned ornament → give it to a friend |
/friends | Search runners, follow / unfollow trees, requests, invite link |
/me, /me/given | Stats, ornaments given, settings, log out, disconnect Strava |
/ornaments | Catalogue of every ornament |
/christmas | Dec 25 unlock preview (demo messages) |
/about | How it works |
npm install
cp .env.example .env.local
npm run dev
.env.example lists every key. The public Supabase URL and publishable key are filled in (enough for trees and the demo). Copy it to .env.local and fill the empty server-only values. Ask the project owner for them; never commit them:
# Vercel: yes
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=...
SUPABASE_SERVICE_ROLE_KEY=sb_secret_...
STRAVA_CLIENT_ID=...
STRAVA_CLIENT_SECRET=...
SESSION_SECRET=... # any long random string
APP_URL=http://localhost:3000 # Vercel: https://advent.ayop.run (staging: https://staging-advent.ayop.run)
# Vercel: leave unset so production stays on December
NEXT_PUBLIC_ADVENT_MONTH=current # optional, local only
CHRISTMAS_OPEN=1 # optional: open every tree's messages now (never on Production)
The Strava app at strava.com/settings/api must have Authorization Callback Domain ayop.run, which covers both advent.ayop.run and staging-advent.ayop.run (no https://, no path). localhost is always allowed, so local login still works. Until Strava approves the app, only its owner can connect.
Supabase setup, migrations and how to look at the data: see supabase/README.md.
lib/data.ts, lib/me.ts, lib/friends.ts, lib/requests.ts: what pages call. They talk to the server routes, and fall back to the browser demo when signed out.lib/demo/: the browser demo (localStorage). New demo-only behaviour goes here.lib/calendar.ts: door and catch-up rules, shared by the server and the pages.app/api/: server routes (Strava login, trees, hanging, progress, friends). They use the Supabase secret key through lib/server/.lib/sprites.ts: all pixel art, drawn in code on one shared 12×12 grid.| Staging | Production | |
|---|---|---|
| Branch | staging | main |
| Site | https://staging-advent.ayop.run (private: sign in to Vercel) | https://advent.ayop.run |
| Vercel environment | Preview | Production |
| Supabase project | omrqmxoketiukledntok | dcmwhlwwawhyggabjnlp |
| Strava app | Advent of Running (shared; callback domain ayop.run) | same |
Work on a feature branch, merge it into staging, check it on the staging site, then merge staging into main to release. Use Create a merge commit, not squash, to avoid conflicts on the next merge. Other branches also deploy as previews and use the staging keys, but Strava login only works on the two ayop.run addresses.
Keys live in Vercel under Project → Settings → Environment Variables: the production values on Production, the staging values on Preview. .env.example lists every key. Leave NEXT_PUBLIC_ADVENT_MONTH unset on both so the calendar runs in December.
Before launch, production shows only a coming-soon page (door 1, a countdown to December 1 in the visitor's time zone, and an email sign-up for the launch news). It's switched on by COMING_SOON=1 on Vercel's Production environment; remove it and redeploy to launch. Staging leaves it unset and runs the full app; the page itself is at /coming-soon on both. Sign-ups are saved in the launch_signups table (migration 006_launch_signups.sql); notified_at stays empty until the launch email is sent.
Database changes: add a numbered file in supabase/migrations/, run it on the staging project first, and on production once staging works. To set up a new, empty project, run schema.sql, seed.sql, then every migration in order.
next/og.The full catalog of 100 ornaments and the style rules for the artist live in the ornament catalog spreadsheet.