Skip to content

feat(onboarding): skippable first-run questionnaire that feeds the product #204

Description

@AnayDhawan

Blocked by #203.

A short questionnaire after first sign-in: graduation year, board, field, country, and how they found StudyMap.

Files

  • src/app/onboarding/page.tsx
  • src/components/onboarding/onboarding-flow.tsx - 'use client'
  • src/lib/user-profile.ts - mirroring src/lib/user-places.ts

The questions

  1. When are you graduating? Current year through +6.
  2. What board are you on? IB, IGCSE, CBSE, ICSE, A-Levels, AP, State board, Other.
  3. What field? STEM, Humanities, Commerce, Arts, Undecided.
  4. Which country? The 13 with competition pathways, plus Other.
  5. How did you find StudyMap? GitHub, Google, Instagram, Friend or school, Reddit, Other with a free-text box.

Every answer has to change something the user sees

This is the acceptance bar, not a nice-to-have. A questionnaire whose answers feed nothing is a survey wearing an onboarding costume, and it taxes signup for our benefit rather than theirs.

Skippable, resumable, not a gate

  • Trigger on first sign-in when no profile row exists. Redirect from the auth callback, not from a global layout check that runs on every navigation.
  • A visible "Skip for now" on every step, and a skip must not re-prompt on the next sign-in. Record that the user was asked, otherwise skipping is indistinguishable from never having been offered it.
  • Persist per step, so closing the tab halfway keeps what was answered. Every column is nullable for exactly this reason.
  • Reachable later from the account page so a skipper can fill it in. Note feat: unified account/profile page for signed-in users #98 covers a unified account page and is the natural edit surface for this same table; coordinate rather than building two.
  • Never block access to the map, calendar or competitions.

Preview mode

With Supabase unconfigured there is no auth, so /onboarding should not be reachable and nothing should call it. Follow the isSupabaseConfigured() gate at src/lib/supabase/config.ts:9-14 the way every other Supabase call site does.

Acceptance criteria

  • Appears once after first sign-in, not on every sign-in
  • Skipping on any step never re-prompts
  • Closing mid-flow and returning resumes where it left off
  • Answers land in user_profiles and are visible via select * from user_profiles in the dashboard
  • Changing board visibly changes the calendar's default exam sessions
  • Changing country visibly changes the default country track on a detail page
  • Keyboard operable start to finish, focus moves to each new step
  • Supabase unconfigured: route is unreachable, nothing throws
  • Nothing in the product is blocked by not completing it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    onboardingFirst-run onboarding questionnaireowner-yashOwned by Yash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions