Environment Configuration
The Rodando Passenger app uses Angular’s environment system for configuration management. Environment files are located insrc/environments/.
Environment Files
- environment.ts
- environment.prod.ts
Development environment configuration:Key Settings:
src/environments/environment.ts
production: false- Enables development modeapiUrl- Points to Android emulator localhost (10.0.2.2)debug: true- Enables debug loggingdebugTags- Controls which debug logs are shown
Environment Variables Explained
| Variable | Type | Description |
|---|---|---|
production | boolean | Enables production optimizations |
apiUrl | string | Backend API base URL |
appAudience | string | JWT audience claim (always 'passenger_app') |
expectedUserType | string | User type validation (always 'passenger') |
mapbox.accessToken | string | Mapbox API key for map rendering |
debug | boolean | Enables console debug logging |
debugTags | string[] | Debug log categories to display |
wsBase | string | WebSocket server base URL |
Debug Tags
ThedebugTags array controls which debug logs are shown:
DA- Driver Assignment logsHTTP- HTTP request/response logsLOC- Location tracking logsPL- Place/location search logsPAX- Passenger-specific logs
API Endpoint Configuration
Development API URLs
- Android Emulator
- iOS Simulator
- Physical Device
- Remote Server
For Android emulators, use the special IP address:
10.0.2.2 is the Android emulator’s alias for localhost on the host machine.Production API Configuration
For production builds, updateenvironment.prod.ts with your production URLs:
Mapbox Configuration
Setting Up Mapbox API Key
The app uses Mapbox for map rendering and location services.Get Mapbox Access Token
- Create a Mapbox account at mapbox.com
- Navigate to your account dashboard
- Create a new access token or copy the default public token
Capacitor Configuration
Capacitor configuration is defined incapacitor.config.ts:
capacitor.config.ts
Configuration Properties
| Property | Value | Description |
|---|---|---|
appId | io.ionic.starter | Unique app identifier (update for production) |
appName | rodandoApp-frontend | App display name |
webDir | www | Output directory from Angular build |
server.url | http://10.0.2.2:8100 | Development server URL for live reload |
server.cleartext | true | Allows HTTP connections (Android) |
Production Capacitor Configuration
For production builds, remove or comment out theserver section:
Update App ID for Production
Before publishing, update theappId to match your app’s package name:
- Android: Should match the
applicationIdinandroid/app/build.gradle - iOS: Should match the Bundle Identifier in Xcode
Angular Configuration
Angular configuration is inangular.json.
Build Configurations
The project has three build configurations:- Production
- Development
- CI
environment.ts with environment.prod.ts and enables optimizations.TypeScript Path Aliases
The project uses path aliases configured intsconfig.json:
Build Output
- Output directory:
www/(configured inangular.json) - Source maps: Enabled in development, disabled in production
- Bundle size limits: 2MB warning, 5MB error for initial bundle
Next Steps
Development Setup
Set up your local development environment
Build & Deploy
Learn how to build and deploy the app