Expo (mobile + web + server API routes) for Baza Pilates, built with Turborepo.
pnpmworkspaces + Turborepoapps/mobile: Expo Router + Expo API routes/middleware + Tamagui + TanStack Querypackages/types: shared schemas/types (Zod Mini oriented)- Lint/format: Oxlint + Oxfmt
Main colors ported from Desktop/baza-landing:
- background:
#fdf7f4 - brand:
#2e5b42 - accent:
#6e1644
Logo assets should be placed in apps/mobile/assets/branding and wired into screens.
- No public signup.
- Admin creates client invite by email.
- Client receives Resend email and completes password setup.
- Client can later request password reset via email link.
pnpm install
cp apps/mobile/.env.example apps/mobile/.envFill apps/mobile/.env:
-
DATABASE_URL(Postgres connection string, see below) -
RESEND_API_KEY -
RESEND_FROM_EMAIL -
API_ADMIN_BOOTSTRAP_TOKEN -
BETTER_AUTH_SECRET(32+ random chars) -
APP_WEB_URL(invite/reset callback base URL) -
EXPO_PUBLIC_API_URL— keep empty to use same-origin/api/*routes.
From repo root, start Postgres (hardcoded values in docker-compose.yml, port 5434):
docker compose up -dDATABASE_URL defaults in apps/mobile/.env.example match compose values. Then generate Prisma client and run migrations from apps/mobile:
pnpm --filter mobile exec prisma generate
pnpm --filter mobile exec prisma migrate devIf you need seed data, add a seed script under apps/mobile and run it explicitly (Prisma 7 does not auto-seed after migrations).
Verify the workspace (CI gate sequence):
pnpm check-types
pnpm lint
pnpm format:check
pnpm buildTrigger cron jobs manually (useful in local dev):
API_ADMIN_BOOTSTRAP_TOKEN=your-token pnpm --filter mobile cron:reminders
API_ADMIN_BOOTSTRAP_TOKEN=your-token pnpm --filter mobile cron:expiryOr run with explicit args:
CRON_BASE_URL=http://localhost:8081 API_ADMIN_BOOTSTRAP_TOKEN=your-token pnpm --filter mobile cron:run reminders -- --mode immediate --window-minutes 60
CRON_BASE_URL=http://localhost:8081 API_ADMIN_BOOTSTRAP_TOKEN=your-token pnpm --filter mobile cron:run package-expiry -- --mode immediate --window-days 7 --dry-runRun app (client + server routes):
pnpm dev- Server API routes: Expo server runs at
http://localhost:8081when web server output is enabled. Health:GET http://localhost:8081/api/health. - Mobile: Expo dev server starts; use iOS simulator, Android emulator, or Expo Go.
- Server API routes + web on EAS Hosting (Expo server output).
- Mobile on EAS Build + EAS Update.
- Database: Neon Postgres + Prisma migrations.
- Cron jobs can call:
POST /api/cron/notifications/remindersPOST /api/cron/notifications/package-expirywith headerx-cron-token: $API_ADMIN_BOOTSTRAP_TOKEN. Endpoints support:mode=scheduled(default production window)mode=immediate(run instantly against a near-term window)- optional
dryRun=true(simulate, no notifications persisted/dispatched)
pnpm --filter mobile exec prisma generate
pnpm --filter mobile exec prisma migrate devdocs/api-contract.md— API endpoint referencedocs/calendar-ux-spec.md— Calendar UI/UX specificationdocs/reports-spec.md— Reports data model and output shapesdocs/cron-ops.md— Cron job operations guidedocs/deployment-runbook.md— Production deployment procedures