Contributing
Contributions are welcome — whether that’s a new inverter profile, a feature, or a fix.
Get set up
Section titled “Get set up”Follow Manual Setup to get the stack running against the simulator. The Scripts reference lists every workspace command.
Before opening a PR, run the checks for the area you touched:
bun run check # oxlint + oxfmtbun run check-types # TypeScript across the monorepoRepository conventions
Section titled “Repository conventions”This is a bun + Turborepo monorepo. A few rules worth knowing up front (see the AGENTS.md
files throughout the repo for the authoritative, area-specific version):
- Environment variables are declared and validated only in
packages/env(server.ts/web.ts). Don’t parseprocess.envor add per-package env schemas elsewhere. See Environment Variables. - Runtime configuration (inverter connection, MQTT, tariff, profile sources) lives in
the
app_settingstable with per-key Zod schemas inpackages/db— not in env. See Settings. - Inverter support is data. Prefer adding a profile over touching
the engine. New canonical concepts go through the role catalog
(
packages/inverter-core/src/roles.ts). - Dead code / duplication — the repo uses
bunx fallow(dead-code,dupes,health) for code-health checks.
Commit style
Section titled “Commit style”Conventional commits: type(scope): summary.
- Imperative, specific subject; lowercase types (
feat,fix,refactor,docs,test,chore); scope when useful. - One commit = one logical change. Don’t mix refactor + feature + formatting noise.
Examples:
feat(web): add onboarding empty statefix(server): prevent duplicate task creationdocs: clarify post-clone setup
Where things live
Section titled “Where things live”| Area | Path |
|---|---|
| Core engine (poll loop, API, MQTT) | apps/server |
| Dashboard | apps/web |
| Documentation (this site) | apps/docs |
| Modbus engine, registry, entity model | packages/inverter-core |
| Deye / Sunsynk profile | packages/inverter-deye-sg05lp3 |
| Profile SDK + CLI | packages/profile-sdk |
| Schema, TimescaleDB, runtime settings | packages/db |
| Env schema, auth, shared config | packages/env, packages/auth, packages/config |
See the Architecture Deep-Dive for how these fit together.
Editing these docs
Section titled “Editing these docs”The docs site is Astro Starlight under apps/docs. Pages
are Markdown/MDX in src/content/docs; the sidebar is configured in astro.config.mjs. Run
it with cd apps/docs && bun dev.