Skip to main content

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.
1

Clone the Repository

Clone the repository to your local machine:
git clone https://github.com/Felix-Asante/dpm-delivery-mobile.git
cd dpm-parcel-delivery-app
2

Install Dependencies

Install all required dependencies using npm:
npm install
The project uses bun as the package manager. You can also use bun install if you prefer.
3

Configure Environment Variables

Create a .env.local file in the project root with the following required variables:
.env.local
EXPO_PUBLIC_API_BASE_URL=https://your-api.example.com
EXPO_PUBLIC_ENCRYPTION_KEY=your-encryption-key
EXPO_PUBLIC_WEB_CRYPTO_KEY=your-web-crypto-key
All three environment variables are required. Missing variables will throw runtime errors (see src/utils/env.ts:1).

Environment Variable Details

VariablePurposeRequired
EXPO_PUBLIC_API_BASE_URLBackend API base URL for all API requestsYes
EXPO_PUBLIC_ENCRYPTION_KEYUsed for MMKV storage encryption on native platformsYes
EXPO_PUBLIC_WEB_CRYPTO_KEYUsed for web crypto storage encryptionYes
Contact your backend team or check your project documentation for the correct API base URL and encryption keys.
4

Start the Development Server

Start the Expo development server:
bun start
Or use the npm equivalent:
npm start
This will start the Expo development server and display a QR code in your terminal.
5

Launch the App

Choose your preferred platform:
# Press 'i' in the terminal
# Or run:
bun run ios
For physical devices, you’ll need the Expo Go app (for development) or a custom dev client for production features.
6

Sign In

Once the app loads, you’ll see the sign-in screen with a delivery rider animation.Enter your credentials:
  • Phone Number: Your registered phone number
  • Password: Your account password
The app uses phone-based authentication (see src/app/(public)/(auth)/sign-in.tsx:1).
Contact your administrator if you need test credentials or need to create a rider account.

Available Scripts

Here are the most commonly used development scripts:
CommandDescription
bun startStart Expo development server
bun run androidRun on Android emulator/device
bun run iosRun on iOS simulator/device
bun run webStart with web support
bun run lintRun 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

If you see errors about missing environment variables:
  1. Ensure your .env.local file exists in the project root
  2. Verify all three required variables are set
  3. Restart the development server after adding environment variables
  4. Check src/utils/env.ts:1 for validation logic
If the Metro bundler fails to start or shows caching issues:
# Clear Metro cache
npx expo start --clear
If you encounter iOS build errors:
  1. Ensure Xcode is up to date
  2. Run npx pod-install to install iOS dependencies
  3. Clean the build folder in Xcode (Cmd + Shift + K)
If you encounter Android build errors:
  1. Ensure Android SDK is properly configured
  2. Check that ANDROID_HOME environment variable is set
  3. Clean the build: cd android && ./gradlew clean

Build docs developers (and LLMs) love