Skip to content

nick27g/curbside-mobile

Repository files navigation

Curbside Mobile

React Native companion app for Curbside — find food trucks in real time.

Web App

This is the mobile companion to the Curbside web app (github.com/nick27g/curbside).


React Native Expo SDK Expo Router Mapbox Supabase Expo Notifications


What's in the app

  • 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

Build Journey

Sprint 6.1 — Expo project scaffold

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.

Sprint 6.2 — Auth flow

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.

Sprint 6.2 — Login screen

Sprint 6.3 — Map view

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.

Sprint 6.4 — Driver GPS dashboard

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.

Sprint 6.4 — Driver dashboard

Sprint 6.5 — Push notifications

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.

Sprint 6.5 — Location permission Sprint 6.5 — Notification permission


Technical Notes

  • Native build required — Expo Go cannot run @rnmapbox/maps. Use expo run:ios or xcodebuild.
  • 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-environment entitlement 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.

Local Development

git clone https://github.com/nick27g/curbside-mobile
cd curbside-mobile
npm install

Create 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:ios

For JS-only hot reload after the native build is installed:

npx expo start --dev-client

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors