GenerateNU / Algo

Fullstack application for the Algo project
6 stars 0 forks source link

Algo

Fullstack application for the Algo project

<img src="https://github.com/GenerateNU/Algo/actions/workflows/CI.yml/badge.svg" alt="Workflow Status" />

Quick Start

git clone git@github.com:GenerateNU/Algo.git

Set Up Your Development Environment

First, understand the tech stack:

Before compiling and running our application, we need to install several languages, package managers, and various tools. The installation process can vary, so follow the instructions for each item below!

If everything was successful, you can now compile and run the project!

Extra Dependencies

Install these in the backend directory

Tools

We will be using some tools to make development a bit easier.

If you wish to simulate the app on a phone on your computer, the following will work;

Third party integrations

For this project, we will be using some third-party APIs.

Running the project

Before running the project, you must add a .env file at the root directory. To this file, add the variable EXPO_PUBLIC_API_DOMAIN={your ngrok static domain here}. This will allow us to expose the development environment to the Internet. AKA, it puts localhost on the web for a short period.

Docker

We will be containerizing our PostGreSQL database in Docker. Follow the steps below to add the DB to your local machine.

  1. Install Docker You should be able to run docker in your terminal if this was successful.
  2. Install Docker Desktop
  3. Run make db-run from the root directory, this will spin up a postgres image.

Backend

  1. From root directory, run make backend-run
  2. Once this has succesfuly spun up, run make backend-ngrok. This is necessary for connecting to a the different emulators, or your own phone if you download Expo Go.

Frontend

  1. From the root diectory, as long as you've already run make frontend-dep recently, run make frontend-run. This will start the expo app.
  2. Starting an expo app has choices; it comes prepackeged with a QR code, which you can scan to open the app in Expo Go
  3. If you want to run the app on your computer, you will need to make sure you spin up the relevant emulator. This is either an Android Studio emulator if you want to run on Android, or an XCode simulator if you want to run on iOS
  4. To run on android, press a. To run on iOS, press i