尚未检测到更新。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.