Files
petfeed/mobile/.env.example
T
admin c35d4cda46 feat(mobile): Phase 1 — real Feed/Explore/Notifications/Pets tabs
Moves the mobile app from a connectivity scaffold to a real Phase 1 app:

- Migrate off Expo Go onto a local custom dev client (expo-dev-client,
  built via expo prebuild + expo run:android against the local Android
  SDK — no EAS account needed). Needed because react-native-mmkv requires
  native code Expo Go doesn't ship.
- Persisted, MMKV-backed TanStack Query cache (PersistQueryClientProvider)
  plus expo-image, so a relaunch renders the last-known feed/pets/
  notifications instantly instead of a blank screen while refetching.
- ActivePetContext: every pet-scoped procedure requires an explicit petId
  server-side (no server-side "current pet"), ported from web's
  ActivePetContext, MMKV-backed instead of localStorage.
- Bottom Tabs (Feed/Explore/Notifications/Pets) mirroring the web app's
  actual mobile nav, with Messages as a header button rather than a tab
  (matches web). Feed, PostCard, PawButton reactions, pet discovery grid,
  notifications list, and a conversations list are all wired to the real
  backend and verified against the live database.
- Design tokens/components extended with PostCard/PawButton/PetAvatar/
  PetIdentityBadges, all styled from the existing src/theme/tokens.ts.
- Fixed a react/react-dom version mismatch surfaced along the way, and
  handle Clerk's needs_client_trust (Device Trust) sign-in status with an
  email-code step.

Verified end-to-end in the Android emulator against pawfeed.org: feed
scrolls and paginates with real posts/images, paw reactions toggle
optimistically and persist, pet switching updates every screen, and
notifications/explore show live data.
2026-09-05 13:19:01 +02:00

26 lines
1.3 KiB
Bash

# Copy to .env and fill in. Expo inlines EXPO_PUBLIC_* at build time — never
# put a secret behind this prefix, it ends up in the compiled app bundle.
# Same Clerk instance as the web app — copy the value of
# NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY from the repo root's .env.local.
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_xxxxxxxxxxxxxxxxxxxx"
# The Next.js backend's public origin (same Docker deployment the web app
# uses — see docker/SCALING-ROADMAP.md). No CORS/proxy changes are needed:
# CORS is a browser-only mechanism and doesn't apply to a native app's fetch
# calls; the existing /api/trpc route and Clerk bearer-token auth already
# work from a native client.
#
# - Physical Android device on the same LAN as the dev machine, hitting the
# `npm run dev` server directly: use the machine's LAN IP, e.g.
# http://192.168.1.50:3000
# - Android emulator talking to a dev server on the host machine: use
# http://10.0.2.2:3000 (the emulator's alias for the host's localhost)
# - Pointing at the real deployment: https://pawfeed.org
EXPO_PUBLIC_API_URL="https://pawfeed.org"
# Same Supabase project the web app uses for public media URLs — copy the
# value of NEXT_PUBLIC_SUPABASE_URL from the repo root's .env.local. Safe to
# embed client-side (it's the public storage origin, not a service key).
EXPO_PUBLIC_SUPABASE_URL="https://xxxxxxxxxxxx.supabase.co"