Skip to main content
Glama
Rhizel

Rhizel

Official
README.md
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/hero-dark.svg" />
  <source media="(prefers-color-scheme: light)" srcset="docs/assets/hero-light.svg" />
  <img alt="Rhizel: a self-hosted plant manager for indoor growing" src="docs/assets/hero-dark.svg" width="100%" />
</picture>

<p align="center">
  <a href="https://github.com/Tymec/rhizel/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Tymec/rhizel/ci.yml?branch=main&style=flat-square&label=CI&color=2f7d4f&labelColor=191d1a" alt="CI" /></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-2f7d4f?style=flat-square&labelColor=191d1a" alt="License: AGPL-3.0" /></a>
  <a href="https://rhizel.app"><img src="https://img.shields.io/badge/website-rhizel.app-2f7d4f?style=flat-square&labelColor=191d1a" alt="Website: rhizel.app" /></a>
</p>

**Rhizel** is a self-hosted web app for managing indoor plants: hydroponic systems, soil pots, water culture, and propagation. It is single-user and LAN-only, meant to run on a small `amd64` or `arm64` home server behind your own reverse proxy (with a VPN for remote access), with no cloud services or accounts.

The web app is built and in daily use, and the MQTT node protocol runs end to end with simulated nodes. Custom ESP32 sensor nodes come next, then water-moving addons. If you are planning a physical grow setup, start with the [grow guides](docs/grow/README.md) or the [build template](docs/build-template.md).

> **Status:** Rhizel is in active development and pre-1.0. Expect breaking changes between versions: data migrations are forward-only and run automatically, but APIs, MCP tools and the node protocol may change. Back up before upgrading. Contributions are welcome; see [CONTRIBUTING](CONTRIBUTING.md).

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/preview-dark.svg" />
  <source media="(prefers-color-scheme: light)" srcset="docs/assets/preview-light.svg" />
  <img alt="Mock-up of Rhizel on a desktop and a phone: today's tasks, a lid map of a water culture system and a plant timeline" src="docs/assets/preview-dark.svg" width="100%" />
</picture>

<p align="center"><sub>Mock-up of the app, not a screenshot.</sub></p>

## What it does today

- **Rooms, racks & systems**: Plants organized by room and rack across DWC, Kratky, hydroculture, soil pots, and water culture, with water-risk levels and leak-test tracking.
- **Plants & propagation**: Per-plant timelines from seed batch or cutting through stages, moves, health issues, photos, and harvests, with built-in and custom species profiles. A seed stash keeps your packets: what's left, how well each came up, and which to sow soon.
- **Care & notifications**: Care schedules (including watering intervals learned from history) and manual pH, EC, and temperature readings that create follow-up tasks when values drift (node values make the same pH, EC and top-up tasks). Notifications via web push or [Apprise](https://github.com/caronc/apprise) in categories each phone and service picks: a daily digest, Urgent (ignores quiet hours), Warnings, Node health and Sensor tasks; plus an optional external heartbeat check.
- **Offline PWA & backups**: Installable PWA that stays readable offline and queues logs, tasks, and photos until you reconnect. Automatic nightly backups (database and photos) with in-app restore.
- **Gear & wishlist**: Equipment per room (watts, hours a day, what it serves), a shelf of nutrients and other products with roughly how much is left and what went into each system, and a wishlist of plants and seeds to get.
- **Costs**: Purchases with receipts and splits, prices on seeds, bottles, equipment and plants, electricity from watts and hours, and a Costs page with what each plant cost and gave back.
- **Nodes (simulated for now)**: Pair a sensor node from Settings › Nodes, walk through the adoption wizard (blink to identify, choose where each sensor goes, optional live trigger check), calibrate pH/EC/moisture probes with live stability feedback, configure status lights and quiet hours, and see readings next to the ones you log: charts from 24 h to a year, targets per system, alerts (on Today, the system and an Alerts list) and live updates without refreshing. Developer mode adds simulated nodes and test systems until the hardware exists.
- **Assistants (`/mcp`) & activity log**: Built-in MCP server with scoped, revocable keys so an assistant (e.g. Claude Code) can check what's due, log care, create records, or attach photo files from your computer. Safety-critical and destructive actions (like leak tests or deleting records) require explicit confirmation, and every change is recorded in an append-only activity log.

## Hardware & water safety

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/architecture-dark.svg" />
  <source media="(prefers-color-scheme: light)" srcset="docs/assets/architecture-light.svg" />
  <img alt="Rhizel overview: home server app today, modular ESP32 hardware and wired safety bus next" src="docs/assets/architecture-dark.svg" width="100%" />
</picture>

The hardware is designed around modular ESP32 nodes over MQTT. The protocol is built: nodes describe their own capabilities, so the server discovers them without hard-coding node types. The boards themselves are still planned.

Because the setup lives inside a home, [**06-water-safety.md**](docs/spec/06-water-safety.md) overrides every other spec in this repo. Containment trays, local firmware caps, and a wired `< 100 ms` fail-safe safety bus stop pumps even when Wi-Fi, MQTT, or the server is down. The network can only make the system more conservative, never less.

## Roadmap

- **Done:** the plant app, assistants and the activity log, versioning, backups and the offline queue, the seed stash, the node protocol (with simulated nodes), the wishlist, gear and costs, the UI polish (0.4.0), photos through the assistant (0.4.1), sensor charts, targets and alerts (0.4.2), and node adoption, live calibration, status lights, the safety page, maintenance mode and the monthly sensor test (0.5.0).
- **Next:** pot nodes, the API with plugins and Home Assistant, a 3D view and a polish pass: that's **v0.9.0**. **v1.0.0** comes once real ESP32 nodes and the wired safety bus work.
- **Later:** water-moving addons (auto top-off, tower, NFT, RDWC, doser, drain/refill exchanger).

Every milestone, its status and the open questions: [docs/spec/05-roadmap.md](docs/spec/05-roadmap.md).

## Running it

### Docker Compose

Runs the published `ghcr.io/tymec/rhizel` image (`linux/amd64`, `linux/arm64`) with TimescaleDB and optional Apprise/Mosquitto behind your reverse proxy. See [**deploy/README.md**](deploy/README.md) for full setup, resource limits, proxy headers, backups, and upgrades.

```sh
cd deploy
cp .env.example .env
# Set POSTGRES_PASSWORD, SESSION_SECRET, APP_PASSWORD_HASH, PUBLIC_BASE_URL, and TZ
docker compose up -d
curl -fsS http://127.0.0.1:8080/api/health   # your HOST_PORT if you changed it → {"ok":true,"mqtt":"off"}
```

### Development

```sh
mise install                  # Node 22 + pnpm 10
pnpm install
pnpm dev:db                   # TimescaleDB on localhost:55432
cp .env.example .env          # set APP_PASSWORD_HASH (see deploy/README.md)
pnpm dev                      # Fastify API (:8080) + Vite web UI (http://localhost:5173)
```

For nodes, `pnpm dev:mqtt` starts a local broker; uncomment the MQTT lines in `.env`, turn on developer mode and add simulated nodes. `pnpm sim --help` drives them (faults, offline nodes, scenarios) with an assistant key that has the dev scope.

Run `pnpm lint`, `pnpm -r typecheck`, and `pnpm -r test` before committing (server tests use Testcontainers and require Docker).

**Releases & changelog:** Releases are `vX.Y.Z` tags, and the app displays [`CHANGELOG.md`](CHANGELOG.md) directly (its format is checked by a test). Add one plain line under `Coming next` for each user-visible change; a release goes through a PR: `scripts/release.sh prepare X.Y.Z` moves those lines into the version's section on a release branch, and after the merge `scripts/release.sh tag X.Y.Z` tags `main` and creates the GitHub release (it refuses a version that isn't newer, and asks for `--allow-jump` on a major or skipped one). In Claude Code, `/update-version X.Y.Z` runs the whole flow.

