albertonline.org docs
Apps

native

Expo (React Native) mobile client for albertonline.org, sharing auth, RPC, and AI logic with the web app.

Overview

native is the Expo-based mobile client for albertonline.org, targeting iOS, Android, and Expo web. It shares auth, API, and AI logic with apps/web through @repo/* workspace packages (synced todos, an AI chat screen), and is styled with NativeWind. Signed-in admins additionally get drawer screens that manage the monorepo's data through the same Effect RPC the web admin uses.

Stack

  • Expo 56 + Expo Router (file-based routing, typed routes)
  • React Native 0.85, React 19 (React Compiler enabled)
  • NativeWind 4 + Tailwind CSS 3 styling
  • Better Auth via @better-auth/expo + expo-secure-store
  • Effect-based RPC client (@effect/atom-react, @repo/api, @repo/ai)
  • Shared workspace packages: @repo/hooks, @repo/constants, @repo/logger, @repo/utils
  • Vitest + Testing Library for tests

Develop

pnpm -F native dev       # expo start --clear (Metro on port 8081)
pnpm -F native ios       # expo run:ios
pnpm -F native android   # expo run:android
pnpm -F native web       # expo start --web

Copy .env.example to .env and set EXPO_PUBLIC_SERVER_URL to point at the running web/API server.

pnpm -F native ios runs expo run:ios through scripts/expo-xcode.sh, a shim that strips the nix devshell's C/C++ toolchain env vars so xcodebuild uses real Xcode instead of nix clang/libc++ against the iPhone SDK. Set XCODE_DEVELOPER_DIR to override the Xcode path.

Test

pnpm -F native test            # vitest (watch)
pnpm -F native test:ui         # vitest UI
pnpm -F native test:coverage   # coverage report

Build & deploy

Native builds go through Expo (EAS), not a hosted web deploy. Prebuild the native projects, then build/run per platform:

pnpm -F native prebuild   # expo prebuild
pnpm -F native ios
pnpm -F native android

Structure

  • app/ — Expo Router routes ((drawer)/(tabs), ai, todos, admin/*, modal)
  • components/ — shared UI (sign-in/up, header button, tab bar icon, async-list)
  • hooks/use-is-admin (admin gate)
  • lib/ — auth client, color scheme, Android nav bar, constants
  • utils/ — RPC client wiring (rpc.ts — todos + admin-domain atoms)
  • __tests__/ — Vitest unit/component tests
  • assets/ — app icons and images

See the apps overview and the monorepo overview.

On this page