Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
CAD integration API gaps
From an integrator's review (a CAD program pushing parts, BOMs and models into Carbon). Gap 4 (per-app credentials) and the NC-program field are out of scope.
1. Create a 3D model through the API
The uncommitted item-only pair (createItemModelUploadUrl / attachItemModel)
signed into the company bucket (50 MB cap) and attached to items only.
-
items_createModelUploadUrl— signs intotemp-staging(2.5 GB, where the browser stages raw CAD) at${companyId}/models/${modelId}.${ext}. -
items_insertModelUpload— records the upload, attaches it to at most one of item / job / sales RFQ line / quote line / sales order line, optionalconvert(STEP →assembly-convert), alwaysmodel-optimize. -
api+/model.upload.tscallsinsertModelUpload(one path; the route keeps the assembler health check). - Manifest digest regenerated.
2. Signed webhooks
- Migration: vault-backed per-webhook signing secret
(
get_webhook_signing_secretget-or-create,rotate_…,delete_…, service role only). - Delivery signs the exact body:
Carbon-Signature: t=<unix>,v1=<hex>, HMAC-SHA256 over${t}.${body}, keyed by the secret string. Pure helper + tests inwebhook-body.ts. - ee:
getWebhookSigningSecret(runtime) /revealWebhookSigningSecret/rotateWebhookSigningSecret(requireEntitlement); the secret is dropped bysync_webhook_subscriptionwhen the webhook row is deleted. - Settings → Webhooks edit drawer: reveal + roll.
- Docs: replace "treat the URL as the secret" with verification.
3. Webhooks for methods and models
-
webhookTablerows: makeMethod, methodMaterial, methodOperation, modelUpload, plus changeOrder / changeOrderAffectedItem (asked for by the hotice session; both already emit events). -
attachments.ts:events: truefor makeMethod, methodOperation, modelUpload; generated authz migration. - Docs table.
Verification
Static: erp / ee / jobs typecheck, jobs + checks + content tests (the two jobs
*.database.test.ts files point at another database and were not run), Biome,
the authz migration test, the conformance gate.
Live, on the worktree stack (2026-10-17), with test data removed afterwards:
crbn upapplied the 3 migrations.authz checkreports no drift. The types carry the 3 functions.- The secret functions, in a rolled-back transaction: get creates the secret once,
rotate replaces it, a wrong company gets null,
anon/authenticatedget the guard error. Deleting the webhook removes the secret and the subscription. - A key scoped to
parts_*calleditems_createModelUploadUrlover/api/v1, PUT a STEP file totemp-staging, then calleditems_insertModelUploadwith anitemIdandconvert. The item got the model.model-optimizeandassembly-convertwere sent. api+/model.upload.ts, called with the browser session and two targets (a sales order line and its item), linked both.- A
makeMethodwebhook delivered a signed UPDATE to a local receiver. The verifier on the docs page accepts it, and refuses a changed body, a wrong secret and an oldt. - Settings → Webhooks: Reveal shows the Vault secret. Roll asks to confirm, shows the new secret, and keeps the drawer open. The next delivery verifies with the new secret.
Left for the commit: lingui:extract for the new strings.