bluedotimpact / bluedot

✨ Monorepo containing most of BlueDot Impact's custom software.
GNU Affero General Public License v3.0
8 stars 8 forks source link

bluedot

This monorepo contains code for most of BlueDot Impact's custom software. Reading this README carefully can save you a lot of time.

This includes:

The following key parts of our software are not in this repository because they are built in 3rd party services that are hard to open-source the code for:

The following key parts of our software are not in this repository because they use substantially different toolchains, and are a pain to set up in a monorepo:

Get started

We welcome contributions! To help improve BlueDot Impact's software:

For simple edits e.g. typos or editing documentation, you should be able to search for the text in this repository and make edits in the GitHub UI.

For more complex edits, check you have the core skills to contribute, then follow the developer setup instructions below.

If you run into any difficulties, raise an issue or contact us.

What if I want to use BlueDot Impact's software myself? You're very welcome to use and adapt our software for your own purposes, subject to the repository license. In general most of our apps are packaged as Docker containers, and most of our libraries are TypeScript NPM packages. There isn't yet extensive documentation on using our software for your own purposes. We'd be happy would accept contributions that make it easier for others to use our software. This could be by improving the way apps are structured or adding documentation.
How will my contribution be handled? Our general principle for reviewing contributions is 'does this make things better' rather than 'is this perfect'. We'll generally try to give you feedback, but given our limited resources we sometimes may not always be able to do this. When contributing, you agree that we can use your contribution how we see fit, and you relinquish any copyright, patent, moral or other intellectual property rights in your contribution.

Background knowledge to contribute

We recommend most contributors learn how to:

Developer setup instructions

  1. (recommended, macOS only) Install Homebrew
  2. Install Git
    • On macOS with Homebrew:
      brew install git
    • On Ubuntu Linux:
      sudo apt install -y git-all
  3. Install Node.js 22
    • On macOS with Homebrew:
      brew install node
    • On Ubuntu Linux:
      curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs
  4. Install Docker client. NB: NOT Docker Desktop.
    • On macOS with Homebrew:
      brew install docker
    • On Ubuntu Linux: instructions
  5. Install and configure a container runtime.
    • On macOS with Homebrew:
      brew install colima && brew services start colima && docker context use colima
    • On Ubuntu Linux: already installed with client
    • Other platforms: Docker Engine (NB: NOT Docker Desktop) or Podman
  6. Install kubectl.
    • On macOS with Homebrew:
      brew install kubectl
    • On Ubuntu Linux: instructions
  7. (recommended) Install Visual Studio Code
    • On macOS with Homebrew:
      brew install --cask visual-studio-code
  8. Clone this repository
    • To clone the main repo (not a fork):
      git clone git@github.com:bluedotimpact/bluedot.git
  9. Change directory into the cloned repository, and run
      npm install

Then find the app or library you want to contribute to. It should follow the general package structure. Usually this means you can change directory into the relevant folder, put any necessary values in .env.local (if present), before editing code in src, run

npm run start

or

npm run test

Some packages have their own README with further developer setup instructions specific to that app, plus useful information about how the app works. Read this!

Over time other people will make changes to the repository. Usually to get up to date with those changes, you'll need to pull the latest changes from the master branch, then re-run

npm install

General package structure

This repository is split up into packages in the folders:

For example, the shared UI code for common components like buttons is a library. This would be consumed by multiple apps, such as the time availability form.

Inside each package folder, the common files you'll find are:

In terms of tools and external libraries, we usually use:

In general, we try to keep to the above structure and tools as much as possible between packages. This reduces the mental effort required to switch between working on different packages, and eases maintenance burden. We're fans of boring technology.