This repository contains the homectl home automation platform split into two packages:
server/(Rust) – core automation engine and HTTP/WebSocket APIui/(Vite / React Router) – web interface consuming the server API
See server/README.md for detailed usage, configuration, and integration docs.
Key technologies:
- Rust (edition 2021)
- warp, tokio, SeaORM, mqtt, etc.
- SQLite persistence by default (
./homectl.db), optional PostgreSQL persistence, and fallback startup from JSON backup, legacy TOML, or an empty in-memory runtime
Build & run (development):
cd server
cargo run
# optional: use another supported database target instead of ./homectl.db
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres cargo run
# optional: bootstrap from a JSON export or legacy TOML backup
cargo run -- --config ./config-backup.json
If the database named in DATABASE_URL does not exist yet, the server creates
it automatically before running migrations for supported backends. PostgreSQL
requires a role with permission to create databases; SQLite creates the file and
missing parent directories automatically.
See ui/README.md for UI specific documentation.
Development:
cd ui
pnpm install # or npm / yarn
pnpm dev
Root GitHub Workflows:
server-ci.yml– Lints/tests/builds and publishes the unified image (ghcr.io/<owner>/<repo>), then dispatches a homelab image update frommain.ui-ci.yml– Lints/typechecks/builds the UI bundle.release-please.yml– Uses manifest mode to create independent releases forserverandui.
Legacy per-package workflow placeholders have been removed; CI lives in the root workflow directory.
release-please manages versions independently using:
.release-please-manifest.json– current versionsrelease-please-config.json– package metadata
Unified formatting via root .editorconfig.
server/ Rust backend source, migrations, scripts
ui/ Vite frontend, generated TypeScript bindings
.github/ Workflows (monorepo aware)
- Create a feature branch.
- Ensure server tests pass:
cargo test. - If you changed Postgres persistence or reconnect behavior, also run
cargo test -p homectl-server --test postgres_runtime -- --test-threads=1fromserver/. - Ensure UI builds:
pnpm build(ornpm run build). - Commit using conventional commit messages for automated release PRs.
MIT – see LICENSE.