Contributor setup
We’re glad you’re here. Fixes, docs tweaks, bug reports and questions all help, and small contributions count as much as big ones.
If you get stuck or aren’t sure where to start, open an issue or discussion in the relevant repository at github.com/open-aiq. We’re happy to help.
Run commands inside the repository you’re changing, check git status first, and leave unrelated local changes alone.
Backend
Section titled “Backend”Needs Go 1.26+, PostgreSQL and the tools in its README. Copy .env.example to .env (ignored by Git); every value is required.
make helpmake initmake swagger:genmake buildmake verify- Edit Ent schemas under
internal/platform/ent/schema/, then regenerate with the Make target. Don’t edit generated files. - The Docker image applies migrations on start; locally, run
make migration:apply. - Database start, seed, cleanup and release targets change persistent state, so check before running them.
Frontend
Section titled “Frontend”There’s no live dev server. The production Clerk key only works on the deployed domain, so you review visuals locally with mock data and test everything else live:
make initmake review # the real pages with mock data, no backend or sign-inmake verify # format check, lint, tests, buildmake review has a small panel for switching scenarios (no devices, offline, errors, loading, signed out) and jumping between pages, including a Playground that mirrors the visual playground. Use the shared tokens and the surface utilities in src/index.css instead of hard-coded colors.
The backend’s CORS and Clerk origins must match the deployed dashboard. Add shadcn primitives with its CLI, not by hand.
Mobile app
Section titled “Mobile app”Needs Flutter and a real phone; Bluetooth doesn’t work in simulators.
make initmake dev # runs against the backend on this machinemake gallery # the shared components with mock data (a simulator is fine)make verify # format check, analyze, testsKeep BLE UUIDs, commands, reply framing and notification reassembly in
lib/ble/protocol.dart in sync with the firmware. Tests use an in-memory
device emulator, so you can catch mismatches without hardware.
Device firmware
Section titled “Device firmware”Needs the Xtensa Rust toolchain (espup) and espflash.
make buildmake verify # format, host tests, Clippy, both OLED buildsFlashing (make flash) needs hardware attached. Never commit or share a binary
built with MOCK_* values. See Firmware setup.
Hardware
Section titled “Hardware”The boards live in open-aiq/hardware
as KiCad 10 projects. Open pcb/<board>/<board>.kicad_pro; the libraries and
design rules come with the project, so there’s nothing to set up.
scripts/export.sh pcb/proto2 # ERC, DRC, then PDFs, Gerbers, drill files and BOMCommit your KiCad edits and the regenerated outputs together, so the fab files
always match the design. If you move a pin, change src/board.rs in the
device repository too; it’s the source of truth for the pin map.
Releases
Section titled “Releases”The backend, dashboard, app and firmware release with make release from a
clean main. Hardware releases are tagged by hand, with the Gerbers, BOM and
PDFs attached. The docs site has no releases; it deploys from main. Register
a new major or minor version in the version registry first.
Tagging and publishing are for maintainers.
Documentation
Section titled “Documentation”Needs Node 24.
make initmake devmake api:sync # after regenerating Swagger in the backendmake tokens:sync # after changing src/data/tokens.jsonmake icons:sync # after changing which Material icons we sharemake brand:sync # after changing the logo or the brand colorsmake verifyCI checks the API snapshot matches open-aiq/backend main. Don’t hand-edit the generated endpoint pages or the snapshot.
src/data/tokens.json holds the design tokens for every platform: colors, radii, shadows, motion and AQI bands. make tokens:sync regenerates the theme files in docs, ../frontend and ../app, plus the AQI band names and colors in ../device, and make verify fails if they drift. The visual playground shows the tokens and the shared components. The logo is lucide’s wind glyph on a sand tile. make brand:sync draws it from the same brand colors into the favicons, the docs header, the app’s launcher icons and public/brand/open-aiq-512.png, the GitHub organization avatar.