Problem
Users are dropping off when they hit the login wall while trying to browse listings. The current flow forces account creation before any value is shown:
Home page → "Browse Listings" → /discover → ProtectedRoute → /login
This hard gate prevents casual visitors from experiencing the product before committing to sign up.
Root Cause
/discover is wrapped in <ProtectedRoute> and guarded by middleware.ts
- Backend
/api/recommendations uses require_user_token (mandatory auth dependency)
- There is no middle ground between fully signed up and no access
Proposed Solution: Soft Conversion Funnel
Allow users to browse listings as a guest, then prompt for signup at natural conversion moments.
Guest Flow
- User clicks "Browse Listings" → lightweight preference picker (location + price, no account needed)
- Preferences stored in
sessionStorage as guest_preferences
/discover renders for guests using those temporary prefs
- Guest can swipe/browse freely
- On like/save: soft signup modal — "Create a free account to save this listing"
- After 5 swipes: nudge banner — "Sign up to keep your matches"
- On signup: guest preferences are preserved and carried over automatically
Implementation Scope
| Layer |
Change |
middleware.ts |
Add /discover to public routes |
ProtectedRoute |
Remove from /discover page |
preferences-setup/page.jsx |
Allow without auth, save to sessionStorage for guests |
discover/page.jsx |
Handle guest state, intercept like action, show nudge after 5 swipes |
recommendations.py |
Make auth optional; accept city/min_price/max_price query params as fallback |
AuthContext.jsx |
Expose isGuest boolean |
Acceptance Criteria
Notes
- Do not persist guest swipe data server-side in this iteration — keep it stateless
- Guest session scoped to
sessionStorage only (cleared on tab close)
- Backend
dependencies/auth.py already has get_user_token() (optional variant) — use that instead of require_user_token()
Problem
Users are dropping off when they hit the login wall while trying to browse listings. The current flow forces account creation before any value is shown:
Home page → "Browse Listings" →
/discover→ ProtectedRoute →/loginThis hard gate prevents casual visitors from experiencing the product before committing to sign up.
Root Cause
/discoveris wrapped in<ProtectedRoute>and guarded bymiddleware.ts/api/recommendationsusesrequire_user_token(mandatory auth dependency)Proposed Solution: Soft Conversion Funnel
Allow users to browse listings as a guest, then prompt for signup at natural conversion moments.
Guest Flow
sessionStorageasguest_preferences/discoverrenders for guests using those temporary prefsImplementation Scope
middleware.ts/discoverto public routesProtectedRoute/discoverpagepreferences-setup/page.jsxsessionStoragefor guestsdiscover/page.jsxrecommendations.pycity/min_price/max_pricequery params as fallbackAuthContext.jsxisGuestbooleanAcceptance Criteria
/discoverwithout being redirected to/login/preferences-setupwithout an accountsessionStorageacross the sessionNotes
sessionStorageonly (cleared on tab close)dependencies/auth.pyalready hasget_user_token()(optional variant) — use that instead ofrequire_user_token()