System Manual for Fitness and Diet Forum - bounswe/bounswe2024group4 GitHub Wiki

System Requirements

We are using a 4 GB RAM 2 vCPU 80 GB disk space AMD machine on DigitalOcean, which is sufficient for the application to be run. While weaker machines can be enough for the application's regular operation, we found that the time necessary for frontend compilation significantly increases with a weaker machine, so we opted for this one.

Docker installation

Follow this guide to install Docker on a DigitalOcean machine.

Installing the app (backend and frontend)

Whole application can be run either with Docker compose or by running each component on its own.

Docker compose approach

  1. Install docker compose by following this guide.

  2. Set the .env file under root directory to

DB_NAME=fitness_app
DB_USER=root
DB_PASSWORD=****
DB_HOST=localhost
DB_PORT=3306
EXERCISES_API_KEY=
EDAMAM_APP_ID=
EDAMAM_APP_KEY=
FIREBASE_TYPE="service_account"
FIREBASE_PROJECT_ID=
FIREBASE_PRIVATE_KEY_ID=
FIREBASE_PRIVATE_KEY=
FIREBASE_CLIENT_EMAIL=
FIREBASE_CLIENT_ID=
FIREBASE_AUTH_URI=
FIREBASE_TOKEN_URI=
FIREBASE_AUTH_PROVIDER_X509_CERT_URL="https://www.googleapis.com/oauth2/v1/certs"
FIREBASE_CLIENT_X509_CERT_URL=
FIREBASE_UNIVERSE_DOMAIN="googleapis.com"

Set the .env file under frontend to:

REACT_APP_API_URL=127.0.0.1
  1. Run docker compose up.

Separate components approach

  1. Set the .env files in the same manner as step 2 of Docker compose approach.
  2. Follow through the backend's README to run the backend.
  3. Follow through the frontend's README to run frontend.

Frontend will be up at http://127.0.0.1:3000.

Mobile

  1. Set the .env file under mobile directory to
EXPO_PUBLIC_API_URL=DEPLOY_URL
  1. Run npm install.
  2. Create an Android device in Android Studio.
  3. Run npx expo start and press a to run Android emulation on Android Studio.