Auth
Authentication: session, onboarding, login, signup, forgot password, app lock, and guest mode.
Guest mode
- Users can continue as guest from Onboarding or Login to use the app without signing in.
- Guest data (notes, categories) is stored locally only (keyed by a guest user id); no sync or server features.
- When a guest taps an action that requires the server (e.g. sync button in a thought, Post in feed), a snackbar appears with Login, Register, and Cancel so they can sign in or dismiss.
Location
src/features/auth/api/—auth.service.ts(Supabase Auth)src/features/auth/domain/—auth.store.ts(session, user state)src/features/auth/ui/— Screens and lock UI
Screens
| Screen | Purpose |
|---|---|
| SplashScreen | Session check, redirect to onboarding or app |
| OnboardingScreen | First-time onboarding flow |
| LoginScreen | Email/password (and optional OAuth) |
| SignUpScreen | Registration |
| ForgotPasswordScreen | Password reset via email |
| LockAuthModal / LockAuthInline | Unlock app with PIN/biometric |
| AccountDeletedScreen | Post-deletion confirmation |
API
- auth.service —
signIn,signUp,signOut,resetPassword, OAuth helpers, session refresh.
Domain
- auth.store — Current user, session, loading,
isGuest,signInAsGuest,signOut(guest sign-out clears local state only).
Guest-required snackbar
- useGuestRequiredSnackbar (
src/core/hooks/useGuestRequiredSnackbar.ts) — Returns a function that shows a snackbar with Login / Register / Cancel when a guest taps a server-requiring action (e.g. sync, Create Post).