木組み kigumi — Japanese interlocking joinery. No nails, no glue.
Modules that interlock.
No glue.
Kigumi is a headless business-app framework in Rust. One declarative model is the single source of truth — schema, API, UI contract and security are generated from it. Modules compose at compile time through typed seams: if it builds, it fits.
$ kigumi new myshop
cargo install kigumi-cli — a module + a server binary, served in minutes
pre-1.0 — built in the open
the principle
Carpentry rules for software.
Traditional Japanese joinery holds temples up for centuries without a single nail: every piece is cut so precisely that the structure is the connection. Kigumi applies the same discipline to a business framework.
Compile-time joints
Modules join the frame through typed seams — #[model], register_service!, register_route!, register_job!. Composition is resolved and verified by the build, not patched into a running process. If it compiles, it fits.
Framework first
The ERP — sales, accounting, stock — is an optional layer that slots on top. Build with --no-default-features and the bare frame stands on its own: a metamodel engine with security, services and events, ready for your own vertical.
Headless by design
The core imposes no frontend and no protocol. Everything is exposed through standards generated from the schema: OpenAPI 3.1, a JSON UI contract, signed webhooks, live server-sent events. Bring any client — or none.
the honest comparison
The real competitor is glue.
Business apps rarely die of a bad framework. They die of the same truth written five times — a migration, an ORM class, a serializer, a form, a permission check — kept aligned by hand, on every generalist stack ever made.
five copies of one truth — each drifts on its own
pub struct SaleOrder { … }
One definition, or five copies drifting apart. That is the whole pitch.
single source of truth
One definition. Everything derived.
You write the model once, declaratively. The framework cuts every other piece to measure.
#[model(name = "sale.order", table = "sale_order")]
pub struct SaleOrder {
#[field(label = "Customer", required, target = "res.partner")]
partner_id: Many2one,
#[field(label = "Status", default = "draft", tracked,
selection = "draft:Draft,sale:Confirmed,done:Done")]
state: Selection,
#[field(label = "Total", compute = "compute_total",
depends = "line_ids.price_subtotal", store)]
amount_total: Decimal,
#[field(label = "Lines", target = "sale.order.line",
inverse = "order_id")]
line_ids: One2many,
}- Postgres DDLtables, FKs, constraints — dependency-ordered, versioned migrations
- OpenAPI 3.1a typed, documented REST surface for every model
- UI contract (JSON)forms, lists, widgets, actions — any frontend can render it
- Security policyACLs, record rules, field groups, multi-company scope — enforced on every path
- Live behaviourcomputed fields, constraints, tracking, domain events — wired from depends
derived at build — never hand-maintained
twenty minutes, honestly
From nothing to a served vertical.
kigumi new scaffolds a module and its server binary. Migrate installs, seeds and bootstraps; serve exposes REST, security, chatter and live events on your own models.
every line above is real output
the joint catalog
A named joint for every need.
Like a carpenter's catalog of joints: each seam is one macro, declared next to the model it serves, collected and verified at build.
the AI surface
Agents operate it. The engine guards it.
Every Kigumi app serves the Model Context Protocol out of the box — one more artifact derived from the model, after the schema, the API and the UI contract. An agent connects AS a user: ACLs, record rules and field visibility are enforced on every tool by the data layer. The guardrail is the security engine, not the prompt.
mario has no delete right — denied by the ACL engine, not by a system prompt
the frame and its pieces
An ERP you can lift off.
Business modules are pieces cut for the frame's mortises — not organs grown into it. The standard library ships seated; the ERP layer is yours to slot on, or leave out entirely.
$ cargo buildthe full frame — ERP modules seated
$ cargo build --no-default-featuresthe bare frame — a headless metamodel engine, zero ERP code linked
the finish work
Ready for a real company.
A frame that stands is not yet a place a business can move into. Kigumi ships the finish work an enterprise checks for — each capability derived from the model or flipped on in config, never bolted on the side.
configured, not glued — the same security engine gates every path
the promise
Upgrades that keep their promise.
Business software has trained everyone to fear the version jump: data left behind, migrations that are somebody else's problem. Kigumi makes the upgrade path part of the module contract — enforced by the framework, not by hope.
the contract we keep
A module ships its data migrations next to its models. Migrate applies the pending steps in order, records progress per step, resumes where a failure stopped, and refuses downgrades. Re-installing replays from where your data really is.
pub async fn backfill_references(db: &Db) -> Result<(), DbError> { … }
kigumi::register_migration!("myshop", "1.1.0", backfill_references);
$ app migrate
upgraded module myshop to 1.1.0
木取りthe cutting plan
What gets cut next.
Kigumi is built in the open, and so is its plan. Two piles on the sawhorses: pieces on the bench now, and timber set aside to season. No dates on the sheet — a piece ships when the joint fits.
on the bench — next releases
- 01Admin panel out of the boxThe contract-driven admin embedded in the server binary: scaffold, migrate, serve — and open a working UI. Menus and the last per-model knowledge move into the server contract, where the rest already lives.
- 02OpenTelemetry exportAn opt-in otel feature: OTLP traces end-to-end — from the HTTP span through the data layer to triggers and jobs — then metrics, to the same collector. The tracing substrate already ships; this is its export layer.
- 03Per-tax accounting mappingRepartition lines route each tax to its own ledger account, with sign and factor — withholding and reverse charge become pure configuration. No national rule ever enters the code.
- 04Guardrails before 1.0Public-surface checks in CI so a release cannot break the contract by accident, formatting and lint gates, and tests on the runtime every scaffolded app boots through. The discipline has to exist before the stability promise does.
seasoning — on the horizon
- 01Framework 1.0 + LTSA stability contract on the metamodel and the register_*! seams, enforced by semver checks in CI — a release cannot break the surface silently. Then an LTS branch per major.
- 02Groups as first-class dataReal membership records and implied groups in the database — role management on the same secured CRUD, contract and audit trail as any other model.
- 03Operations toolingkigumi db dump / restore / verify and blob garbage collection — the backup contract is already designed and adversarially reviewed; it becomes code.
- 04E-invoicing localizationsPeppol and the Italian SDI as optional modules on the existing seams — jobs, signed webhooks, the outbox. The frame stays country-free; countries are pieces you slot on.
no dates on the sheet — a piece ships when the joint fits
Watch the frame go up.
Kigumi is being built in the open, joint by joint — the commit history reads like a carpenter's journal. Star the repo, read the docs, or open an issue.