Add student platform: accounts, verified progress, leaderboard, white… - #14
Merged
Conversation
…board A local-first student experience with optional Clerk accounts + Supabase sync layered on top. Everything works with no keys (local-first); accounts, cross-device sync, and the leaderboard switch on once env keys are present. Learning / progress - Auto-drafted "quick check" quiz per lesson (src/lib/quiz.ts), derived deterministically from each lesson's headings with cross-lesson distractors. - LessonQuiz gates the pager: no "Next" until the quiz is passed; passing records verified completion and awards XP. - LessonGate enforces sequential unlock — a chapter opens only once the previous one is complete, closing the sidebar/direct-URL bypass. - Sidebar shows per-chapter state: check when done, lock (dimmed) when locked. Dashboard / gamification (local-first) - /dashboard: XP, levels, streak, badges, redeemable cosmetic rewards (Koda avatars + themes), read-only verified course progress. - /toolkit: Debugging Log + Concept Breakdown note templates. - Whiteboard rebuilt on Excalidraw with named, saved sessions + thumbnail gallery (device-local). Auth (Clerk) + database (Supabase) - Clerk for sign-in (Google + email/password); /login + /sign-up; header shows Log in / account menu. Middleware requires login on lesson routes. - Supabase as the database: profiles + progress tables with row-level security keyed on the Clerk JWT sub claim (supabase/schema.sql). - Bidirectional progress sync: reconcile on sign-in (pull/merge/push), push each completion; leaderboard ranks students by XP. - Graceful no-key fallback throughout; .env.example + docs/SUPABASE_SETUP.md document setup. COPPA/consent flagged before launch. Deps: @clerk/nextjs, @supabase/supabase-js, @excalidraw/excalidraw. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
…board
A local-first student experience with optional Clerk accounts + Supabase sync layered on top. Everything works with no keys (local-first); accounts, cross-device sync, and the leaderboard switch on once env keys are present.
Learning / progress
Dashboard / gamification (local-first)
Auth (Clerk) + database (Supabase)
Deps: @clerk/nextjs, @supabase/supabase-js, @excalidraw/excalidraw.
Summary
Related Issue
Type of Change
Checklist
npm run checkpasses (lint + typecheck + lesson validator + build)If this touches
/learnnpm run learn:checkpassesheadingshas a matchingid="..."in the body componentMath.random(),Date.now(), ornew Date()toLocaleStringorIntl.NumberFormatsrc/components/learn/primitives/, no hand-rolled styled blocks