Skip to content

Carbon is a high-performance, open-source, single tenant (incomplete) ERP written in Typescript. It allows customers, suppliers, and employees to share a common platform that's easy to extend.

License

Notifications You must be signed in to change notification settings

rodrigocezar/carbon

Repository files navigation

Carbon Logo

Carbon ERP

Carbon is a high permformance, open-source, single tenant (incomplete) ERP written in Typescript. It allows customers, suppliers, and employees to share a common platform that's easy to integrate with.

Technical highlights/roadmap:

  • Full-stack type safety (Datbase → UI)
  • Realtime database subscriptions
  • Attribute-based access control (ABAC)
  • Row-level security (RLS)
  • Composable user groups
  • Magic link authentication
  • File-based routing
  • Third-party integrations for data
  • Easy-to-use plugin system

Product highlights/roadmap are:

  • Search
  • Customer and supplier access
  • Double-entry accrual accounting
  • Stochastic scheduling/planning
  • Graph-based routing for manufacturing

Project Status

  • Pre-Alpha: Developing foundation
  • Alpha: Heavy feature development and refinement
  • Public Alpha: Ready for use. But go easy on us, there'll be bugs.
  • Public Beta: Stable enough for most non-enterprise use-cases.
  • Public: Production-ready

Codebase

The monorepo follows the Turborepo covention of grouping packages into one of two folders.

  1. /apps for applications
  2. /packages for shared code

/apps

Package Name Description Local Command
carbon ERP Application npm run dev

/packages

Package Name Description
eslint-config-carbon Shared, extendable eslint configuration for apps and packages
@carbon/database Database schema, migrations and types
@carbon/jest Jest preset configuration shared across apps and packages
@carbon/logger Shared logger used across apps
@carbon/react Shared web-based UI components
@carbon/redis Redis cache client
@carbon/tsconfig Shared, extendable tsconfig configuration used across apps and packages
@carbon/utils Shared utility functions used across apps and packages

There are two other top-level folders worth mentioning:

Package Name Description Local Command
shared A shared API for things like currency exchange rates npm run dev:shared
www The documentation site npm run dev:www

Local Development

Make sure that you have Docker installed on your system since this monorepo uses the Docker for local development.

After running the steps below you should be able to access the following apps/containers locally:

Application URL
Carbon ERP http://localhost:3600
Postgres postgresql://postgres:postgres@localhost:54322/postgres
Supabase Studio http://localhost:54323/project/default
Inbucket http://localhost:54324/monitor
Redis redis://localhost:6379
Edge Functions http://localhost:54321/functions/v1/

First download and initialize the repository dependencies.

$ nvm use           # use node v20
$ npm install       # install dependencies
$ npm run db:start  # pull and run the containers

Copy the environment variables from the initialization script to an .env file:

$ cp ./.env.example ./.env

After you've set the enviroment variables to the output of npm run db:start you can run

$ npm run db:build     # run db migrations and seed script
$ npm run build        # build the packages

Finally, start the apps and packages:

$ npm run dev         # npm run dev in all apps & packages

To kill the database containers in a non-recoverable way, you can run:

$ npm run db:kill   # stop and delete all database containers

To restart and reseed the database, you can run:

$ npm run db:build # runs db:kill, db:start, and setup

To run a particular application, use the -w workspace flag.

For example, to run test command in the @carbon/react package you can run:

$ npm run test -w @carbon/react

About

Carbon is a high-performance, open-source, single tenant (incomplete) ERP written in Typescript. It allows customers, suppliers, and employees to share a common platform that's easy to extend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published