← All work

Feature·Anas2604-web/repomind

Separate signed-out discovery from signed-in onboarding

Introduces a marketing landing page for signed-out visitors while retaining the full application for authenticated users. The onboarding tour now waits for Clerk authentication to load and requires sign-in before checking whether it should appear.

The problem

The existing tour effect ran on initial mount without checking authentication state. The home page also needed a distinct signed-out experience and an explicit loading state while Clerk resolved authentication.

The approach

Added a client-side LandingPage component with a hero, three-step workflow, feature highlights, sign-in prompts, and developer credits. Home now reads Clerk's isLoaded flag, renders a centered spinner during authentication loading, and returns LandingPage for signed-out visitors. The tour effect depends on isLoaded and isSignedIn, checks shouldShowTour after an 800 ms delay, and clears the timer on cleanup.

What changed

Signed-out visitors see the landing page, authenticated users see the application, and unresolved authentication displays a spinner. Automatic onboarding is gated on completed authentication and sign-in, with the existing tour-completion check controlling whether it appears.

  • react
  • nextjs
  • typescript
  • clerk
  • authentication
  • onboarding