Prerequisites
Before installing Rodando Passenger, ensure you have the following tools installed on your development machine.Required Tools
Node.js
Version 16+ required (Node 18 or 20 recommended)Download from nodejs.org
npm or Yarn
Package manager (npm comes with Node.js)Or install Yarn:
npm install -g yarnIonic CLI
Version 7+
Git
Version controlDownload from git-scm.com
Platform-Specific Prerequisites
These are only needed if you plan to build and run the app on native mobile platforms.
For Android Development
-
Android Studio (latest stable version)
- Download from developer.android.com/studio
- Install Android SDK (API level 33 or higher recommended)
- Configure
ANDROID_HOMEenvironment variable - Install Android SDK Build-Tools and Platform-Tools
-
Java Development Kit (JDK) 11 or 17
- JDK 17 is recommended for Android development
- Verify with:
java -version
For iOS Development (macOS only)
-
Xcode 14+ (latest stable version)
- Download from Mac App Store
- Install Xcode Command Line Tools:
xcode-select --install - Open Xcode and accept license agreements
-
CocoaPods
Installation Steps
Clone the Repository
Clone the project repository to your local machine:Verify you’re in the correct directory:
Install Dependencies
Install all npm dependencies defined in This will install:
package.json:Core Framework Dependencies
@angular/core@^18.2.0- Angular framework@ionic/angular@^8.4.3- Ionic UI components@capacitor/core@^7.4.2- Native device APIs@capacitor/[email protected]- Android platform support
State Management
@ngrx/store@^18.1.1- State management@ngrx/signals@^18.1.1- Signal-based reactive state@ngrx/effects@^18.1.1- Side effect management
Mapping & Location
mapbox-gl@^3.15.0- Interactive maps@angular/google-maps@^18.2.14- Google Maps integration (fallback)@turf/turf@^7.2.0- Geospatial calculations@capacitor/geolocation@^7.1.5- Native GPS access
Real-time Communication
socket.io-client@^4.8.1- WebSocket connections for live tracking
Native Device Features
@aparajita/capacitor-secure-storage@^7.1.6- Encrypted token storage@capacitor/preferences@^7.0.2- Local data persistence@capacitor/[email protected]- Vibration feedback@capacitor/[email protected]- Keyboard appearance control@capacitor/[email protected]- Status bar styling
UI & Utilities
ionicons@^8.0.9- Icon libraryngx-toastr@^18.0.0- Toast notificationsrxjs@~7.8.0- Reactive programming
The installation may take several minutes depending on your internet connection and machine performance.
Configure Environment Variables
Set up your environment configuration files. The app uses Angular’s environment replacement system.
Development Environment
Editsrc/environments/environment.ts:src/environments/environment.ts
Production Environment
Editsrc/environments/environment.prod.ts for production builds:src/environments/environment.prod.ts
Configuration Details
| Variable | Description | Required |
|---|---|---|
apiUrl | Backend REST API base URL | Yes |
wsBase | WebSocket server URL for real-time updates | Yes |
appAudience | JWT audience claim (must be passenger_app) | Yes |
expectedUserType | User type validation (must be passenger) | Yes |
mapbox.accessToken | Mapbox API token for maps and geocoding | Yes |
debug | Enable debug logging | No |
debugTags | Filter debug logs by tag | No |
Obtain Mapbox Access Token
Rodando Passenger uses Mapbox for all mapping functionality. You need a valid Mapbox access token:
-
Create a Mapbox Account
- Go to mapbox.com and sign up (free tier available)
-
Get Your Access Token
- Navigate to your account dashboard
- Copy your default public token, or create a new one
-
Configure Scopes (for new tokens)
- Ensure these scopes are enabled:
styles:read- Map renderingfonts:read- Map labelsdatasets:read- Dataset accessgeocoding:read- Geocoding API (place search, reverse geocode)directions:read- Directions API (route calculation)
- Ensure these scopes are enabled:
-
Add Token to Environment
The free tier includes 50,000 map loads and 100,000 geocoding requests per month, which is sufficient for development.
Platform-Specific Setup
Android Configuration
Add Android Platform
If not already added, initialize Capacitor for Android:This creates the
android/ directory with the native Android project.Update Android App ID
Change the default app ID to your own:
-
Update
capacitor.config.ts: -
Sync changes to Android:
iOS Configuration (macOS only)
Add iOS Platform
Initialize Capacitor for iOS:This creates the
ios/ directory with the native iOS project.Update Bundle Identifier
Change the default bundle identifier:
- Update
capacitor.config.ts(same as Android step) - Sync changes:
- Open Xcode and update the bundle identifier in the project settings
Running the Application
Development Server (Browser)
For rapid development with live reload:http://localhost:8100.
Native Platforms
Android
iOS
Build Configuration
Theangular.json file defines build configurations:
Development Build
- Source maps enabled
- No optimization
- No file hashing
- Fast build times
Production Build
- Code minification
- Tree shaking
- AOT compilation
- File hashing for cache busting
- Environment file replacement (
environment.ts→environment.prod.ts) - Bundle size budgets:
- Initial bundle: max 5MB (warning at 2MB)
- Component styles: max 16KB (warning at 10KB)
Production builds are output to the
www/ directory, which is used by Capacitor for native builds.Troubleshooting
Common Installation Issues
Node Version Incompatibility
Error: “The engine ‘node’ is incompatible” Solution: Use Node.js 16, 18, or 20. Check with:Capacitor Sync Failures
Error: “Capacitor could not sync” Solution:- Delete platform directories:
- Rebuild:
Android Build Errors
Error: “Could not find com.android.tools.build:gradle” Solution:- Open Android Studio
- Go to File > Settings > Appearance & Behavior > System Settings > Android SDK
- Ensure Android SDK Build-Tools and Platform-Tools are installed
- Set
ANDROID_HOMEenvironment variable:
iOS Pod Install Failures
Error: “Unable to find a specification for…” Solution:Mapbox Not Rendering
Symptoms: Blank map area or “403 Unauthorized” errors Solutions:- Verify your Mapbox token is valid
- Check token scopes include
styles:readandfonts:read - Ensure no trailing spaces in the token string
- Check browser console for CORS errors
- Test token at mapbox.com/account/access-tokens
WebSocket Connection Failed
Symptoms: “WebSocket connection to ‘ws://…’ failed” Solutions:- Verify backend WebSocket server is running
- Check
wsBaseURL in environment file - For Android emulator, use
ws://10.0.2.2:3000 - For iOS simulator, use
ws://localhost:3000 - For physical devices, use your local network IP:
ws://192.168.1.x:3000 - Ensure firewall allows WebSocket connections
Build Performance
If builds are slow:-
Increase Node memory:
-
Use development mode:
-
Disable source maps (in
angular.json):
Next Steps
With the installation complete, you’re ready to explore the app:Core Features
Learn about authentication, trip booking, and tracking
Architecture
Understand the app’s structure and design patterns
State Management
Deep dive into NgRx Signals implementation
Development
Development workflow and best practices