# How to deploy in local machine

## Deploy Api-Server, Admin Web Dashboard, Mobile App and Amplitude Dashboard for Analytics in Local machine

### Installation Steps

* Download Lyoneat full app and extract it
* Open terminal in extracted folder

#### Api Server

1. &#x20;run **`cd lyoneat-multivendor-api`** in terminal
2. Set environment file (.env)\
   `NODE_ENV=development` \
   `PORT=8000` \
   `CONNECTION_STRING={DB Connection string}` \
   `RESET_PASSWORD_LINK=http://localhost:{Admin Dashboard port no}/auth/reset/?reset= SERVER_URL=http://{local network IP address}:{port no}/ NOTIFICATION_ON_CLICK=http://{local network IP address}:{port no}/dashboard`
3. Create an account on mlab, then Create a database on mlab, copy connection string and paste it in `.env` against the key `CONNECTION_STRING`. Read more about how to use mlab [here](https://docs.mlab.com/)
4. run **`npm install`** or **`yarn install`**  to install packages
5. then run **`node index.js`** in terminal. look for messages in terminal for completion of seeding data. Now run **`cd ..`** in terminal and follow next steps.
6. ru&#x6E;**`npm start`** in terminal to start server



**NOTE: For notifications to work on android you'll have to upload FCM token on expo server. Read more about it** [**here**](https://docs.expo.io/versions/latest/guides/using-fcm/#uploading-server-credentials)

#### Admin Web Dashboard

1. run **`cd lyoneat-multivendor-admin`** in terminal
2. Install packages by **`npm install`** or **`yarn install`**
3. update `server_url` in `/config/config.js` if you are running API/Server on different url/port
4. run **`npm start`**&#x20;

#### Mobile App

1. Go to folder **`lyoneat-mutlivendor-app`**
2. Install packages by **`npm install`** or **`yarn install`**&#x20;
3. update `GRAPHQL_URL`  and  `WS_GRAPHQL_URL` in `/environment.js` if you are running API/Server on different url/port
4. Run the mobile app by **`npm start`**&#x20;
5. Scan the QR code with the Expo app (Android) or the Camera app (iOS).

#### Rider App

1. Go to folder **`lyoneat-multivendor-rider`**
2. Install packages by **`npm install`** or **`yarn install`**&#x20;
3. update `GRAPHQL_URL`  and  `WS_GRAPHQL_URL` in `/environment.js` if you are running API/Server on different url/port
4. Run the mobile app by **`npm start`**&#x20;
5. Scan the QR code with the Expo app (Android) or the Camera app (iOS).

#### Restaurant App

1. Go to folder **`lyoneat-multivendor-restaurant`**
2. Install packages by **`npm install`** or **`yarn install`**&#x20;
3. update `GRAPHQL_URL`  and  `WS_GRAPHQL_URL` in `/environment.js` if you are running API/Server on different url/port
4. Run the mobile app by **`npm start`**&#x20;
5. Scan the QR code with the Expo app (Android) or the Camera app (iOS).

#### Analytics Dashboard

1. Explore demo version on [https://amplitude.com](https://amplitude.com) get amplitude key and replace it with amplitudeApiKey  in app.json of mobile app.
2. You can further explore dashboard by following amplitude documentation. [https://developers.amplitude.com/](https://developers.amplitude.com/)
