Workspace
A workspace is one Git repository, managed with Nx and pnpm, that holds a Foundation and your products. The root is deliberately short: a handful of targets, two workflows and the ownership record.
On this page

Layout
| Path | What it is |
|---|---|
packages/foundation | The Foundation: the shared Router, identity, events and observability for each stage. |
packages/<slice> | One Product Slice per product, for example packages/billing. |
packages/site | The optional root site, served at /. Slice paths take precedence over it. |
.github/workflows | The two workflows: ci.yml and deploy.yml. |
.ebk/ownership.json | The record of which generated root files the framework manages. |
pnpm-workspace.yaml | Yours to edit, including dependency overrides. Keep the packages/* entry. |
A shared Foundation. Product-owned Slices.
Choose Detail to inspect the labels. Download the SVG to keep or share this diagram.
Every Slice consumes the same Foundation: one Router, one user pool and one event bus per stage. The six Slices are an example.
Root targets
The root project is named after your workspace and has 7 targets. Run one with pnpm nx run <workspace>:<target>.
| Target | What it does |
|---|---|
dev | Runs your Slices together on your machine. |
dev-setup | Prepares the local HTTPS gateway, once. |
dev-doctor | Inspects the local setup without changing it. |
deploy-local | Deploys the Foundation, the root site and every Slice to development from your machine. |
deployment-plan | Prints the ordered set of projects a stage deployment would run. |
verify | Runs workspace health as part of pnpm verify. |
workspace-health | Checks the ownership record, the pnpm workspace entry and the toolchain pins. |
The root package.json also has ordinary scripts: pnpm verify, pnpm build, pnpm test, pnpm lint, pnpm typecheck and pnpm format.
Boundaries between projects
Each Slice owns its code, its data and its deployment. A Slice exports only its contracts, so another Slice can depend on a supported shape without reaching into handlers or tables. Slices consume the Foundation through its published contract and never import Foundation implementation files.
Deployment follows the same order. The Foundation deploys first, then the root site and the Slices. See Deploy.
Continue building