React Native companion app for Curbside — find food trucks in real time.
This is the mobile companion to the Curbside web app (github.com/nick27g/curbside).
- Full auth flow (login/signup) reusing Supabase from the web app via Bearer token headers
- Live vendor map with Mapbox native SDK (@rnmapbox/maps)
- Driver dashboard with GPS tracking (expo-location, posts to Vercel API every 5 seconds)
- Push notification infrastructure — code complete; end-to-end activation requires paid Apple Developer account ($99/yr)
- Role-based navigation: customer map view vs driver dashboard
Expo SDK 54, Supabase client with AsyncStorage, Expo Router file-based navigation, environment setup with EXPO_PUBLIC_ prefix. Pinned to SDK 54 to match Expo Go on device; babel.config.js and metro.config.js added manually since the blank TypeScript template omits them.
AuthContext managing session + profile (role, vendor_type), login/signup screens wired with Expo Router, route protection in app/index.tsx. Confirmed working on iPhone via Expo Go.
Integrated @rnmapbox/maps native SDK. Full-screen map centered on Chicago with vendor pins fetched from Supabase (locations table, is_active=true), deduplicated by vendor_id. Requires a native build — cannot run in Expo Go. Confirmed on iOS Simulator.
expo-location permission flow, Start/Stop toggle with LIVE/OFFLINE status badge, 5-second GPS polling via setInterval + Location.getCurrentPositionAsync. POSTs to /api/locations/create on the Vercel backend using the Supabase Bearer token. Role-gated Driver Dashboard button on the home screen.
Location and notification permission requests on app launch. Expo push token registered and written to profiles in Supabase. Server-side proximity trigger on Vercel using a Haversine distance filter to fan out push notifications when a driver goes live near a customer. Foreground notification handler with expo-notifications.
- Native build required — Expo Go cannot run
@rnmapbox/maps. Useexpo run:iosorxcodebuild. - Vercel Deployment Protection must be OFF — mobile Bearer token API calls are blocked by Vercel's deployment protection gate; disable it for the production domain.
- Push notifications require a paid Apple Developer account ($99/yr) for the
aps-environmententitlement needed to receive APNs tokens on a real device. - All API calls point to the permanent Vercel domain (
curbside-nine.vercel.app) — never use hash deployment URLs, which rotate on every deploy.
git clone https://github.com/nick27g/curbside-mobile
cd curbside-mobile
npm installCreate a .env file with:
EXPO_PUBLIC_MAPBOX_TOKEN=pk.xxx
EXPO_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJ...
Build and run (Mac + Xcode required):
npx expo run:iosFor JS-only hot reload after the native build is installed:
npx expo start --dev-client


