-
-
Notifications
You must be signed in to change notification settings - Fork 258
Run Mobile App
-
If you don't have an Expo account, you'll need to create one.
-
Go to ./mobile folder and run the following command to login to expo:
npx expo login
-
Go to expo.dev, Click on Pojects then Create a Project. Set BookCars as project name and click on Create.
-
Go to BookCars project and copy the project ID. Open ./mobile/app.json and paste the project ID in extra.eas.projectId.
To run the mobile app, create ./mobile/.env
file with the following content:
BC_API_HOST=https://bookcars.ma:4002
BC_DEFAULT_LANGUAGE=en
BC_PAGE_SIZE=20
BC_CARS_PAGE_SIZE=8
BC_BOOKINGS_PAGE_SIZE=8
BC_CDN_USERS=https://bookcars.ma/cdn/bookcars/users
BC_CDN_CARS=https://bookcars.ma/cdn/bookcars/cars
BC_CDN_LICENSES=http://bookcars.ma/cdn/bookcars/licenses
BC_CDN_TEMP_LICENSES=http://bookcars.ma/cdn/bookcars/temp/licenses
BC_SUPPLIER_IMAGE_WIDTH=60
BC_SUPPLIER_IMAGE_HEIGHT=30
BC_CAR_IMAGE_WIDTH=300
BC_CAR_IMAGE_HEIGHT=200
BC_MINIMUM_AGE=21
BC_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY
BC_STRIPE_MERCHANT_IDENTIFIER=MERCHANT_IDENTIFIER
BC_STRIPE_COUNTRY_CODE=US
BC_BASE_CURRENCY=USD
BC_DEPOSIT_FILTER_VALUE_1=250
BC_DEPOSIT_FILTER_VALUE_2=500
BC_DEPOSIT_FILTER_VALUE_3=750
BC_WEBSITE_NAME=BookCars
BC_MIN_PICK_UP_HOURS=1 # Minimum required time in hours before pick-up. Default is 1 hour.
BC_MIN_RENTAL_HOURS=1 # Minimum rental duration in hours between pick up and drop off. Default is 1 hour.
Set the following options:
BC_API_HOST=https://bookcars.ma:4002
BC_CDN_USERS=https://bookcars.ma/cdn/bookcars/users
BC_CDN_CARS=https://bookcars.ma/cdn/bookcars/cars
BC_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY
BC_STRIPE_MERCHANT_IDENTIFIER=MERCHANT_IDENTIFIER
BC_STRIPE_COUNTRY_CODE=US
BC_BASE_CURRENCY=USD
Replace https://bookcars.ma
with an IP, hostname or FQDN.
If you want to enable stripe payment gateway, set stripe publishable key in BC_STRIPE_PUBLISHABLE_KEY
. You can retrieve it from stripe dashboard. Use stripe in test mode.
BC_STRIPE_MERCHANT_IDENTIFIER
is the merchant identifier you registered with Apple for use with Apple Pay.
BC_STRIPE_COUNTRY_CODE
is the two-letter ISO 3166 code of the country of your business, e.g. "US". Required for Stripe payments.
BC_BASE_CURRENCY
is the three-letter ISO 4217 alphabetic currency code, e.g. "USD" or "EUR". Required for Stripe payments. Must be a supported currency: https://docs.stripe.com/currencies
Install the demo database by following these instructions.
Configure ./backend
by following these instructions.
Run ./backend
with the following command:
cd ./backend
npm run dev
Run the mobile app by simply installing Expo app on your device from App Store/Play Store and running the following commands from ./mobile
folder:
cd ./mobile
npm install
npm start
Open Expo app on your device and scan the QR code to run BookCars mobile app.
If you want to enable BookCars push notifications, Download google-services.json file and place it in ./mobile
root directory for push notifications. Its path can be configured from ./mobile/app.json
configuration file through googleServicesFile
setting option. Don't forget to generate a new private key in the Firebase Console and upload the JSON file to Expo dashboard.
To run iOS App on macOS, follow the steps in https://github.com/aelassas/bookcars/blob/main/mobile/ios.sh
Copyright © Akram El Assas. All rights reserved.
- Overview
- Why Use BookCars
- Software Architecture
- Advanced Features
- Installing (Self-hosted)
- Installing (Docker)
- Setup Sentry
- Payment Gateways
- Setup Stripe
- Social Login Setup
- Build Mobile App
- Demo Database
- Run from Source
- Run from Source (Docker)
- Run Mobile App
- Locations
- Auto‐Notification System
- Price Calculation
- Supplier Contracts
- Add New Language
- Add New Currency
- Logs
- Testing
- FAQ
- Release Notes
- Contribution Guide
- Code of Conduct