Skip to content

Add student platform: accounts, verified progress, leaderboard, white… - #14

Merged
samanyugoyal2010 merged 1 commit into
mainfrom
student-progress-platform
Aug 5, 2026
Merged

Add student platform: accounts, verified progress, leaderboard, white…#14
samanyugoyal2010 merged 1 commit into
mainfrom
student-progress-platform

Conversation

@735meis

@735meis 735meis commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

…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.

Summary

Related Issue

Type of Change

  • New lesson
  • Lesson fix or improvement
  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Breaking change

Checklist

  • npm run check passes (lint + typecheck + lesson validator + build)

If this touches /learn

  • A lesson proposal issue was opened and confirmed before writing
  • npm run learn:check passes
  • Every id in headings has a matching id="..." in the body component
  • Cover art added — not the silent fallback
  • Data is seeded at module scope; no Math.random(), Date.now(), or new Date()
  • No toLocaleString or Intl.NumberFormat
  • Composed from src/components/learn/primitives/, no hand-rolled styled blocks
  • No heading ids renamed on an existing lesson (they are permanent links)
  • Read back at 375px and with reduced motion
  • Original work, not paraphrased from another course, book, or blog

…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>
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
new-cwp Ready Ready Preview Aug 5, 2026 6:37pm

@samanyugoyal2010
samanyugoyal2010 merged commit 6115609 into main Aug 5, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants