-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 Movin' In as project name and click on Create.
-
Go to Movin' In 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:
MI_API_HOST=https://movinin.io:4004
MI_DEFAULT_LANGUAGE=en
MI_PAGE_SIZE=20
MI_PROPERTIES_PAGE_SIZE=8
MI_BOOKINGS_PAGE_SIZE=8
MI_CDN_USERS=https://movinin.io/cdn/movinin/users
MI_CDN_PROPERTIES=https://movinin.io/cdn/movinin/properties
MI_AGENCY_IMAGE_WIDTH=60
MI_AGENCY_IMAGE_HEIGHT=30
MI_PROPERTY_IMAGE_WIDTH=300
MI_PROPERTY_IMAGE_HEIGHT=200
MI_MINIMUM_AGE=21
MI_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY
MI_STRIPE_MERCHANT_IDENTIFIER=MERCHANT_IDENTIFIER
MI_STRIPE_COUNTRY_CODE=US
MI_STRIPE_CURRENCY_CODE=USD
Set the following options:
MI_API_HOST=https://movinin.io:4004
MI_CDN_USERS=https://movinin.io/cdn/movinin/users
MI_CDN_PROPERTIES=https://movinin.io/cdn/movinin/properties
MI_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY
MI_STRIPE_MERCHANT_IDENTIFIER=MERCHANT_IDENTIFIER
MI_STRIPE_COUNTRY_CODE=US
MI_STRIPE_CURRENCY_CODE=USD
Replace https://movinin.io
with an IP, hostname or FQDN.
If you want to enable stripe payment gateway, set stripe publishable key in MI_STRIPE_PUBLISHABLE_KEY
. You can retrieve it from stripe dashboard. Use stripe in test mode.
MI_STRIPE_MERCHANT_IDENTIFIER
is the merchant identifier you registered with Apple for use with Apple Pay.
MI_STRIPE_COUNTRY_CODE
is the two-letter ISO 3166 code of the country of your business, e.g. "US". Required for Stripe payments.
MI_STRIPE_CURRENCY_CODE
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 http://localhost/cdn
On Windows, install IIS and add full access permissions to the user who is running Movin' In API on C:\inetpub\wwwroot\cdn\movinin
.
On Linux, install NGINX and update /etc/nginx/sites-enabled/default
as follows:
server {
listen 80 default_server;
server_name _;
...
location /cdn {
alias /var/www/cdn;
}
}
Create /var/www/cdn/movinin
folder add full access permissions to the user who is running Movin' In API on /var/www/cdn/movinin
.
Configure ./api
by following these instructions.
Run ./api
with the following command:
cd ./api
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 Movin' In mobile app.
If you want to enable Movin' In 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.
Copyright © 2024 Akram El Assas. All rights reserved.