FriendChise Docs
Mobile App
The friendchise-mobile-app Expo client and how it talks to the web backend
FriendChise ships a companion mobile app (friendchise-mobile-app/) built with Expo and Expo Router. It is intentionally a thin client: it has no server of its own and reads/writes through the same backend used by the web app.
How it fits together
- The mobile app calls the FriendChise web backend directly — there is no separate mobile API. All product logic (tasks, timetable, orgs, RBAC) lives in the web app's
app/api/*and server actions. EXPO_PUBLIC_API_URLis the only thing that points the app at a backend. Usehttp://localhost:3000only for the iOS Simulator or Android Emulator; on Android Emulator you can also usehttp://10.0.2.2:3000oradb reverseto reach a host machine backend. Production builds usehttps://friendchise.appthrough the EAS profile ineas.json.- Auth uses bearer tokens issued and verified by the backend. The shared
AUTH_SECRETstays server-side. See Authentication.
Pages
Tech
- Expo + Expo Router (file-based routing under
app/(app)andapp/(auth)) - Zustand for local auth/session state
- Expo SecureStore for persisting the auth token on-device
- A hand-rolled
StyleSheet-based design system (no NativeWind/Tailwind) — tokens live insrc/lib/theme.ts
Key directories
app/(auth): sign-in, dev user picker (development only), and related screens.app/(app): the authenticated app shell and feature screens.src/features/: feature modules (auth, tasks, etc.), each owning its own API calls and hooks.src/lib/: shared theme, env access, and low-level helpers.components/ui/: shared primitives (Text,Button,Card,ListRow,Screen,ScreenHeader, etc.).
Feature parity with web
- Account deletion: the mobile app calls the same
/api/account/deleteendpoint used by the web settings page (seecomponents/layout/profile-panel/settings-sheet.tsx). - Session expiry: a
SessionWatchercomponent reads the JWT'sexpclaim and automatically signs the user out when it lapses — this applies uniformly to normal, dev, and demo sessions.
TODO
- Document push notification support once implemented.
- Document offline/error-state behavior conventions once formalized.
- Link to the mobile design system reference once it's published as its own doc page.
