arthurbarroso / brundij

Open source self hosted squad health checks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brundij 🦾

Santirix Gremioni's robot, from Isaac's Asimov The Robots of Dawn

demo

About

Brundij is an open source tool to help teams host squad health checks. It is written in Clojure and Clojurescript and powered by awesome tools such as datahike, re-frame and nbb. It started as a side project and turned into an attempt on having a working, self-hosted and easy to use squad health check platform. Brundij tries to handle a few main features:

  • Users needed to be able to create health checks and share those using UUIDs
  • Health checks could be assigned questions (users could choose whether to use the pre-defined ones or mix them with custom ones)
  • Users should be able to answer a health check's questions by using the health check's UUID

Brundij is the first "real world" application I build with Clojure. I decided to create a health check application because I was having a bit of trouble finding a tool I liked to run my squad's health checks.

This application served as a personal playground for trying out stuff I wanted to understand in Clojure(script), such as the following:

I still plan on using it to try out new stuff while I learn Clojure(script).

Development

In order to get a development server up, you'll want to follow these steps:

  • Set up a local postgres database
    • This can be done by running docker-compose up -d
  • Start the REPL
    • which can be done by running clj -M:repl
  • Run Integrant's go function, which is available from whithin the user namespace.

To start the web client in development mode, run clj -A:cljs watch app, which will start shadow-cljs.

Testing️

Server tests can be started by running .bin/kaocha, which runs kaocha with a fixture that sets up a test server using an in-memory database.

Client tests can be started using clj -A:cljs-test watch test. It is also possible to generate a compiled version of the client tests by running clj -A:cljs-test compile ci. This compiled version of the tests can be ran using npx karma start --single-run - this version is specially useful for CIs.

Building

It is possible to create release/production builds of the server and the application. To do so, run:

clj -A:cljs release app # creates a release version of the app's client
clj -T:build uber # creates an uberjar that serves the whole application
clj -A:native-image # creates a graal native-image
docker build . # a docker image can also be built for the whole application

License

Copyright © 2021 Arthur Barroso.

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Open source self hosted squad health checks

License:Eclipse Public License 1.0


Languages

Language:Clojure 91.5%Language:SCSS 4.9%Language:Shell 2.9%Language:Dockerfile 0.8%