> For the complete documentation index, see [llms.txt](https://knowlephant.gitbook.io/react-native-share-backend-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowlephant.gitbook.io/react-native-share-backend-app/quick-start.md).

# Quick Start

{% hint style="warning" %}
**If you find yourself stranded or needing more details on how to install each service, I'd like to refer you to the 'How to' guides that contain all the necessary steps on how to successfully setup your** [**ServerApi**](/react-native-share-backend-app/installation-serverapi-1/how-to-deploy-in-development.md) **and** [**MobileApp**](/react-native-share-backend-app/how-to-deploy-in-development.md) **projects.**
{% endhint %}

### **Setting up your server app**

1. **ServerApi**

* Download the project zip file from your purchase page.
* Open *ServerApi* in our preferred code editor.
* Install the latest version of [*Node.js*](https://nodejs.org/en/)*.*
* Create a `.env` file in our main project file that will contain all local environment variables used to run the server app.

**2. MongoDB Atlas**

* Sign up for your [MongoDB Atlas](https://www.mongodb.com/) account.
* Create a Free Cluster.
* Connect with your ServerApi project by storing your connection string in a local environment variable named: `MONGODB_CONNECTION_STRING.`

**3. Cloudinary**

* Sign up for your [Cloudinary](https://cloudinary.com/) account.
* Connect with your ServerApi project by storing your cloud name and api keys strings in local environment variables named: `CLOUDINARY_CLOUD_NAME` ,`CLOUDINARY_API_KEY`, and `CLOUDINARY_API_SECRET.`

**4. Sendgrid**

* Sign up for your [SendGrid](https://sendgrid.com/) account.
* Connect with your ServerApi project by storing your api key string in local environment variables named: `SENDGRID_APIKEY.`
* Update your company and app identity as displayed in your app's email notifications by changing/adding the values in the `COMPANY_INFO object in` your `constants.js` file.
* **(Optional)**: Complete the Sender Authentication steps as laid out in the Sendgrid dashboard.

**5. JWT Key**

* [Create a JWT key](https://www.grc.com/passwords.htm) and add your key string in a local environment variable named: `JWT_KEY.`

**6. Install and run**

Install and run your server api project. Simply run the following commands in Terminal / Console:

```
$ cd ApiServer

$ yarn install

$ yarn run:dev

```

Your server api should now be running with the following message:

`Server is running at: 4000`\
`Database Connected`

### Setting up your mobile apps

**1. Expo CLI**

Install the Expo command line tool using the following command:

```
npm install expo-cli --global
```

**2. Install packages**

Enter the install command to install the project dependencies:

```
$ cd MobileApp

$ yarn install
```

**3. Add global constants**

Open the constants.js file and update:&#x20;

* your app and company information:

```
export const APP_NAME = '';
export const COMPANY_NAME = '';
export const CONTACT_EMAIL = '';
```

* your API server location url:

```
const DEVELOPMENT_API_HOST = 'http://localhost:4000'; // CHANGE PORT NUMBER IF NECESSARY
```

{% hint style="warning" %}
**Note:** do make sure to set the port number to your actual local machine port number which get logged in the terminal when starting up your ApiServer project.
{% endhint %}

**4. Enable development mode**

Open the `constants.js` file and set the `development` variable to `true`:

```
const development = true;
```

**5. Firebase Cloud Messaging**

* Create a [Firebase](https://console.firebase.google.com/) project for your app.
* Add Firebase to your Android app.
* Download the `google-services.json` file and place it in your *MobileApp* root directory.

**6. Run the application**

Run either of the below commands to start up your app:

```
$ yarn run ios
```

...or on your Android emulator:

```
$ yarn run android
```

{% hint style="warning" %}
**Test on iOS Simulator or Android emulator**

To be able to test your app on the iOS simulator, then follow the instructions on how to set up iOS simulator laid out in [this link](https://docs.expo.io/workflow/ios-simulator/).

To test on Android emulator, follow the instructions on how to set up Android emulator laid out in [this link](https://docs.expo.io/workflow/android-studio-emulator/).
{% endhint %}
