podzooka

Architecture: one repo, one public URL

Product UI (single codebase)

apps/mobile — Expo + React Native + react-native-web. Same JavaScript UI for:

Backend

Next.js app/api/* — production API matches scripts/dev-api-stub.mjs behavior:

Logic lives under lib/api/ (handle-request.ts dispatches; feed, dashboard, podcast-social, radio, video-channels, add-by-url).

One deployment (e.g. www.podzooka.com)

The root npm run build pipeline:

  1. Build @podzooka/shared
  2. expo export --platform webapps/mobile/dist-web/
  3. Copy that folder to public/
  4. next build — serves public/ at the site root and registers /api/* serverless routes

middleware.ts rewrites HTML5-style paths (e.g. /podcast/:id) to /index.html so React Navigation on web works, while /api/* and static files (/_expo/*, /assets/*, etc.) are unchanged.

Environment

EXPO_PUBLIC_API_URL — your public site origin (no path), e.g. https://www.podzooka.com. Required for native store builds so they reach your production API.
Expo web on Vercel does not need this if the app and API share the same deployment: the client uses window.location.origin when the env var is unset, so /api/* stays same-origin.

# Native / explicit override
EXPO_PUBLIC_API_URL=https://www.podzooka.com

Supabase: EXPO_PUBLIC_SUPABASE_URL, EXPO_PUBLIC_SUPABASE_ANON_KEY, and server-only SUPABASE_SERVICE_ROLE_KEY / CRON_SECRET as today.

Local development