Onboarding
New users go through a required onboarding flow before they can use the app: pick interests, then follow at least 5 accounts.
Each checkbox marks whether that piece is implemented end to end (frontend + backend).
- Interests step — pick topics (Música, Deportes, Gaming, Moda, …); stored as stable slugs
- Follow step — must follow at least 5 accounts to continue (the Finish button is locked until then)
- Interest-matched suggestions in the follow step (shared-interest accounts first, topped up with broader suggestions so it's never empty)
- Search box to find and follow any account during onboarding
- Persistent gate — an incomplete user is redirected to
/onboardingon every login (based on the server-sideisOnboardingCompletedflag), even after logging out and back in - Server-side enforcement —
completeOnboardingrejects finishing with fewer than 5 follows - Log-out option available inside the onboarding view
- No feed flash — login sends unfinished users straight to
/onboarding; the protected feed never renders first
How it works
- After registering (or logging in without having finished), the user lands on
/onboarding. - Step 1 — Interests: they select topics. The values stored are language-independent slugs (
music,sports, …), so matching works across locales. - Step 2 — Follow: the app calls
interestSuggestionswith the chosen interests and shows accounts to follow, plus a search box. The user must follow ≥5. - On finish,
completeOnboarding(interests)setsisOnboardingCompleted = true(and stores the interests viaupdateInterestssemantics), and the app enters the feed.
Gate
The redirect is enforced in ProtectedRoute.tsx: when user.isOnboardingCompleted === false and the path isn't /onboarding, it renders nothing and redirects. Because the flag lives on the server and is returned in the login/register payload, logging out and back in re-triggers the gate for an unfinished account.
Key files
- Backend:
graphql/resolvers/user-social.resolver.js(completeOnboarding),graphql/resolvers/user-search-discovery.resolver.js(interestSuggestions),data-access-services/user/user.access-service.js(getUsersByInterests). - Frontend:
page-components/OnboardingPage.tsx,app/onboarding/page.tsx, gate incomponents/ProtectedRoute.tsx, login redirect incomponents/Login.tsx.
Related
Interests are editable later — see Settings → Interests and the Discovery doc for interest-based suggestions.