NearNow is a React Native monorepo for a locality-first commerce platform with three apps:
client-app: customer ordering appmerchant-app: store management appdelivery-app: rider operations app
This foundation is built with Expo and React Native so the same React codebase can ship to Android and iOS app stores without using Flutter.
- Grocery, pharmacy, bakery, daily essentials, and local store ordering
- Radius-based delivery discovery for nearby stores
- Multi-store cart messaging with extra-charge logic
- Merchant dashboard for orders, stock, and campaigns
- Delivery app for runs, incentives, and next-day payouts
- Green/white visual system with animated entry transitions and tab changes
api/
apps/
client-app/
merchant-app/
delivery-app/
packages/
config/
core/
shared/
supabase/
ui/
docs/
product-blueprint.md
apps/: installable client, merchant, and delivery appsapi/: reserved backend/API folder for future servicespackages/ui: shared design system, theme, and reusable visual componentspackages/core: shared business data, types, and pricing logicpackages/config: shared app constants and business configurationpackages/supabase: shared Supabase client and environment helperspackages/shared: app-specific screens and compositions built on top of the shared packages
apps/
client-app/ -> real customer app wrapper and native app config
merchant-app/ -> real merchant app wrapper and native app config
delivery-app/ -> real delivery app wrapper and native app config
packages/
shared/ -> app-specific screens for client, merchant, and delivery
ui/ -> shared theme, layout shell, reusable UI components
core/ -> shared pricing logic, types, and common data
config/ -> shared constants such as brand values and business rules
supabase/ -> shared Supabase client and auth/session helpers
api/
README.md -> placeholder for future backend/services
Quick mental model:
apps/= what gets built and publishedpackages/shared/= where most app screens livepackages/ui/= shared look and reusable componentspackages/core/= shared logic and datapackages/config/= shared constants and settingspackages/supabase/= shared database/auth client setupapi/= future backend
- Expo SDK 55
- React Native 0.83
- React 19.2
- TypeScript
Before running the project on a fresh machine, install:
- Node.js 20 or newer
- npm 10 or newer
- Git
- Expo Go or a custom Android dev build if testing on phone
- An Expo account if you need EAS cloud builds
Optional but useful:
- Android Studio if you want local Android emulator/device builds
- Xcode on macOS if you want iPhone simulator or App Store builds
These versions match the current Expo SDK 55 line and Expo monorepo guidance in the official docs:
- https://docs.expo.dev/get-started/create-a-project/
- https://docs.expo.dev/guides/monorepos/
- https://docs.expo.dev/versions/latest/
If a teammate clones this repository from GitHub, these are the first commands to run from the repo root:
git clone <your-repo-url>
cd <your-repo-folder>
npm installThen choose one of these paths:
- Normal Expo server for fast development:
npm run dev:client,npm run dev:merchant, ornpm run dev:delivery - Browser preview:
npm run web:client,npm run web:merchant, ornpm run web:delivery - Custom Android dev build flow: follow the
Custom Android Dev Buildsection below
Recommended first check after clone:
npm run web:clientThat is usually the fastest way to confirm the repo installed correctly on a new machine.
This repo is prepared for Supabase through the shared workspace package:
packages/supabase
- Create a new Supabase project in the Supabase dashboard
- Copy the project URL
- Copy the publishable key or anon key
Create these local files and fill in the same values:
apps/client-app/.env.localapps/merchant-app/.env.localapps/delivery-app/.env.local
Use this format:
EXPO_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your_publishable_or_anon_keyExample files already exist here:
apps/client-app/.env.exampleapps/merchant-app/.env.exampleapps/delivery-app/.env.example
Run these in the Supabase SQL editor in this order:
api/supabase/001_schema.sqlapi/supabase/002_auth_and_rls.sqlapi/supabase/003_seed.sql
These files create the starter tables, auth/profile trigger, row-level security policies, and demo store/product data used by the current build.
If the project was already connected to Supabase before this update, rerun:
api/supabase/001_schema.sqlapi/supabase/002_auth_and_rls.sql
That refreshes the unique indexes and row-level security rules used by cart checkout and the new auth flow.
Import from:
@nearnow/supabase
Available helpers:
getSupabaseClient()maybeGetSupabaseClient()isSupabaseConfigured()registerSupabaseAutoRefresh()
- The apps are set up so they do not crash if the Supabase env vars are still missing
- Once you add the env vars and restart Expo, the shared client is ready to use
- Customer settings now includes sign in/sign up for checkout writes
- Merchant settings now includes sign in/sign up for live merchant access
- Delivery profile now includes sign in/sign up for rider access
- Install dependencies from the repo root with
npm install - Start the customer app with
npm run dev:client - Start the merchant app with
npm run dev:merchant - Start the delivery app with
npm run dev:delivery
Use these commands from the repo root:
- Customer app with normal Expo server:
npm run dev:client - Merchant app with normal Expo server:
npm run dev:merchant - Delivery app with normal Expo server:
npm run dev:delivery - Customer app in browser:
npm run web:client - Merchant app in browser:
npm run web:merchant - Delivery app in browser:
npm run web:delivery - Customer app with installed custom Android dev client:
npm run devclient:client - Merchant app with installed custom Android dev client:
npm run devclient:merchant - Delivery app with installed custom Android dev client:
npm run devclient:delivery
Use browser preview for fast UI checks on your laptop.
- Customer app:
npm run web:client - Merchant app:
npm run web:merchant - Delivery app:
npm run web:delivery
Notes:
- Expo will print a localhost URL such as
http://localhost:8082 - Browser preview is useful for layout and quick iteration, but it is not a replacement for testing on a real phone
- If a change does not appear immediately, save the file again, refresh the browser, or restart the command
Use this path if Expo Go on your phone is too old for the SDK used by this project.
- Build the installable Android dev app:
npm run eas:build:client:android - Install the generated APK on the phone
- Start the local dev server for the installed app:
npm run devclient:client - Open the installed customer app on the phone and scan the QR code from that terminal
- Build the installable Android dev app:
npm run eas:build:merchant:android - Install the generated APK on the phone
- Start the local dev server for the installed app:
npm run devclient:merchant - Open the installed merchant app on the phone and scan the QR code from that terminal
- Build the installable Android dev app:
npm run eas:build:delivery:android - Install the generated APK on the phone
- Start the local dev server for the installed app:
npm run devclient:delivery - Open the installed delivery app on the phone and scan the QR code from that terminal
- The Android package names are currently placeholders:
- Customer:
com.nearnow.customer - Merchant:
com.nearnow.merchant - Delivery:
com.nearnow.delivery
- Customer:
- Replace them later with your own company/app identifiers before publishing.
- Use the installed custom app for this flow, not
Expo Go - The first build is slower because EAS has to create the Android dev APK
- Before the first EAS build on a new machine, log in to Expo:
npx eas-cli login
- If the app is not linked yet for that app folder, initialize it from inside the app folder:
cd apps/client-app && npx eas-cli initcd apps/merchant-app && npx eas-cli initcd apps/delivery-app && npx eas-cli init
Use this cheat sheet when working in the repo:
- Change a client screen: packages/shared/src/apps/client/screens
- Change a merchant screen: packages/shared/src/apps/merchant/screens
- Change a delivery screen: packages/shared/src/apps/delivery/screens
- Change client tab layout/screen switching: packages/shared/src/apps/client/ClientApp.tsx
- Change merchant tab layout/screen switching: packages/shared/src/apps/merchant/MerchantApp.tsx
- Change delivery tab layout/screen switching: packages/shared/src/apps/delivery/DeliveryApp.tsx
- Change shared visual styles, reusable UI, theme, spacing, colors: packages/ui/src
- Change shared data, types, pricing logic, and business rules: packages/core/src
- Change global app constants and config values: packages/config/src/index.ts
- If you are editing a client screen, run
npm run devclient:clientornpm run web:client - If you are editing a merchant screen, run
npm run devclient:merchantornpm run web:merchant - If you are editing a delivery screen, run
npm run devclient:deliveryornpm run web:delivery - After saving, Expo usually hot reloads automatically
- If it does not reload, press
rin the terminal or refresh the browser
- Add Supabase or PostgreSQL + Node API for auth, catalogs, carts, and orders
- Add live order tracking, maps, and route optimization
- Add payouts, incentives, and merchant settlement workflows
- Add admin panel, store onboarding, and compliance flows
- Configure EAS Build for Play Store and App Store releases