Repository navigation
Weekly leagues, friends and push notifications - #28
Merged
Merged
Conversation
League: every stored run earns XP (about one per ten correct characters, less when sloppy, 1.5x when Ranked verifies it; capped per run and per day, and counted once per run). The first XP of a week puts you in a group of up to 30 at your division; when the week ends the top 5 move up and the bottom 5 move down (Bronze, Silver, Gold, Diamond), settled the next time you are seen. /league shows your group with promotion and demotion zones, a countdown, last week's result and Kap wearing your division medal; the results screen shows the XP a run earned. Friends: follow anyone from their profile or by searching GitHub usernames; a friends board ranks you and the people you follow by weekly XP and best speed, and a feed shows their recent runs. Push: Settings turns on Web Push per device. A daily Vercel Cron (12:00 UTC, 19:00 WIB) reminds players whose streak breaks tonight, in their time zone, and being overtaken in your league sends a nudge. The tab-only reminder steps aside when push covers it. New serverless functions: api/social.ts and api/push.ts (10 of 12). Needs npm run setup:social and the VAPID/CRON env vars (npm run setup:push-keys). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018xNjY7412Rp5bFuw5h69yu
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
League (
/league)league_xp.medallook drawn in both 2D and 3D.Friends
Push
public/push-sw.js, which handles push events and notification clicks.Plumbing
api/social.tsandapi/push.tsbring the total to 10 of 12 functions. The sharedroute()helper handles CORS, method checks, auth and errors.createJWT.scripts/setup-appwrite-social.mjs(npm run setup:social) creates the collections and adds a profile name index for search.npm run setup:push-keysprints the VAPID keys andCRON_SECRET.appwrite/schema.mddocuments the new collections.Setup needed after merge
npm run setup:socialnpm run setup:push-keys, then addVAPID_PUBLIC_KEY,VAPID_PRIVATE_KEY,VAPID_SUBJECTandCRON_SECRETin Vercel and redeploy.Test plan
tsc -b, the API typecheck and the build pass.🤖 Generated with Claude Code
https://claude.ai/code/session_018xNjY7412Rp5bFuw5h69yu
Generated by Claude Code