-
-
Notifications
You must be signed in to change notification settings - Fork 55
Run from Source
Below are the instructions to run Movin' In from source code.
-
Install git, Node.js, NGINX or IIS, MongoDB and mongosh. If you want to use MongoDB Atlas, you can skip installing and configuring MongoDB.
-
Configure MongoDB:
mongosh
Create admin user:
db = db.getSiblingDB('admin')
db.createUser({ user: "admin", pwd: "PASSWORD", roles:["root"]})
Replace PASSWORD with a strong password.
Secure MongoDB by changing mongod.conf as follows:
net:
port: 27017
bindIp: 0.0.0.0
security:
authorization: enabled
Restart MongoDB service.
- Clone Movin' In repo:
git clone https://github.com/aelassas/movinin.git
- Create
api/.env
file with the following content:
NODE_ENV=development
MI_PORT=4004
MI_HTTPS=false
MI_PRIVATE_KEY=/etc/ssl/movinin.key
MI_CERTIFICATE=/etc/ssl/movinin.crt
MI_DB_URI=mongodb://admin:[email protected]:27017/movinin?authSource=admin&appName=movinin
MI_DB_SSL=false
MI_DB_SSL_CERT=/etc/ssl/movinin.crt
MI_DB_SSL_CA=/etc/ssl/movinin.ca.pem
MI_DB_DEBUG=false
MI_COOKIE_SECRET=COOKIE_SECRET
MI_AUTH_COOKIE_DOMAIN=localhost
MI_JWT_SECRET=JWT_SECRET
MI_JWT_EXPIRE_AT=86400
MI_TOKEN_EXPIRE_AT=86400
MI_SMTP_HOST=smtp.sendgrid.net
MI_SMTP_PORT=587
MI_SMTP_USER=apikey
MI_SMTP_PASS=PASSWORD
[email protected]
MI_CDN_USERS=/var/www/cdn/movinin/users
MI_CDN_TEMP_USERS=/var/www/cdn/movinin/temp/users
MI_CDN_PROPERTIES=/var/www/cdn/movinin/properties
MI_CDN_TEMP_PROPERTIES=/var/www/cdn/movinin/temp/properties
MI_CDN_LOCATIONS=/var/www/cdn/movinin/locations
MI_CDN_TEMP_LOCATIONS=/var/www/cdn/movinin/temp/locations
MI_DEFAULT_LANGUAGE=en
MI_BACKEND_HOST=http://localhost:3003/
MI_FRONTEND_HOST=http://localhost:3004/
MI_MINIMUM_AGE=21
MI_EXPO_ACCESS_TOKEN=EXPO_ACCESS_TOKEN
MI_STRIPE_SECRET_KEY=STRIPE_SECRET_KEY
MI_PAYPAL_SANDBOX=true
MI_PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID
MI_PAYPAL_CLIENT_SECRET=PAYPAL_CLIENT_SECRET
[email protected]
MI_RECAPTCHA_SECRET=RECAPTCHA_SECRET
MI_WEBSITE_NAME="Movin' In"
MI_TIMEZONE=UTC # TZ identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
MI_IPINFO_API_KEY=IPINFO_API_KEY # required for more than 1000 requests/day
MI_IPINFO_DEFAULT_COUNTRY=US # ISO 3166-1 alpha-2 (two-letter country code)
On Windows, install IIS and update the following settings with these values:
MI_CDN_USERS=C:\inetpub\wwwroot\cdn\movinin\users
MI_CDN_TEMP_USERS=C:\inetpub\wwwroot\cdn\movinin\temp\users
MI_CDN_PROPERTIES=C:\inetpub\wwwroot\cdn\movinin\properties
MI_CDN_TEMP_PROPERTIES=C:\inetpub\wwwroot\cdn\movinin\temp\properties
MI_TIMEZONE=UTC
Add full access permissions to the user who is running Movin' In API on C:\inetpub\wwwroot\cdn\movinin
.
Then, set the following options:
MI_DB_URI=mongodb://admin:[email protected]:27017/movinin?authSource=admin&appName=movinin
MI_COOKIE_SECRET=COOKIE_SECRET
MI_JWT_SECRET=JWT_SECRET
MI_SMTP_HOST=smtp.sendgrid.net
MI_SMTP_PORT=587
MI_SMTP_USER=apikey
MI_SMTP_PASS=PASSWORD
[email protected]
If you want to use MongoDB Atlas, put you MongoDB Atlas URI in MI_DB_URI
otherwise replace PASSWORD
in MI_DB_URI
with your MongoDB password. Replace JWT_SECRET
with a secret token. Finally, set the SMTP options. SMTP options are necessary for sign up. You can use sendgrid or any other transactional email provider.
If you choose sendgrid, create an account on sendgrid.com, login and go to the dashboard. On the left panel, click on Email API, then on Integration Guide. Then, choose SMTP Relay and follow the steps. You will be prompted to create an API Key. Once you create the API Key and verify the smtp relay, copy the API key in MI_SMTP_PASS
in ./api/.env. Sendgrid's free plan allows to send up to 100 emails/day. If you need to send more than 100 emails/day, switch to a paid plan or choose another transactional email provider.
COOKIE_SECRET
and JWT_SECRET
should at least be 32 characters long, but the longer the better. You can use an online password generator and set the password length to 32 or longer.
MI_TIMEZONE
is used for cenverting dates from UTC to local time in emails. Must be a valid TZ idenfidier. Default is UTC.
If you want to enable push notifications in the mobile app, follow these instructions and set the following option:
MI_EXPO_ACCESS_TOKEN=EXPO_ACCESS_TOKEN
If you want to enable stripe payment gateway, sign up for a stripe account, fill the forms and save the publishable key and the secret key from stripe dashboard. Then, set the secret key in the following option in api/.env:
BC_STRIPE_SECRET_KEY=STRIPE_SECRET_KEY
Don't expose stripe secret key on a website or embed it in a mobile application. It must be secret and stored securely in the server-side. Use stripe in test mode.
If you want to use PayPal payment gateway instead of Stripe, you need to set:
MI_PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID
MI_PAYPAL_CLIENT_SECRET=PAYPAL_CLIENT_SECRET
If you want to test PayPal in sandbox mode, leave:
MI_PAYPAL_SANDBOX=true
If you want to test PayPal in production mode, set:
MI_PAYPAL_SANDBOX=false
Run the api:
cd ./api
npm install
npm run dev
- Create
backend/.env
file with the following content:
VITE_NODE_ENV=development
VITE_PORT=3003
VITE_MI_API_HOST=http://localhost:4004
VITE_MI_DEFAULT_LANGUAGE=en
VITE_MI_PAGE_SIZE=30
VITE_MI_PROPERTIES_PAGE_SIZE=15
VITE_MI_BOOKINGS_PAGE_SIZE=20
VITE_MI_BOOKINGS_MOBILE_PAGE_SIZE=10
VITE_MI_CDN_USERS=http://localhost/cdn/movinin/users
VITE_MI_CDN_TEMP_USERS=http://localhost/cdn/movinin/temp/users
VITE_MI_CDN_PROPERTIES=http://localhost/cdn/movinin/properties
VITE_MI_CDN_TEMP_PROPERTIES=http://localhost/cdn/movinin/temp/properties
VITE_MI_CDN_LOCATIONS=http://localhost/cdn/movinin/locations
VITE_MI_CDN_TEMP_LOCATIONS=http://localhost/cdn/movinin/temp/locations
VITE_MI_AGENCY_IMAGE_WIDTH=60
VITE_MI_AGENCY_IMAGE_HEIGHT=30
VITE_MI_PROPERTY_IMAGE_WIDTH=300
VITE_MI_PROPERTY_IMAGE_HEIGHT=200
VITE_MI_MINIMUM_AGE=21
VITE_MI_PAGINATION_MODE=classic
VITE_MI_CURRENCY=\$
VITE_MI_WEBSITE_NAME="Movin' In"
VITE_MI_PAGINATION_MODE
: You can choose between classic
or infinite_scroll
. This option defaults to classic
. If you choose classic
, you will get a classic pager with next and previous buttons on desktop and infinite scroll on mobile. If you choose infinite_scroll
, you will get infinite scroll on desktop and mobile.
Run the backend:
cd ./backend
npm install --force
npm run dev
- Create
frontend/.env
file with the following content:
VITE_NODE_ENV=development
VITE_PORT=3004
VITE_MI_API_HOST=http://localhost:4004
VITE_MI_DEFAULT_LANGUAGE=en
VITE_MI_PAGE_SIZE=30
VITE_MI_PROPERTIES_PAGE_SIZE=15
VITE_MI_BOOKINGS_PAGE_SIZE=20
VITE_MI_BOOKINGS_MOBILE_PAGE_SIZE=10
VITE_MI_CDN_USERS=http://localhost/cdn/movinin/users
VITE_MI_CDN_PROPERTIES=http://localhost/cdn/movinin/properties
VITE_MI_CDN_LOCATIONS=http://localhost/cdn/movinin/locations
VITE_MI_AGENCY_IMAGE_WIDTH=60
VITE_MI_AGENCY_IMAGE_HEIGHT=30
VITE_MI_PROPERTY_IMAGE_WIDTH=300
VITE_MI_PROPERTY_IMAGE_HEIGHT=200
VITE_MI_MINIMUM_AGE=21
VITE_MI_PAGINATION_MODE=classic # classic or infinite_scroll
VITE_MI_PAYMENT_GATEWAY=Stripe # Stripe or PayPal
VITE_MI_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY
VITE_MI_PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID
VITE_MI_BASE_CURRENCY=USD
VITE_MI_SET_LANGUAGE_FROM_IP=false
VITE_MI_GOOGLE_ANALYTICS_ENABLED=false
VITE_MI_GOOGLE_ANALYTICS_ID=G-XXXXXXXXXXX
VITE_MI_FB_APP_ID=XXXXXXXXXX
VITE_MI_APPLE_ID=XXXXXXXXXX
VITE_MI_GG_APP_ID=XXXXXXXXXX
VITE_MI_MIN_LOCATIONS=4
[email protected]
VITE_MI_WEBSITE_NAME="Movin' In"
VITE_MI_HIDE_AGENCIES=false
If you want to enable stripe payment gateway, set stripe publishable key in VITE_BC_STRIPE_PUBLISHABLE_KEY
. You can retrieve it from stripe dashboard.
VITE_MI_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
reCAPTCHA is by default disabled. If you want to enable it, you have to set VITE_MI_RECAPTCHA_ENABLED
to true
and VITE_MI_RECAPTCHA_SITE_KEY
to Google reCAPTCHA site key.
If you want to use PayPal payment gateway instead of Stripe, you need to set this:
VITE_MI_PAYMENT_GATEWAY=PayPal # Stripe or PayPal
VITE_MI_PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID
You can find PayPal client id in PayPal Developer Dashboard.
Run the frontend:
cd ./frontend
npm install --force
npm run dev
- If you want to run the mobile app, create
mobile/.env
file with the following content:
MI_API_HOST=https://movinin.io:4002
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_BASE_CURRENCY=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_BASE_CURRENCY=USD
You need to replace https://movinin.io
with an IP or hostname.
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.
- Configure http://localhost/cdn
- On Windows, install IIS and create
C:\inetpub\wwwroot\cdn\movinin
folder. Finally, add full access permissions to the user who is running Movin' In API onC:\inetpub\wwwroot\cdn\movinin
. - On Linux, install NGINX and add cdn folder by changing /etc/nginx/sites-available/default as follows:
server {
listen 80 default_server;
server_name _;
...
location /cdn {
alias /var/www/cdn;
}
}
Create /var/www/cdn/movinin
folder and add full access permissions to the user who is running Movin' In API on /var/www/cdn/movinin
.
-
Create an admin user from http://localhost:3003/sign-up
-
To run the mobile app simply download Expo app on your device and run the following commands from ./mobile folder:
npm install
npm start
You need to download the google-services.json file and place it in ./mobile root directory for push notifications.
You can find detailed instructions about running the mobile app here.
To change the currency, follow these instructions.
Copyright © 2025 Akram El Assas. All rights reserved.