Skip to content

CookieHoodie/collab-coding

 
 

Repository files navigation

PeerPrep

A web application that helps students better prepare themselves for technical interviews.

Deployed endpoint: https://frontend-lpaj6pcqsa-as.a.run.app/

Development

Prerequisite

Make sure a jwt_token file with a token key is created under user-service. More details could be found in the README.md under user-service folder.

Running all services locally

First, build all the services. This needs to be run every time there's code changes.

$ bash build.sh

Then, spin up the containers.

$ bash start.sh

Open another terminal and go into frontend directory and run

$ npm start

To stop all the containers, run

$ bash stop.sh

Running individual service

Go into respective folder and run:

$ docker-compose up --build

The documentation for each service could be found under the respective folder as well.

Deployment

The services are deployed to Google Cloud Run for easier management and scalability. Continuous Deployment is setup such that every time the code is pushed to production branch, the services will be updated and pushed to production. The general steps to deploy the services are outlined below.

  1. Create as many services on Cloud Run as needed by the application
  2. Create as many mongodb databases on MongDB Atlas as needed by the services
  3. Create as many Cloud SQL databases as needed by the services
  4. Use Google Secret Manager to store the secrets such as database password needed by the services
  5. Create or use an existing service account. Make sure it has all the required permissions to access the databases and secrets.
  6. Download the service account key as JSON and add it to the secrets on Github repo to grant permission to Github Action to push the changes.
  7. In .github/workflows/cicd.yaml, setup the environment variables and secrets as needed by each service.

About

Collaborative coding platform. A project for CS3219.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Other 0.8%