Gradeful
CoursesPricingAbout

How Gradeful connects

Raw markdown

How everything connects

This is the map. Detail for every button lives in 02–06. Marketing CTAs that start these flows are in 01-marketing-pages.md.

Access words used below:

  • public — no login
  • logged-in — Supabase Auth session
  • onboarded — profiles.onboarding_completed_at set, or name + AUB/LAU already filled (major and campus are optional)
  • subscribed — at least one user_access row with payment_status in paid/confirmed and expires_at null or in the future (admins skip this for /my-courses)

proxy.ts gates:

  • / — if a Supabase Auth cookie is present and userHasActiveSubscription is true (user_access paid/confirmed, expires_at null or in the future) → /dashboard. Anonymous visitors and logged-in users with no active access still get the marketing homepage. Other public routes (/pricing, /courses, legal) are not redirected.
  • /login, /signup — if already logged in → /auth/home (with safe next when present)
  • /dashboard, /welcome, /admin, /my-courses — if anonymous → /login?next=…
  • /my-courses/{slug} and /dashboard/course/{slug} — also require subscribed (else /pricing); /dashboard and the /my-courses home alias do not
  • /checkout — session refresh; the page itself sends anonymous users to /login?next=/checkout?… and incomplete profiles to /welcome?next=…

Active access is not “logged in” and not a historical order. Authoritative read: user_access where user_id matches, payment_status in paid/confirmed, and expires_at is null or > now(). Expired or revoked rows do not count. Canonical student home is /dashboard.


1. Registration and first login

Loading diagram…

Tables

StepWritesReads
Google / email signupauth.users; trigger inserts profiles (id, email, full_name, avatar_url, nickname; role defaults to student)—
Email loginAuth session cookies onlyauth.users
/auth/callbackSession cookies; optional Resend welcome email if profiles.created_at ≤ 5sprofiles.created_at
/auth/home—profiles.full_name, university, onboarding_completed_at
/welcome submitprofiles.full_name, university, optional campus/major/programs, nickname, onboarding_completed_at, updated_atsame fields as prefill

Where login is forced

  • Any /dashboard, /welcome, /admin, /my-courses hit while logged out → /login?next=…
  • /checkout without a session → /login?next=/checkout?plan=…
  • Workspace layout and checkout bounce incomplete name/university to /welcome?next=…

After login, where you land

  • Default next is /auth/home
  • /auth/home → /welcome?next=… or the preserved course/checkout path; default home is /dashboard only when userHasActiveSubscription is true, otherwise /
  • Course-preview signup uses /signup?next=/checkout?plan=focus&course={uuid}

Phone signup is not offered. Phone sign-in was removed from /login (zero hosted identities).

Full page inventory: 02-auth-onboarding.md Product rules: ../onboarding.md


2. Checkout and access grant

Loading diagram…

Plan slugs on the URL vs database ids

URL ?plan=Display namePLANS / orders.plan / user_access.plan_type
focusFocussingle_course (also accepted as focus)
balanceBalancetwo_courses
fullloadFull Loadsemester_access
crunchCrunchexam_crunch

Catalog: lib/payments/catalog.ts. Full Load is up to 6 courses; Crunch is up to 4. New grants do not write schedule_verifications.

Live writes

MomentTable
Continue to secure paymentorders (status=pending, payment_provider=whish, course_ids, registered_credits, whatsapp, email = uni email, amount, external_id, collect_url)
Whish paid (status poll or callback)orders.payment_status=paid; grantAccess → user_access (payment_status=paid, course_ids, expires_at, payment_reference). New grants do not insert schedule_verifications.
payment_eventsServer audit around create/reconcile (no UI)

Entitlement reads use user_access.course_ids. Junction tables may be dual-written and are not the read source of truth.

Not the live CTA path (removed)

  • Legacy reservation modal / POST /api/reservations
  • Legacy POST /api/orders
  • Placeholder payment sessions

profiles is not updated at checkout. University on the form is stored on orders, not on the profile.

Paid course lists still read user_access.course_ids / orders.course_ids. Junction tables (access_grant_courses, order_courses) are dual-written when present and are not the read source of truth yet.

Full page inventory: 03-checkout.md


3. After pay: dashboard vs my-courses

Loading diagram…

/dashboard/course/{slug}/… redirects to /my-courses/{slug}.
/my-courses/library|progress|semester-plan redirect to the /dashboard/… twins.

Someone who is logged in but has not paid can still open /dashboard (empty onboarding banner). /my-courses without a slug redirects to /dashboard. Course URLs /my-courses/{slug} still require a paid grant.