## Stack

| Layer | Tools |
|---|---|
| **Frontend** | React, TypeScript, Vite, TanStack Query, uPlot |
| **Backend** | Fastify, TypeScript, Drizzle ORM, Zod, MQTT.js, `@modelcontextprotocol/sdk` |
| **Data & deploy** | PostgreSQL 16 + TimescaleDB, distroless Node 22 Docker image, optional Apprise and Mosquitto (MQTT) |
| **Tooling** | pnpm monorepo (`packages/shared`, `packages/protocol`, `server`, `web`), Biome, Vitest, Testcontainers, mise |
| **Hardware (planned)** | ESP32-S3 nodes (firmware lives outside this repo) |

## Docs

### Specs

0. [Overview, architecture & decisions](docs/spec/00-overview.md)
1. [Hardware](docs/spec/01-hardware.md)
2. [Firmware](docs/spec/02-firmware.md)
3. [MQTT protocol v1](docs/spec/03-mqtt-protocol.md)
4. [Server & web UI](docs/spec/04-server.md)
5. [Roadmap & open questions](docs/spec/05-roadmap.md)
6. [**Water safety**](docs/spec/06-water-safety.md): overrides everything else
7. [System model & addons](docs/spec/07-system-model.md)
8. [UI style guide](docs/spec/08-ui-style-guide.md): the rules for every screen

### Guides & hardware

- [Deploying](deploy/README.md): Docker Compose, the published image, reverse proxy, notifications, nodes (MQTT), backups, upgrades
- [Grow guides](docs/grow/README.md): germination, DWC setup, maintenance, light & crop basics
- [Build template](docs/build-template.md): worksheet for planning your space, containers, plants, and lights
- [Pinout & circuit blocks](hardware/pinout.md): node pinouts and safety-bus wiring

<details>
<summary><strong>Design docs</strong></summary>

- [App v1: plant manager](docs/design/2026-11-20-plant-app-v1-design.md)
- [App UI](docs/design/2026-11-21-app-ui-design.md)
- [Assistant & activity log](docs/design/2026-11-24-assistant-activity-design.md)
- [Care modifiers](docs/design/2026-11-24-care-modifiers-design.md)
- [Versioning & changelog](docs/design/2026-11-24-versioning-design.md)
- [Backup & restore](docs/design/2026-11-25-backup-restore-design.md)
- [Offline queue](docs/design/2026-11-25-offline-queue-design.md)
- [Node protocol](docs/design/2026-11-25-protocol-design.md)
- [Seed stash](docs/design/2026-11-25-seed-stash-design.md)
- [Wishlist](docs/design/2026-11-26-wishlist-design.md)
- [Developer feedback](docs/design/2026-11-26-feedback-design.md)
- [Gear](docs/design/2026-11-26-gear-design.md)
- [Costs](docs/design/2026-11-26-costs-design.md)
- [Photos through the assistant](docs/design/2026-11-29-assistant-photos-design.md)
- [Sensors: charts, alerts and sensor tasks (M5a)](docs/design/2026-11-28-m5a-sensors-design.md)
- [Nodes: adoption, calibration and status lights (M5b)](docs/design/2026-12-02-m5b-nodes-design.md)
- [Safety page, maintenance mode and the monthly sensor test (M5c)](docs/design/2026-12-02-m5c-safety-design.md)
- [Landing page](docs/design/2026-12-03-landing-page-design.md)

</details>

## Contributing, security & license

- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md)
- Security notes and reporting: [SECURITY.md](SECURITY.md)
- License: [AGPL-3.0](LICENSE)