Skip to content
Empire Builder KitDocumentation
v1 Documentation

Find your next step.

Search the complete documentation, including code examples.

    Full-text search↑ ↓ navigate Enter open
    Browse documentation
    DocsCore concepts

    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
    1. Layout
    2. Root targets
    3. Boundaries between projects
    Measured elevation, plan, and axonometric drawing of a Roman portico
    A workspace is a set of boundaries. These pages explain each one and who owns it.

    Layout

    PathWhat it is
    packages/foundationThe Foundation: the shared Router, identity, events and observability for each stage.
    packages/<slice>One Product Slice per product, for example packages/billing.
    packages/siteThe optional root site, served at /. Slice paths take precedence over it.
    .github/workflowsThe two workflows: ci.yml and deploy.yml.
    .ebk/ownership.jsonThe record of which generated root files the framework manages.
    pnpm-workspace.yamlYours to edit, including dependency overrides. Keep the packages/* entry.
    Architecture plate / workspace

    A shared Foundation. Product-owned Slices.

    Product Slices around a shared FoundationSix example Product Slices surround the Foundation. Dashed links show each Slice consuming the shared capabilities: routing, identity, configuration and observability. The brass ring is the Foundation-owned EventBridge bus for one stage. Circles show responsibilities, not AWS security boundaries.WORKSPACE / ONE STAGEEXAMPLE PRODUCTFoundationSHARED CAPABILITIESIdentity · routingConfigurationObservabilityShared EventBridge busFoundation-owned · one per stageIOrdersPRODUCT SLICEIIBillingPRODUCT SLICEIIIInventoryPRODUCT SLICEIVNotificationsPRODUCT SLICEVReportingPRODUCT SLICEVIAccountsPRODUCT SLICEShared capabilitiesEvent busSix Slices shown as an example

    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.

    Slices sit beside the Foundation and consume it. They do not import each other’s internals.

    Root targets

    The root project is named after your workspace and has 7 targets. Run one with pnpm nx run <workspace>:<target>.

    TargetWhat it does
    devRuns your Slices together on your machine.
    dev-setupPrepares the local HTTPS gateway, once.
    dev-doctorInspects the local setup without changing it.
    deploy-localDeploys the Foundation, the root site and every Slice to development from your machine.
    deployment-planPrints the ordered set of projects a stage deployment would run.
    verifyRuns workspace health as part of pnpm verify.
    workspace-healthChecks 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.