Quick Start Guide
This guide will help you get the DPM Delivery Mobile app up and running on your local development environment in just a few minutes.Before starting, make sure you have Node.js (18+), bun, and either Xcode (for iOS) or Android Studio (for Android) installed. See the Installation guide for detailed prerequisites.
Install Dependencies
Install all required dependencies using npm:
The project uses bun as the package manager. You can also use
bun install if you prefer.Configure Environment Variables
Create a
.env.local file in the project root with the following required variables:.env.local
Environment Variable Details
| Variable | Purpose | Required |
|---|---|---|
EXPO_PUBLIC_API_BASE_URL | Backend API base URL for all API requests | Yes |
EXPO_PUBLIC_ENCRYPTION_KEY | Used for MMKV storage encryption on native platforms | Yes |
EXPO_PUBLIC_WEB_CRYPTO_KEY | Used for web crypto storage encryption | Yes |
Start the Development Server
Start the Expo development server:Or use the npm equivalent:This will start the Expo development server and display a QR code in your terminal.
Launch the App
Choose your preferred platform:
For physical devices, you’ll need the Expo Go app (for development) or a custom dev client for production features.
Available Scripts
Here are the most commonly used development scripts:| Command | Description |
|---|---|
bun start | Start Expo development server |
bun run android | Run on Android emulator/device |
bun run ios | Run on iOS simulator/device |
bun run web | Start with web support |
bun run lint | Run ESLint for code quality checks |
What’s Next?
Installation Details
Learn about detailed prerequisites and platform-specific setup
Authentication
Understand how authentication works in the app
Project Structure
Explore the codebase organization
Configuration
Configure the app for your needs
Troubleshooting
Environment variable errors
Environment variable errors
If you see errors about missing environment variables:
- Ensure your
.env.localfile exists in the project root - Verify all three required variables are set
- Restart the development server after adding environment variables
- Check
src/utils/env.ts:1for validation logic
Metro bundler issues
Metro bundler issues
If the Metro bundler fails to start or shows caching issues:
iOS build errors
iOS build errors
If you encounter iOS build errors:
- Ensure Xcode is up to date
- Run
npx pod-installto install iOS dependencies - Clean the build folder in Xcode (Cmd + Shift + K)
Android build errors
Android build errors
If you encounter Android build errors:
- Ensure Android SDK is properly configured
- Check that ANDROID_HOME environment variable is set
- Clean the build:
cd android && ./gradlew clean