Giter VIP home page Giter VIP logo

birbosluk / carbon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scarperharper/carbon

0.0 0.0 0.0 7.02 MB

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.

Home Page: https://carbon.us.org

License: MIT License

Shell 0.01% JavaScript 0.51% TypeScript 93.63% CSS 0.20% PLpgSQL 4.55% MDX 1.11%

carbon's Introduction

Carbon Logo

Carbon ERP

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 integrate with.

Technical highlights/roadmap:

  • Full-stack type safety (Database → 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

Techstack

Codebase

The monorepo follows the Turborepo convention 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/documents Transactional PDFs and email templates
@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

Local Development

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

After installation you should be able to access the following apps/containers locally:

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

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.

Installation

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

Create an .env file and copy the contents of .env.example file into it

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

Add your environment variables:

  1. Use the output of npm run db:start to set the supabase entries:
  • SUPABASE_SERVICE_ROLE=[service_role key]
  • SUPABASE_ANON_PUBLIC=[anon key]
  1. Create a Redis database in upstash and copy the following from the REST API section:
  • UPSTASH_REDIS_REST_URL=[UPSTASH_REDIS_REST_URL]
  • UPSTASH_REDIS_REST_TOKEN=[UPSTASH_REDIS_REST_TOKEN]]
  1. Navigate to the project you created in https://cloud.trigger.dev/ and copy the following from the Environments & API Keys section:
  • TRIGGER_PUBLIC_API_KEY=[Public 'dev' API Key, starting 'pk_dev_']
  • TRIGGER_API_KEY=[Server 'dev' API Key, starting 'tr_dev_']
  1. In Posthog go to https://[region].posthog.com/project/[project-id]/settings/project-details to find your Project ID and Project API key:
  • POSTHOG_API_HOST=[https://[region].posthog.com]
  • POSTHOG_PROJECT_PUBLIC_KEY=[Project API Key starting 'phc_']

Then you can run the following:

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

Finally, start the apps and packages:

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

You can now sign in with:

username: [email protected] password: carbon

Go ahead and create your own user account

Notes

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

carbon's People

Contributors

barbinbrad avatar neilk17 avatar crudmachine avatar alidauda avatar sapter avatar scarperharper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.