This is a demonstration project for showing Bazel in use for a monorepo-type application setup.
Note: This is just an example of how Bazel might be used, the specific details of the project are mostly irrevelant and should not be considered best practices or any like it.
It is primarily divided into 5 main packages.
- Data - Contains all the interactions with the database
- Frontend - Contains a React app for simple chore management
- Schema - Contains protobuf definitions and code generation for the API
- Server - Contains an Express server that hosts everything
The best way to get started is to install bazelisk
. Instructions are provided
at https://github.com/bazelbuild/bazelisk.
For macOS, brew intall bazelisk
is probably your best bet, but also it's
available through npm
via npm install -g @bazel/bazelisk
Bazelisk will determine the version needed for any given Bazel project, download it, and then use.
This project also uses a Postgres database. You'll need to have one of those
running and provide an .env
file with the details in the root. Running
cp env.example .env
and making the appropriate modifications should work
well.
bazel run //server
will build and run everything