Full page inventory: 04-dashboard-and-workspace.md


4. Settings (every tab)

Opened over the workspace (not a standalone /settings page). Gear, account flyout Settings, or /dashboard?settings={tab}. Query is stripped after open. Legacy /settings/* redirects into these tabs.

Tab idLabelWhat it does
profileProfileEdit name, nickname, photo, university/campus/major; badge display
notificationsNotificationsFour email/reminder toggles on profiles.notification_preferences
billingPlan & billingActive user_access + Whish orders history; Upgrade or change plan → /pricing
securitySecurityPassword, Google link/unlink, phone display, backup password, this-device time
dangerDanger zoneSign out → /; delete account (type DELETE)
helpHelp & contactWhatsApp, request a course, policy links

Dark mode and extra languages are not shipped. Appearance and Language panes and server actions were removed. /settings/appearance and /settings/language still redirect to profile.

Full inventory: 05-settings.md


5. Study: how a workspace is used

Loading diagram…

Course settings (/my-courses/{slug}/settings) writes flashcard_deck_settings and can upload syllabuses. Exam dates are read from course_events.

Full inventory: 06-study-views.md


6. End-to-end student path (one sitting)

  1. Land on / or /pricing → Get Focus (or another plan CTA).
  2. /checkout?plan=focus → if logged out, Sign in / Create account with next back to checkout.
  3. New account: verify email if needed → /auth/home → /welcome (name, AUB/LAU, major) → /dashboard (still no courses).
  4. Return to checkout (next) → pick course(s) → details → Continue to secure payment → Whish OTP.
  5. /checkout/payment/success polls until Payment confirmed → Go to my courses.
  6. Dashboard shows the course card → open /my-courses/{slug} → Notes / Flashcards / Quiz.
  7. Gear → Settings: nickname, photo, notification toggles, billing (active access), security.
  8. Sidebar Progress / Library / Semester Plan read the same study writes (content_progress, study_sessions, library_items, exam_schedules, course_events). Syllabus upload is optional and private.

7. Connection cheat sheet

FromToHow
Header Get access / Add more courses/checkoutnavCheckoutHref
Header Sign in/login—
Header Dashboard (mobile logged-in)/dashboard—
Account flyout Upgrade plan/pricingthen back into checkout
Account flyout Settings / Get helpSettings modal or /dashboard?settings=workspace vs marketing header
Checkout success Go to my courses/dashboardafter user_access grant
Dashboard course card/my-courses/{slug}buildCourseOverviewHref
Course Get access (public catalog)/checkout?plan=focus&course={id}preselects that course
Non-subscriber /my-courses/dashboard (free-state home)alias redirect; course slugs still gated
Non-subscriber /my-courses/{slug}/pricingproxy
Incomplete profile any workspace page/welcomelayout
Logout/Auth sign-out
Delete account/ (or /login if unauthorized)auth.admin.deleteUser

8. Tables the student product actually uses

TableWritten byRead by
auth.userssignup, password change, deletelogin, settings security
profilessignup trigger, welcome, profile/avatar/notifications, nicknameheader, dashboard greeting, settings, /auth/home
ordersWhish checkout create + reconcilepayment return status, settings billing
user_accessgrantAccess after paid Whishdashboard courses, billing, proxy /my-courses, nav CTA
courses / course_packs / universities / course_modules / module_pack_itemsadmincatalog, checkout picker, study
content_progressnotes, quiz complete, flashcard scheduled reviewoverview, resume, progress
flashcard_sessions, flashcard_card_states, flashcard_review_logs, flashcard_deck_settingsflashcard UI / course settingsflashcards + progress
quiz_attemptsquiz completeprogress quiz notes
study_sessionsstudy heartbeatstreak, study hours, progress
library_itemssave note / uploadlibrary
syllabusessyllabus modalsemester plan, course settings
course_eventsadmin / syllabus parseexam banner, semester plan, course settings
notificationsserver triggersdashboard bell
user_badgesstreak/badge jobssettings Profile “Showing up”
user_streaksstreak computesidebar streak card
Gradeful

Course-specific study packs for AUB and LAU students. Built for focused self-study.

Gradeful is an independent study-support service. Universities named on this site are listed only so you can match a Gradeful pack to the course you are taking. Those universities do not provide, sponsor, or endorse Gradeful, and Gradeful does not claim access to their official materials or assessments.

© 2026 Gradeful.

Platform

HomeCoursesPricing

Policies

Privacy PolicyTerms of ServiceRefund PolicyAcademic Integrity