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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
Approval signatures — implementation plan
Spec: .ai/specs/2026-10-28-approval-signatures.md. Branch feat/user-signatures.
Sibling: the profile photo (ProfilePhotoForm, updateOwnAvatar, the photo
intent of api+/account.profile.ts).
Tasks
-
- Migration
20261028143517_approval-signatures.sql: privatesignaturesbucket (1 MB, PNG/JPEG), owner SELECT/INSERT policies,user.signaturePath,approvalRequest.decisionSignaturePath,companySettings.requirePurchaseOrderApprovalSignature. Verify: user runspnpm db:migrate(regenerates types).
- Migration
-
@carbon/utils:isOwnSignaturePath(userId, path)— the one check that a path sits in the user's own folder. Used by the server write, the approval snapshot and the PDF read, so a path a user wrote into their own row through the API cannot point at someone else's file.
-
- ee
approveRequest: read the approver'ssignaturePath; for a purchase order with the company setting on and no own signature, return{ code: "signature-required" }and write nothing; else writedecisionSignaturePath.getDocumentApprovalreturnssignaturePath.
- ee
-
- ERP users:
updateOwnSignature({ path | null })operation (path must pass task 2); deletes the replaced file with the service role unless anapprovalRequestnames it.account.profile.ts:signatureintent, loader returnssignatureUrl(signed, 5 min).AccountProfileDatagainssignatureUrl.
- ERP users:
-
@carbon/accountUI:SignatureForm(preview on white, Draw modal with a plain canvas, Upload throughprepareImageUpload({ height: 200 }), Remove) under the photo inProfileSettings.
-
- Purchasing:
getPurchaseOrderApprovaldownloads the file (service role, path re-checked againstdecisionBy) and returns a data URL;decidePurchaseOrderApprovalmapssignature-requiredtovalidation. PO page: Approve opens "Add your signature" when the setting is on and the user has none.
- Purchasing:
-
- Settings → Purchasing: toggle
requirePurchaseOrderApprovalSignature.
- Settings → Purchasing: toggle
-
- Documents: built-in block
approval(schema,BLOCK_METAwithshowWhenAppended, default PO layout after Terms,resolveTemplateappends it visible),ApprovalBlockin the PO registry, other full registries return null, sample signature.
- Documents: built-in block
-
- Verify: license headers, Biome, typecheck
@carbon/utils,@carbon/documents,@carbon/ee,@carbon/account,erp(one at a time), documents tests,lingui:extract. Update ruledocument-template-customizer.mdand the purchasing AGENTS.md.
- Verify: license headers, Biome, typecheck
Status
- Done: every task. Typecheck passes for
@carbon/utils,@carbon/accountand@carbon/documents. Tests pass forsignature.test.tsandtemplate.test.ts. Biome is clean. - Open: the user runs
pnpm db:migrate. Then typecheck@carbon/eeanderpagain. Their only errors today are the three new columns. - Open: fill the 22 new strings per catalog with
/translatebefore the commit.