Skip to content

Repository files navigation

BSG (Binary Search Gang)

What is BSG?

BSG is an attempt to recreate binarysearch.io, a website that allows user to create rooms to practice solving coding interview problems with friends.

Main components

Currently, there are 3 main component of this application:

Central Service

Central Service will contain all core business logic of BSG, including user authentication, database interaction, etc..

RTC Service (Realtime Communication)

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

Worker Service will be responsible for carrying out computational-intensive tasks.

Setup the project for development

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 .env

Fill 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-recreate

Running Unit Tests

The 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

Production

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

Releases

Packages

Used by

Contributors

Languages