How robertguss/expo-supabase-starter-kit works
This is an Expo mobile starter kit for authenticated apps. The main user journey is email OTP sign-in, verification and session establishment, then access to protected Home, Profile, and Settings tabs. Profile demonstrates fetching Supabase data with locally persisted query caching; Settings provides theme selection and logout. Shared providers initialize authentication, query persistence, theming, analytics, and error tracking. Some route and feature implementations were not excerpted, so those connections rely on README statements and SOURCE INDEX references rather than inspected route code.
Main entry points: app/_layout.tsx Root layout · auth-api.ts Auth operations · supabase.ts Supabase client · (tabs)/_layout.tsx Protected tabs
Components 27
App navigation
- Root layout
app/_layout.tsx - Protected tabs
app/(tabs)/_layout.tsx
Authentication
- Login screen
features/auth/login-screen.tsx - OTP verification
features/auth/verify-otp-screen.tsx - Auth operations
features/auth/auth-api.ts - Auth state
features/auth/auth-store.ts - Auth provider
providers/auth-provider.tsx
App features
- Home screen
features/home/home-screen.tsx - Profile screen
features/profile/profile-screen.tsx - Profile query
features/profile/use-profile.ts - Profile data access
features/profile/profile-api.ts - Settings screen
features/settings/settings-screen.tsx - Theme preference
features/settings/use-theme.ts
Shared platform
- Supabase client
lib/supabase.ts - Secure token storage
lib/storage.ts - Theme provider
providers/theme-provider.tsx - Query provider
providers/query-provider.tsx - Query cache
lib/query-client.ts - MMKV storage
lib/storage.ts - Analytics provider
providers/posthog-provider.tsx - PostHog client
lib/posthog.ts - Sentry setup
lib/sentry.ts - Shared UI and forms
components
Other components
- App user
- Supabase service
- PostHog service
- Sentry service
Connections 38
- App user → Root layout: opens app
README.md - Root layout → Auth provider: wraps
app/_layout.tsx - Root layout → Query provider: wraps
app/_layout.tsx - Root layout → Theme provider: wraps
app/_layout.tsx - Root layout → Analytics provider: wraps
app/_layout.tsx - Root layout → Protected tabs: protects
app/_layout.tsx - App user → Login screen: starts sign-in
README.md - Login screen → Auth operations: requests code
README.md - OTP verification → Auth operations: verifies code
features/auth/verify-otp-screen.tsx - Auth operations → Supabase client: auth requests
features/auth/auth-api.ts - Auth operations → Auth state: updates session
features/auth/auth-api.ts - Auth provider → Supabase client: listens for auth
providers/auth-provider.tsx - Auth provider → Auth state: updates state
providers/auth-provider.tsx - Supabase client → Secure token storage: persists tokens
lib/supabase.ts - Supabase client → Supabase service: auth and data requests
README.md - Protected tabs → Home screen: shows
README.md - Protected tabs → Profile screen: shows
README.md - Protected tabs → Settings screen: shows
README.md - Profile screen → Profile query: loads profile
features/profile/profile-screen.tsx - Profile query → Profile data access: fetches through
features/profile/use-profile.ts - Profile data access → Supabase client: reads profile
features/profile/profile-api.ts - Profile screen → Auth state: reads user ID
features/profile/profile-screen.tsx - Settings screen → Theme preference: selects preference
features/settings/settings-screen.tsx - Settings screen → Auth operations: logs out
features/settings/settings-screen.tsx - Theme provider → Theme preference: loads preference
providers/theme-provider.tsx - Theme preference → MMKV storage: persists choice
features/settings/use-theme.ts - Query provider → Query cache: configures persistence
providers/query-provider.tsx - Query cache → MMKV storage: persists cache
lib/query-client.ts - Analytics provider → Auth state: tracks identity state
providers/posthog-provider.tsx - Analytics provider → PostHog client: uses client
providers/posthog-provider.tsx - PostHog client → PostHog service: sends events
README.md - Root layout → Sentry setup: initializes
app/_layout.tsx - Auth provider → Sentry setup: sets user context
providers/auth-provider.tsx - Auth operations → Sentry setup: reports errors
features/auth/auth-api.ts - Sentry setup → Sentry service: reports errors
README.md - Login screen → Shared UI and forms: uses shared controls
- OTP verification → Shared UI and forms: uses shared controls
features/auth/verify-otp-screen.tsx - Settings screen → Shared UI and forms: uses shared controls
features/settings/settings-screen.tsx