Thank you for considering a contribution to the project. This document explains the repository structure and how to get involved.
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please contact @jniebuhr (mdwasp) on Discord to access the CLA. A signed CLA is required for contributing.
The repository is organized into the following folders:
.
├── boards/ # Custom PlatformIO board definitions
├── docs/ # Documentation assets and diagrams
├── icons/ # Source icons and conversion scripts
├── lib/ # PlatformIO libraries such as GaggiMateController
├── scripts/ # Helper scripts for builds and formatting
├── src/
│ ├── controller/ # Firmware for the controller board
│ └── display/ # Firmware for the display unit (LVGL UI, plugins)
├── ui/ # SquareLine Studio project for the LVGL UI
├── web/ # Preact-based web interface
└── platformio.ini # PlatformIO configuration
There are two main PlatformIO environments defined in platformio.ini:
[env:display]
board = LilyGo-T-RGB
build_src_filter = -<*> +<display/>
[env:controller]
board = Gaggimate-Controller
build_src_filter = -<*> +<controller/>
Located in lib/GaggiMateController and src/controller.
Implements hardware control and BLE communication.
GaggiMateController.* sets up peripherals (heater, pump, valve) and handles safety mechanisms such as thermal runaway shutoff.
Communication with the display uses the NimBLE library.
Resides in src/display.
core/Controller.h orchestrates Wi‑Fi, Bluetooth, profiles, and process control.
Uses LVGL for graphics, with UI assets generated by SquareLine Studio (ui/ folder).
Plugins (e.g., BLEScalePlugin, MQTTPlugin, BoilerFillPlugin, HomekitPlugin) extend functionality via an event-driven PluginManager.
The web/ directory contains a Preact + Vite project. The README inside explains how to run it:
npm run dev- Starts a dev server at http://localhost:5173/npm run build- Builds for production, emitting todist/npm run preview- Starts a server at http://localhost:4173/ to test production build locally
When building the firmware, the scripts/build_spiffs.sh script installs the web dependencies and copies the compiled files to the data/ directory for inclusion in the device’s SPIFFS image.
- Review plugin implementations in
src/display/pluginsto see how new functionality hooks into the controller using events. - Look at
src/display/core/Settings.*for how user preferences are stored and updated. - Study the BLE protocol defined in
lib/NimBLECommto understand how the display and controller communicate.
-
Fork the repository and create your branch from
master. -
Install dependencies:
- Run
npm installinside theweb/directory for the web interface. - Ensure PlatformIO is available for firmware builds.
- Run
-
Build the project to verify your environment:
platformio run -e display -e controller scripts/build_spiffs.sh
-
Choose what to deploy:
Asset Commands Display Firmware platformio run -e display -t upload -t monitorController Firmware platformio run -e controller -t upload -t monitorWeb UI scripts/build_spiffs.sh
platformio run -e display -t uploadfs -t monitorNOTE: You can omit
-t monitorif you don't want to immediately attach to the board's serial console.
- Format C/C++ sources using
scripts/format.shwhich applies the project'sclang-formatsettings. - For web code, use
npm run formatto apply Prettier. - Run static analysis with
platformio check -e displayandplatformio check -e controller. - For markdown files, use
npx prettier -w <file>.md
- Keep PRs focused and describe the motivation behind your change.
- Include screenshots when modifying the UI.
- Ensure all formatting and checks pass before opening the PR.
If you encounter a problem, open an issue describing the steps to reproduce and any relevant logs.