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
@carbon/onboarding
Implementation Hub — onboarding blueprint, pure logic, server DB helpers, and presentational UI for company setup.
Always
- Use the three-export structure:
@carbon/onboarding(logic + types),@carbon/onboarding/server(DB helpers),@carbon/onboarding/ui(React components) - Follow Carbon service convention — server functions take supabase client as first arg, return
{ data, error }(never throw) - Keep logic pure and client-safe —
src/logic/contains visibility, timeline, board, guide, and overlay logic with no server deps - Use zustand for UI state —
hubStoremanages the Implementation Hub's client-side state viaHubProvider
Ask First
- Modifying the
TEMPLATE_KEYorTEMPLATE_VERSIONconstants (affects enrolled companies) - Adding new DB tables or columns (needs migration + RLS)
- Changing the onboarding step ordering or visibility logic
Never
- Import server-only modules (
@supabase/supabase-js, DB client) from the client-safe barrel export - Hardcode company-specific setup steps — use the template/content system
Validation Commands
pnpm --filter @carbon/onboarding test # vitest
pnpm --filter @carbon/onboarding typecheck # tsc --noEmit
Key Patterns
- Content-driven:
src/content.tsdefines the template blueprint (steps, sections, exclusions) - Logic layer:
src/logic/— pure functions for visibility, timeline, board layout, guide flow - UI primitives:
src/ui/primitives/—PageHeader,Section/Panel(design-systemCard-composed surfaces:Section=CardHeader+ divided-listCardContent,Panel= titled/proseCard),StatusToggle,EditableInput,DerivedStatus(display-only ring for auto-derived items) - Views:
ScopeView,RolesView,DataMigrationView,TrainingView,GoLiveView, etc.
Cross-References
packages/database/—implementationHub,implementationCheckState,implementationFieldValue,implementationRowtablespackages/form/— form primitives used by onboarding UIpackages/react/— shared React components