Setup your development

Learn how to use the Cashboard App locally.

Edit and preview

  1. Create a directory
mkdir project-new
  1. Clone the GitHub repository
git clone https://github.com/MuthoniMN/cashboard/ 
  1. Create .env files for the client and server directories.
  2. 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 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 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.
  1. Generate a salt and secret key for hashing passwords

Run the App

  1. Install the dependencies for the frontend
cd client/
npm install
  1. Install the dependencies for the backend
cd server/
npm install
  1. Run the backend
npm run dev
  1. Run the frontend
npm run dev