A React Native mobile application for Replate food rescue volunteers, built with Expo Router.
- Node.js (v18 or later) - We recommend using nvm
- pnpm - This project enforces pnpm as the package manager
npm install -g pnpm
- Expo Go app on your phone (iOS / Android)
The app connects to the replate-business Rails backend. You need to:
-
Clone the
replate-businessrepository as a sibling directory:# From your projects folder git clone <replate-business-repo-url> replate-business
-
Or set the
REPLATE_BUSINESS_DIRenvironment variable:export REPLATE_BUSINESS_DIR=/path/to/replate-business
This starts both the Rails backend and Expo app with automatic IP detection:
./start.shThe script will:
- Find the Rails backend automatically
- Install dependencies if needed
- Run database migrations
- Detect your local IP for mobile device connections
- Start both servers
If you need to reset the database with fresh test data:
pnpm start:fresh# Terminal 1 - Rails backend
cd ../replate-business
bundle install
rails db:migrate
rails server -b 0.0.0.0 -p 3000
# Terminal 2 - Expo app
pnpm install
pnpm startCopy the example environment file:
cp .env.example .envThe start.sh script automatically updates the API URL with your local IP. For manual configuration:
| Variable | Description | Default |
|---|---|---|
EXPO_PUBLIC_API_BASE_URL |
Rails API base URL | http://localhost:3000 |
REPLATE_BUSINESS_DIR |
Custom path to Rails backend | (auto-detected) |
After seeding the database:
- Email:
test@driver.com - Password:
Password123!
pnpm start # Start Expo
pnpm start:fresh # Reset data + start everything
pnpm start:clean # Clear Expo cache + start
pnpm lint:check # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm prettier:check # Check formatting
pnpm prettier:fix # Fix formatting
pnpm tsc # TypeScript type check./stop.shsrc/
βββ app/ # Expo Router pages
β βββ (tabs)/ # Tab navigation screens
β βββ auth/ # Authentication flows
β βββ donation-details/
β βββ pickup-details/
β βββ onboarding/
βββ components/ # Reusable UI components
βββ styles/ # Shared styles and themes
βββ utils/ # Utilities and contexts
Either:
- Clone
replate-businessas a sibling to this repo - Set
REPLATE_BUSINESS_DIRenvironment variable
The start.sh script automatically kills existing processes on ports 3000 and 8081. If issues persist:
lsof -ti:3000 | xargs kill -9
lsof -ti:8081 | xargs kill -9Ensure your phone and computer are on the same WiFi network. The start.sh script auto-detects your IP, but you can manually set it in .env.