Skip to content

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.

docs: update installation instructions

Simon Harperf0ace57c37f9
diff --git a/README.md b/README.md
index fb70288f16..541f9fa699 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,7 @@ The monorepo follows the Turborepo convention of grouping packages into one of t
Make sure that you have [Docker installed](https://docs.docker.com/desktop/install/mac-install/) 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:
+After installation you should be able to access the following apps/containers locally:
| Application | URL |
| --------------- | ------------------------------------------------------------------------------------------------------------------ |
@@ -91,9 +91,21 @@ After running the steps below you should be able to access the following apps/co
| Postgres | [postgresql://postgres:postgres@localhost:54322/postgres](postgresql://postgres:postgres@localhost:54322/postgres) |
| Supabase Studio | [http://localhost:54323/project/default](http://localhost:54323/project/default) |
| Inbucket | [http://localhost:54324/monitor](http://localhost:54324/monitor) |
-| Redis | [redis://localhost:6379](redis://localhost:6379) |
| Edge Functions | [http://localhost:54321/functions/v1/<function-name>](http://localhost:54321/functions/v1/<function-name>) |
+In addition you must configure the following external services:
+
+| Service | Purpose | URL |
+| --------------- | ---------------------------|-------------------------------------------------------------------------------------- |
+| Upstash | Serverless Redis | [https://console.upstash.com/login](https://console.upstash.com/login) |
+| Trigger.dev | Job runner | [https://cloud.trigger.dev/login](https://cloud.trigger.dev/login) |
+| Posthog | Product analytics platform | [https://us.posthog.com/signup](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.
```bash
@@ -105,21 +117,38 @@ $ npm run db:start # pull and run the containers
Create an `.env` file and copy the contents of `.env.example` file into it
```bash
- cp ./.env.example ./.env
+$ cp ./.env.example ./.env
```
+Add your environment variables:
-Use the output of `npm run db:start` to set the following variables in `.env`:
+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]
+2. [Create a Redis database in upstash](https://console.upstash.com/redis) 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]]
+
+3. Navigate to the project you created in [https://cloud.trigger.dev/](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_']
+
+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:
+
+- POSTHOG_API_HOST=[https://[region].posthog.com]
+- POSTHOG_PROJECT_PUBLIC_KEY=[Project API Key starting 'phc_']
+
+
Then you can run the following:
```bash
$ npm run db:build # run db migrations and seed script
-$ npm run build # build the packages
+$ npm run build:app # build the app
```
Finally, start the apps and packages:
@@ -128,6 +157,15 @@ Finally, start the apps and packages:
$ npm run dev # npm run dev in all apps & packages
```
+You can now sign in with:
+
+password: carbon
+
+Go ahead and create your own user account
+
+### Notes
+
To kill the database containers in a non-recoverable way, you can run:
```bash
diff --git a/package.json b/package.json
index 91e00e4d92..1cf1c11aed 100755
--- a/package.json
+++ b/package.json
@@ -28,6 +28,7 @@
"scripts": {
"build": "turbo run build",
"build:packages": "turbo run build --filter=./packages/*",
+ "build:app": "turbo run build --filter=!www",
"clean": "turbo run clean && rimraf ./node_modules && rimraf ./package-lock.json",
"db:build": "run-s db:kill db:start setup",
"db:function:new": "npm run db:function:new -w @carbon/database",
@@ -60,4 +61,4 @@
"shared",
"www"
]
-}
+}
\ No newline at end of file