Deploy ApolloServer, Admin Web dashboard, and Mobile App on local machine

1. A Prerequisite needed before starting installation

  • OneSignal

Hit link you wish to configure iOS & Android for one signal installation and follow steps

Optional

API (ApolloServer)

Installation steps

Steps to initiate the Dating App

  • Go to ApiServer/server/service/sendMessage.js and add
    const accountSid = '',
    const authToken = '',
    from: "Twilio_Account_PhoneNumber" in line 4,5,9

  • Go to ApiServer/server/service/sendMail.js and add
    user: "YOUR_EMAIL",
    pass: "YOUR_PASSWORD" in line 11, 12

  • Go to ApiServer/server/service/sendPushNotification.js and add
    oneSignalApiKey: 'YOUR_ONE_SIGNAL_API_KEY',
    oneSignalAppId: 'YOUR ONE_SIGNAL_APP_ID' in line 10, 11

  • Go to ApiServer/script/appConfig.js and add

    Razorpay Key: 'YOUR RAZORPAY_KEY',
    oneSignalAppId: 'YOUR ONE_SIGNAL_APP_ID',
    FacebookAppID: 'YOUR FACEBOOKAPPID' in line 62, 67 and 72

  • Go to ApiServer/env and add

    JWT_SECRET: 'YOUR_JWT_SECRET_KEY' in line 2

  • You can find the API key & Api Id in Onesignal.com Settings->Keys & IDs tab .

  • Run npm install or yarn install
  • Open another terminal and enter mongod this would start mongo server
  • Start the api server npm start now api-server is up and running

The common issue of the 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 Web Dashboard

Installation steps

Step1 Open another terminal Go to ApiServer folder and enter npm run-script seed

Step2: Open the project folder in any editor of your choice

  • Open WebDashboard/react/src/config-local.js
  • Change the API endpoints in the Environments Object for development as well as production. http://Your_IPAddress:Port_No/graphql,
    ws://Your_IPAddress:Port_No/graphql''

  • Adding OneSignal details for Push Notification: Navigate to WebDashboard/react/src/config-local.js and update OnesignalAppId: '' in line 4.

Step3: Open another terminal Go to the WebDashboard folder

  • Navigate to react folder cd react
  • Type npm i
  • Start the npm by npm start
  • This will open the admin dashboard.

Mobile App

Installation steps

Note: Before starting the mobile app, you need to seed the database. Follow Step 1 of Admin Dasbhboard.

Steps to initiate the app.

  • Go to the MobileApp folder
  • Type npm i
  • Go to ios folder run pod install (For running app on ios)
  • Open a code editor of your choice.
  • Go to MobileApp/config.js. Update

    http://Your_IPAddress:Port_No/graphql,
    ws://Your_IPAddress:Port_No/graphql''

  • Add Facebook App Id for IOS: Navigate to MobileApp/ios/DatingApp/Info.plist and replace fbAPP_ID with fbYOUR_APPID in line 28, APP_ID with YOUR_APP_ID in line 37. For Android, navigate to MobileApp/android/app/src/main/res/values/strings.xml and replace APP_ID with YOUR_APP_ID in line 4.

  • Adding OneSignal details for Push Notification: Navigate to MobileApp/config.js and update OnesignalAppId: '' in line 5.

  • Add Instagram Client Id: Navigate to MobileApp/src/screens/socailLogin/socialComponent.js and update
    instaCliendId = '',
    instaAppId = '',
    instaAppSecret = '',
    spotifyClientId = '',
    redirectUrl ='' in line 8,9,10,11,12

  • Configure RazorPay:

    Go to `MobileApp/src/components/Razorpay/index.js and add

    RAZOR_PAY_KEY = '' in line 4

  • Add Sentry details for crash reporting: Navigate to MobileApp/ios/sentry.properties with your credentails for IOS and for Android, navigate to MobileApp/android/sentry.properties .

  • Configuure CodePush:

    Go to MobileApp/android/app/src/main/res/values/strings.xmland add CodePushKey in line 2

    Go to MobileApp/ios/DatingApp/Info.plist and add CodePushKey in line 35

  • Configuure Cloudinary:

    Go to MobileApp/src/screens/signUp/index.js and add ApiUrl in line 196 and upload preset data in line 211

    Go to MobileApp/src/containers/uploadImage.js and add ApiUrl in line 24 and upload preset data in line 39

NOTE: Make sure you run the DatingApp.xcworkspace project

  • If you would like to run the app in Android, you need to connect an Android phone to a system or you can run the app on an Android emulator. Type react-native run-android Make sure that you have configured the AVD before running the command. If you would like to run app on an iPhone simulator(MacOS), run react-native run-ios.

results matching ""

    No results matching ""