> ## Documentation Index
> Fetch the complete documentation index at: https://mitchsorg.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Use Cashboard App locally in under 5 minutes

## Setup your development

Learn how to use the Cashboard App locally.

### Edit and preview

1. Create a directory

```
mkdir project-new
```

2. Clone the GitHub repository

```
git clone https://github.com/MuthoniMN/cashboard/ 
```

3. Create `.env` files for the client and server directories.
4. Use the `.env.example` for the client and server directories

### Environment Variables

#### 1.  Frontend

1. Create an `.env` file in the `client` directory.
2. Use the `.env.example` as a template
3. Go to [FreeCurrencyAPI](https://freecurrencyapi.com/) and get an API key.
4. Change the API url to `http://localhost:5000`

#### 2. Backend

1. Create an `.env` file in the `server` directory.
2. Use the `.env.example` as a template
3. Go to [MongoDB Atlas](https://www.mongodb.com/cloud/atlas/register) and create a database instance.

> Do not use a local MongoDB instance because the app requires a replica set to run transactions which comes automatically in MongoDB Atlas database.

4. Generate a salt and secret key for hashing passwords

### Run the App

1. Install the dependencies for the frontend

```
cd client/
npm install
```

2. Install the dependencies for the backend

```
cd server/
npm install
```

3. Run the backend

```
npm run dev
```

4. Run the frontend

```
npm run dev
```
