Development Environment
Architecture
The development stack runs infrastructure in Docker and application services natively with hot reload:
┌─────────────────────────────────────────────────┐
│ Native (hot reload) │
│ ┌─────────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ Editor :3000 │ │Admin :3001│ │Admin API:8000│ │
│ │ (Vite) │ │(Vite) │ │(cargo watch) │ │
│ └─────────────┘ └──────────┘ └──────────────┘ │
├─────────────────────────────────────────────────┤
│ Docker │
│ ┌──────────┐ ┌────────────┐ ┌───────┐ │
│ │PostgreSQL│ │ Prometheus │ │Grafana│ │
│ │ :5433 │ │ :9090 │ │ :3002 │ │
│ └──────────┘ └────────────┘ └───────┘ │
└─────────────────────────────────────────────────┘Starting the Dev Stack
bash
just devThis command:
- Checks prerequisites (cargo, node, docker, cargo-watch)
- Starts infrastructure containers (PostgreSQL, Prometheus, Grafana)
- Waits for PostgreSQL to be ready
- Installs frontend dependencies if needed
- Starts all application services with hot reload
Stopping
bash
just dev-downLogs
bash
tail -f .dev-admin.log # Admin API log
tail -f .dev-admin-frontend.log # Admin frontend log
tail -f .dev-editor.log # Editor log
just dev-logs # Infrastructure logsDatabase Access
bash
just dev-psqlFull Docker Stack
For running everything in Docker without hot reload:
bash
just local # Start
just local-down # Stop
just local-logs # Logs
just local-psql # Database accessEnvironment Variables
Create a .env file in the project root:
bash
# Required for @minbzk/storybook package
GITHUB_TOKEN=ghp_...
# Optional overrides
POSTGRES_PORT=5433
GRAFANA_PORT=3002
PROMETHEUS_PORT=9090
RUST_LOG=infoPre-commit Hooks
Install pre-commit hooks:
bash
pre-commit installHooks run automatically on commit:
- Trailing whitespace, end-of-file fixes
- YAML linting
- Rust formatting (
just format) - Rust linting (
just lint) - Schema validation (
just validate)