Deploy Api-Server, Admin Web dashboard, Mobile App(Rider/Driver) in Local machine

Requirement

Api server

Installation Steps

Step1: Download the taxi app and extract it

Step2: Open terminal and Go to Full-apps folder where you have extracted, there you would find 3 modules api-server, admin-dashboard, mobile-app

Step3: Goto api-server folder and install npm or yarn npm install or yarn

Step4: Open an another terminal and enter mongod this would start mongo server

Step5: Update the OneSignal AppId and Api key for Rider & Driver App in apiserver/server/service/pushNotification.js

Step6: Start the api server npm start now api-server is up and running

Common issue of mongo server

unable to lock file: /data/db/mongod.lock resource temporarily unavailable. Is a mongod instance already running? , terminating, You need to enter,
sudo killall -15 mongod

Admin Webdashboard

Installation steps

Step1: Open an another terminal Go to api-server folder and enter npm run-script seed

Common issue while scripting seed

Duplicate key error collection

Open another terminal type mongo

  • Type show dbs

  • Copy taxiApp-development from above stated

  • Type use and paste taxiApp-developmentor write it

  • Type db.dropDatabase()

  • Then taxiApp-development would be dropped

  • To check if dropped again type show dbs

  • The taxiApp-development appear

  • Exit it

Step2: Open another terminal Goto Webdashboard folder

  • Type npm i
  • Open sublime or any editor,in src/services/apiconfig.js copy IP address in network preference And paste it here then save it then start the npm by npm start
  • Now the admin dashboard gets open, If you wish to change the credentials of dashboard you can do so, Go to api-server/Script/admin.js and edit user object{}

    Note: Make sure after changing credentials you need to script seed again follow Step1 of Admin Dashboard

Mobile App(Rider/Driver app)

Installation steps

Note: Before Starting Mobile app(Rider/Driver) you need to seed the database follow Step1 of Admin Dasbhboard

Steps: Initiate app for Rider/Driver Goto rider app folder

  • Type npm i
  • Navigate to ios folder in mobile App and do pod install
  • Open sublime or any editor
  • Rider app / Driver app go to mobileApp/AppName/config.js .serverSideUrl: "paste the ip address or the url and the port "

Configure Mobile App

We have setup the environment for Facebook , Google, sentry , oneSignal You just have to update your credentails .

Update the Info.plist file in AppName/ios/AppName folder .

-> Update YOUR_SERVER_URL with your server url . -> Update YOUR_CLIENT_ID for Google login .

Configuring Google Map

Update YOUR_GOOGLE_API_KEY in AppName/ios/AppName/AppDelegate.m file for ios .

Update YOUR_GOOGLE_API_KEY in AppName/android/app/src/main/AndroidManifest.xml file for Android .

Get Google Map API key from here

If you have trouble setting up folllow here

Configuring Facebook Login

Create App on Facebook Developer

You need to update the Facebook App ID in ios/Rider/Info.plist && android/app/src/main/res/values/strings.xml

If you have trouble setting up folllow here

Configuring Google Login

Create OAuth client ID follow here

You need to update the YOUR_CLIENT_ID in ios/AppName/Info.plist and add file google-services.json in AppName/androoid/app folder .

Folllow documnetation here and link your Mobile App

Configuring Sentry

Create App on sentry.io You need to update sentry.properties file inside ios folder and in android folder, along with it update the DNS for your app in App.js in root folder of Mobile App

Folllow documnetation here and link your Mobile App .

Configuring OneSignal

Before setting up the onesignal you will need to genrate an iOS Push Certificate && a Google Server API Key on Firebase console .

You need to update key OnesignalAppId inside config.js file in your app in root folder of Mobile App

You have folllow here to setup the environment .

  • If you would like to run app in android you need to connect the android phone to a system or via android emulator, and type react-native run-android Make sure you have configured the AVD before running the command,If you would like to run app in iPhone simulator (MacOS) run react-native run-ios

    Note : Make sure you have same network in the mobile If you are running app on ios make sure you have open AppName.xcworkspace .

results matching ""

    No results matching ""