[docs] Bootstrap: CLAUDE.md and roadmap
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# CLAUDE.md — Ianitor Domi
|
||||
|
||||
Ianitor is a reverse proxy built on Cloudflare's Pingora, with a small Domi CA, a web UI and an API.
|
||||
NixOS-native, with Caddy as a tested fallback. MPL-2.0. Plan, decisions and status: docs/ROADMAP.md — read it first.
|
||||
|
||||
## Layout
|
||||
crates/core config model, schema, compilers (Pingora runtime + Caddy JSON), CA. Pure: no I/O, no network.
|
||||
crates/edge Pingora data plane. Reads compiled config, serves traffic. Never decides policy.
|
||||
crates/control API, git routes repo, apply/rollback, share links, PKI flows. Loopback only. Never serves public traffic.
|
||||
apps/web Svelte 5 (runes, TypeScript strict). A client of the API; no logic.
|
||||
packages/ui shared dark Domi theme.
|
||||
tests/diff same requests against Ianitor and Caddy, responses compared.
|
||||
tests/fuzz cargo-fuzz targets.
|
||||
deploy/nixos NixOS module + VM tests.
|
||||
|
||||
## Commands
|
||||
cargo test --workspace # quote test counts per crate; an exit code alone is not green
|
||||
cargo run -p ianitor-control -- --dev
|
||||
pnpm --filter web dev # 127.0.0.1 only, never --host
|
||||
nix build .#ianitor
|
||||
nix flake check # includes NixOS VM tests (Linux + KVM)
|
||||
|
||||
## Rules
|
||||
- Commits: `[<crate|app>] <Feature>: <one line>`. No AI attribution, no trailers, ever.
|
||||
- Never in git: target/, node_modules/, dist/, binaries, private keys, files over 5 MB. A pre-commit hook enforces it.
|
||||
- $GITEA_TOKEN never echoed or written anywhere. Secrets come only from Custos or systemd credentials, never the Nix store.
|
||||
- ianitor-control and every dev server listen on 127.0.0.1 only; only ianitor-edge binds public ports.
|
||||
- Route files, API bodies, CSRs, headers and share tokens are hostile input: typed Result, no unwrap() on input paths, no swallowed errors.
|
||||
- Every route change goes through the core compiler and the differential tests.
|
||||
- Tests first only where the risk is: parsing, CA, share tokens, forward-auth, apply/rollback, secret injection.
|
||||
- Workflow: branch → Gitea PR via API → short adversarial self-review in the PR body → merge --no-ff → push → verify hashes.
|
||||
- Server changes: prepare the Nix change and show the command; Mark runs nixos-rebuild himself. deploy/test-access.sh must pass.
|
||||
- When reporting done, say which build is deployed and whether it changed visibly.
|
||||
- UI: dark Domi theme, every action ≤ 3 clicks, plain English; Latin only in the brand name.
|
||||
|
||||
## Session end
|
||||
Update the Status table and the Handover section at the bottom of docs/ROADMAP.md. No separate handover file.
|
||||
Reference in New Issue
Block a user