crbnos / carbon
Carbon is an open source ERP, MES and QMS for manufacturing. Perfect for complex assembly, contract manufacturing, and configure to order manufacturing.
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing crbnos/carbon in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewThe operating system for manufacturing Discord · Website · Documentation Does the world need another ERP? We built Carbon after years of building end-to-end manufacturing systems with off-the-shelf solutions. We realized that: • Modern, API-first tooling didn't exist • Vendor lock-in bordered on extortion • There is no "perfect ERP" because each company is unique We built Carbon to solve these problems ☝️ Architecture Carbon is designed to make it easy for you to extend the platform by building your own apps through our API. We provide some examples to get you started in the examples folder. Features: • [x] ERP • [x] MES • [x] QMS • [x] Custom Fields • [x] Nested BoM • [x] Traceability • [x] MRP • [x] Configurator • [x] MCP Client/Server • [x] API • [x] Webhooks • [ ] Accounting • [ ] Capacity Planning • [ ] Simulation • [ ] Full Roadmap Technical highlights: • [x] Unified auth and permissions across apps • [x] Full-stack type safety (Database → UI) • [x] Realtime database subscriptions • [x] Attribute-based access control (ABAC) • [x] Role-based access control (Customer, Supplier, Employee) • [x] Row-level security (RLS) • [x] Composable user groups • [x] Dependency graph for operations • [x] Third-party integrations Techstack • React Router – framework • Typescript – language • Tailwind – styling • Radix UI - behavior • Supabase - database • Supabase – auth • Upstash - cache • Trigger - jobs • Resend – email • Novu – notifications • Vercel – hosting • Stripe - billing Codebase The monorepo follows the Turborepo convention of grouping packages into one of two folders. • for applications • for shared code | Package Name | Description | Local Command | | ------------ | --------------- | --------------------- | | | ERP Application | | | | MES | | | | Academy | | | | Starter | | | Package Name | Description | | ------------------- | ----------------------------------------------------------------------- | | | Database schema, migrations and types | | | Transactional PDFs and email templates | | | Integration definitions and configurations | | | Jest preset configuration shared across apps and packages | | | Background jobs and workers | | | Shared logger used across apps | | | Shared web-based UI components | | | Redis cache client | | | Third-party client libraries (slack, resend) | | | Stripe integration | | | Shared, extendable tsconfig configuration used across apps and packages | | | Shared utility functions used across apps and packages | Development Setup • Clone the repo into a public GitHub repository (or fork https://github.com/crbnos/carbon/fork). If want to make the repo private, you should acquire a commercial license to comply with the AGPL license. • Go to the project folder Make sure that you have Docker installed on your system since this monorepo uses the Docker for local development. In addition you must configure the following external services: | Service | Purpose | URL | | ----------- | -------------------------- | ---------------------------------------------------------------------- | | Upstash | Serverless Redis | https://console.upstash.com/login | | Trigger.dev | Job runner | https://cloud.trigger.dev/login | | Posthog | Product analytics platform | https://us.posthog.com/signup | Each of these services has a free tier which should be plenty to support local development. If you're self hosting, and you don't want to use Upstash or Posthog, it's pretty easy to replace upstash with a redis container in and remove the Posthog analytics. Installation First download and initialize the repository dependencies. Create an file and copy the contents of file into it • Use the output of to set the supabase entries: • • 2. Create a Redis database in upstash and copy the following from the section: • • 3. Navigate to the project you created in https://cloud.trigger.dev and copy the following from the section: • • • 4. In Posthog go to [https://[region].posthog.com/project/[project-id]/settings/project-details](https://[region].posthog.com/project/[project-id]/settings/project-details) to find your Project ID and Project API key: • • 5. Add a from the Stripe admin interface, and then run to get a • • 6. **Resend** (Email service) - Create a Resend account and configure: • • (or your domain, no trailing slashes or protocols) • (Optional - required for contact management in ) Resend is used for transactional emails (user invitations, email verification, onboarding). All three variables are stored in . • **Novu** (In-app notifications) - Create a Novu account and configure: • (Client-side, public) • (Server-side secret, backend only) Novu is used for in-app notifications and notification workflows. After setup, sync your Novu workflows: This command syncs your Novu workflows with the Carbon application using the bridge URL. • Signing in requires you to setup one of two methods: • Email requires a Resend API key (configured in step 6 above) • Sign-in with Google requires a Google auth client with these variables: • - • Then you can run the following: Finally, start the apps and packages: After installation you should be able run the apps locally. | Application | URL | | --------------- | ------------------------------------------------------------------------------------------------------------------ | | ERP | http://localhost:3000 | | MES | http://localhost:3001 | | Academy | http://localhost:4111 | | Starter | http://localhost:4000 | | Postgres | postgresql://postgres:postgres@localhost:54322/postgres | | Supabase Studio | http://localhost:54323/project/default | | Mailpit | http://localhost:54324 | | Edge Functions | http://localhost:54321/functions/v1/ | Code Formatting This project uses Biome for code formatting and linting. To set up automatic formatting on save in VS Code: • Install the Biome VS Code extension • Add the following to your VS Code settings ( or global settings): Commands To add an edge function To add a database migration…