BSG is an attempt to recreate binarysearch.io, a website that allows user to create rooms to practice solving coding interview problems with friends.
Currently, there are 3 main component of this application:
Central Service will contain all core business logic of BSG, including user authentication, database interaction, etc..
RTC Service will be a server that maintains socket connection between clients and the whole application for the purpose of delivering real-time notifications.
Worker Service will be responsible for carrying out computational-intensive tasks.
Create a copy of the file .env.template and name the copy as .env. In Linux or MacOS, one can run the following command:
cp .env.template .envFill out the environment variables in the .env file with any value of choosing.
Execute the following command to run the project:
docker compose --env-file ./.env up --build --force-recreateThe makefile allows for all tests to be run automatically with the command:
make test
and there are other options like if you only want to test the Go code, or just the express server code, or maybe just a specific service. You can find these commands with:
make help
The .env file should have the CADDY_SITE_ADDRESS= env variable with the respective domain name to direct traffic to if you want to use the domain and not run locally
Domain Name for our backend services
api.binarysearchgang.com
To run locally do not add CADDY_SITE_ADDRESS= to the env file and run
make run
All you have to do is run regardless of local or production
cd bsg-frontend/ && npm run build-extension