木組み 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

COREMODULEtyped seam — checked at build組
fig. 1 — ari-tsugi (dovetail splice), plan view

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.

0042_add_state.sql
models.py
serializers.py
OrderForm.tsx
policy.rb

five copies of one truth — each drifts on its own

組#[model(name = "sale.order")]
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.

#[model]the declarative model — schema, API, UI, security derived
register_compute!stored computed fields, cascaded from depends
register_constraint!validation with structured per-field errors
register_action!state transitions + document numbering
register_service!cross-record work, one transaction
register_job!background work — retries, transactional enqueue
register_route!bespoke HTTP: webhook receivers, HMAC verified
register_seed!reference data, idempotent at migrate
register_migration!versioned data upgrades, resumable per step
register_acls!access rules baked into the module

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.

$ cargo run -p app -- mcp mario→ search_records workshop.order { state = done }{ "matched": 2, "records": ["RO/00001", "RO/00002"] }→ delete_record workshop.order 1{ "error": { "code": "access-denied" } }

mario has no delete right — denied by the ACL engine, not by a system prompt

MCP out of the boxkigumi mcp <login> — and every scaffolded app's app mcp <login>: ten tools derived from the catalog. Search with the domain AST, CRUD, actions, services, chatter.
Born agent-readykigumi new ships AGENTS.md, a Claude Code skill and a module-author agent in every workspace: your coding agent knows the seams before its first edit.
Docs agents can eatllms.txt and llms-full.txt at the site root; OpenAPI and the JSON UI contract from every running app.
Keys for machinesAPI keys that impersonate a user, narrowed to a subset of their groups — a key never exceeds its owner. The same ACL engine gates a bot as a person.

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.

optional — slots on at build timesalesaccountstockstandard library — ships seatedbasemailKIGUMI COREmetamodel · security · services · events · storage

$ 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.

01Single sign-onLog in with any OpenID Connect provider — Google, Microsoft, Okta — beside passwords. Authorization Code + PKCE, id-token verified, verified email required. Users are provisioned just-in-time, or linked to an existing account by email.
02Object storageBlobs on S3, MinIO or R2 behind the same trait as local disk — content-addressed and deduplicated. Flip one line in the config; credentials come from the standard AWS chain.
03ObservabilityStructured tracing out of the box: one span per request — method, path, status, latency, never bodies — filtered by RUST_LOG, emitted as JSON or text for your log stack.
04LocalizationField labels and selection options translated per locale, negotiated from Accept-Language — a post-pass over the same UI contract, so no view is forked to add a language.
05Public portalA public group on the guest context lets one access rule expose read-only rows to visitors with no account — order tracking, invoice download — and stays inert until you grant it.

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.

// v1.1.0 ships its data migration next to the model
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.