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.

fix: doc changes

Sidwebworksd4177062df25
diff --git a/docs/content/docs/platform/architecture.mdx b/docs/content/docs/platform/architecture.mdx
index df7d4ce697..f07ca0dacf 100644
--- a/docs/content/docs/platform/architecture.mdx
+++ b/docs/content/docs/platform/architecture.mdx
@@ -55,7 +55,7 @@ run on **Inngest**; edge functions run on **Supabase / Deno**.
## Authentication
Carbon uses **Supabase Auth** with HTTP-only cookie sessions and Redis-cached permissions (role- and
-attribute-based). Sign-in is by magic link or Google. Programmatic access uses **API keys** (a `carbon-key`
+attribute-based). Sign-in is by magic link, Google, or Outlook. Programmatic access uses **API keys** (a `carbon-key`
header), and a full **OAuth 2.0 server** backs the Claude remote connector.
## Related
diff --git a/docs/content/docs/platform/licensing.mdx b/docs/content/docs/platform/licensing.mdx
index deaca83688..807340e400 100644
--- a/docs/content/docs/platform/licensing.mdx
+++ b/docs/content/docs/platform/licensing.mdx
@@ -13,7 +13,7 @@ Carbon's source is public, but using it isn't unconditional. Two licenses govern
| **Enterprise** | Self-hosted Carbon with a commercial license: unlocks Enterprise features and lifts the AGPL copyleft obligation. | Commercial |
| **Cloud** | Carbon run for you at [app.carbon.ms](https://app.carbon.ms), billed on the Starter and Business plans. | Commercial |
-Self-hosting (the [Docker + Caddy recipe](/docs/platform/self-hosting/docker-caddy)) runs the **Community** edition by default. A commercial license turns the same hardware into the **Enterprise** edition.
+Self-hosting (the [Docker + Caddy recipe](/docs/platform/self-hosting/docker-caddy) or the [AWS with SST recipe](/docs/platform/self-hosting/aws-sst)) runs the **Community** edition by default. A commercial license turns the same hardware into the **Enterprise** edition.
## Open core vs. Enterprise
diff --git a/docs/content/docs/platform/self-hosting/aws-sst.mdx b/docs/content/docs/platform/self-hosting/aws-sst.mdx
index fd9e77991b..20e04dfbf8 100644
--- a/docs/content/docs/platform/self-hosting/aws-sst.mdx
+++ b/docs/content/docs/platform/self-hosting/aws-sst.mdx
@@ -33,4 +33,34 @@ Container images are pulled from **ECR** (`carbon/erp` and `carbon/mes`), built
The WAF web ACL must be **manually associated** with the application load balancer after the first deploy. SST creates it but does not attach it.
</Callout>
+## Deploy
+
+SST drives the deploy from `sst.config.ts`. Run it from the repo root with the [infrastructure variables](/docs/platform/self-hosting/environment-variables#infrastructure-sst) exported.
+
+<Steps>
+ <Step>
+ ### Set the environment
+
+ Export the SST variables (`AWS_REGION`, `AWS_ACCOUNT_ID`, `IMAGE_TAG`, the `CERT_ARN_*`, and any `URL_*`) plus the app config the services read at runtime. The [Supabase instance](/docs/platform/self-hosting/environment-variables#database-supabase) is provisioned out of band.
+ </Step>
+ <Step>
+ ### Deploy the stack
+
+ ```bash
+ npx sst deploy --stage prod
+ ```
+
+ This provisions the VPC, cluster, both Fargate services, and the WAF, pulling the ECR images tagged `IMAGE_TAG`. The `prod` stage retains resources on removal; any other stage removes them.
+ </Step>
+ <Step>
+ ### Associate the WAF
+
+ Attach `AppAlbWebAcl` to the application load balancer in the AWS console (or with the CLI). SST creates the web ACL but does not attach it.
+ </Step>
+</Steps>
+
+<Callout type="note">
+SST does not build the container images. CI builds and pushes `carbon/erp` and `carbon/mes` to ECR; the deploy pulls the tag named by `IMAGE_TAG`.
+</Callout>
+
See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, the [Docker with Caddy](/docs/platform/self-hosting/docker-caddy) recipe for a single VPS, or [Local development](/docs/building/local-development) to run Carbon locally with the `crbn` CLI.
diff --git a/docs/content/docs/platform/self-hosting/environment-variables.mdx b/docs/content/docs/platform/self-hosting/environment-variables.mdx
index 3131f32e1c..941cccd8c9 100644
--- a/docs/content/docs/platform/self-hosting/environment-variables.mdx
+++ b/docs/content/docs/platform/self-hosting/environment-variables.mdx
@@ -53,11 +53,15 @@ Sign-in bot protection uses Cloudflare Turnstile: `CLOUDFLARE_TURNSTILE_SITE_KEY
<EnvVars>
<EnvVar name="REDIS_URL" type="url" required>Redis connection (ioredis URL) for the permission cache and queues.</EnvVar>
-<EnvVar name="INNGEST_SIGNING_KEY" type="string">Signs requests to the Inngest jobs runner.</EnvVar>
-<EnvVar name="INNGEST_EVENT_KEY" type="string">Key for sending events to Inngest.</EnvVar>
+<EnvVar name="INNGEST_SIGNING_KEY" type="string">Signs requests to the Inngest jobs runner. Required in production.</EnvVar>
+<EnvVar name="INNGEST_EVENT_KEY" type="string">Key for sending events to Inngest. Required in production.</EnvVar>
<EnvVar name="INNGEST_BASE_URL" type="url">Override the Inngest endpoint (self-hosted or dev).</EnvVar>
</EnvVars>
+<Callout type="warn" title="Inngest keys are required in production">
+`INNGEST_SIGNING_KEY` and `INNGEST_EVENT_KEY` are only optional in development, where `INNGEST_DEV=1` is set. Without `INNGEST_DEV`, the app fails to boot if either is missing, and no background jobs (MRP, scheduling, notifications, integration syncs) or queued events run. A self-hosted Inngest server supplies both. The Docker with Caddy recipe generates them for you.
+</Callout>
+
## Email & billing
<EnvVars>
diff --git a/playbooks/backup-export-download.md b/playbooks/backup-export-download.md
new file mode 100644
index 0000000000..1b440fb973
--- /dev/null
+++ b/playbooks/backup-export-download.md
@@ -0,0 +1,42 @@
+# Company Backup — Export & Download
+
+Last tested: 2026-06-26
+Route: `/x/settings/backups`
+
+## Prerequisites
+- Internal email session (`DEV_BYPASS_EMAIL` must be `@carbon.ms` / `@carbon.us.org`) — the page is `requireInternal`-gated; non-internal users get 404.
+- Inngest dev process up (`PORT_INNGEST` in `.env.local`, default reachable at `http://localhost:<PORT_INNGEST>/`) — export is an Inngest job, not synchronous.
+
+## Steps
+
+### 1. Navigate
+- URL: `/x/settings/backups`
+- Expected: "Create backup" section (Label textbox + Include combobox), "Restore from a backup" section, and a "Backups" list ("No backups yet." when empty).
+
+### 2. Create a backup
+- Include combobox: "Data only" (default, fastest — no asset copy) or "Data + files".
+- Button: "Create backup" (disables while the export job runs).
+- A "Backup ready" dialog appears on completion (the list revalidates until the artifact lands — export has no status marker, so the UI diffs the list). Click "Done".
+
+### 3. Download
+- A "Download" link appears on the new backup row. Its href is `/api/settings/backup-archive/<name>`.
+- The route re-tars the `exports/<name>/` storage folder on the fly: bounded parallel downloads (window 6) packed into a tar in order, outer gzip at level 1 (entries are already `*.ndjson.gz`), streamed to the browser. NOT a direct signed URL.
+
+### 4. Verify (in-page fetch carries the auth cookie)
+- `fetch(href)` → status 200, `content-type: application/gzip`, `content-disposition: attachment; filename="<name>.carbon.tar.gz"`.
+- First two bytes are gzip magic `0x1f 0x8b`.
+- Decompress with `DecompressionStream("gzip")`, walk 512-byte tar blocks: every entry has `ustar` magic at offset 257; expect `manifest.json` + one `tables/<table>.ndjson.gz` per non-empty table (Data-only). `assets/<path>` entries appear for "Data + files".
+
+### 5. Delete (cleanup)
+- "Delete" button on the row removes the gz + its `.assets/` folder; list returns to "No backups yet." No extra confirm dialog observed.
+
+## Selector Notes
+- The Include type is a combobox: click to open, options are "Data only" (selected by default) and "Data + files".
+- Download is an `<a href*="backup-archive">` — fetch it in-page rather than relying on a browser download dialog.
+- `agent-browser wait --load networkidle` TIMES OUT on these pages (dev HMR keeps sockets open) — use `sleep` + `agent-browser snapshot` instead.
+- Modals (Backup ready / progress) capture the snapshot; use `agent-browser snapshot` (non-interactive) to read dialog text.
+
+## Common Failures
+- 404 on the page or download → session email isn't internal.
+- "Backup ready" never appears → Inngest dev process not running (export job never executes).
+- A Data-only export contains `searchIndexRegistry.ndjson.gz` — harmless (regenerable), not a bug.