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
    DocsReference

    Slice files

    A generated Product Slice, file by file. Managed files change through a framework upgrade. Seeded files are starting points that you edit.

    On this page
    1. Configuration
    2. Infrastructure and data
    3. Contracts and API
    4. Web

    Configuration

    FileOwnerPurpose
    package.jsonManaged keys onlyDependencies and the ./contracts export. See Ownership.
    project.jsonManagedThe Slice’s Nx targets.
    tsconfig.jsonManagedTypeScript configuration.
    vitest.config.tsManagedTest configuration.
    sst.config.tsManagedThe SST application entry.
    sst-env.d.tsWritten by SSTTypes for linked resources.
    ebk-globals.d.tsManagedAmbient types for infrastructure code.
    .ebk/ownership.jsonManagedThe ownership record for this Slice.
    README.mdSeededYour notes about the Slice.

    Infrastructure and data

    FileOwnerPurpose
    infra/index.tsManagedRe-exports the infrastructure.
    infra/product.tsManagedThe Slice’s resources, built with the shared Slice builders.
    data/persistence.jsonManagedWhich stores the Slice uses. DynamoDB by default.
    data/key-value.tsManagedThe Slice’s key-value store, from the runtime package.
    data/records.tsSeededExample records. Replace with yours.

    Contracts and API

    FileOwnerPurpose
    contracts/index.tsSeededThe types other projects may import.
    api/health.tsSeededA health handler.
    api/protected.tsSeededA handler that requires a signed-in user.

    Web

    FileOwnerPurpose
    web/tsconfig.jsonManagedTypeScript configuration for the app.
    web/next.config.tsManagedNext.js configuration.
    web/open-next.config.tsManagedOpenNext configuration.
    web/src/app/layout.tsxSeededThe root layout.
    web/src/app/page.tsxSeededThe home page.
    web/src/app/page.spec.tsxSeededA test for the home page.
    web/src/app/globals.cssSeededGlobal styles.
    web/src/app/icon.svgSeededThe site icon.
    web/src/app/sign-in/page.tsxSeededThe sign-in page.
    web/src/app/api/health/route.tsManagedWeb route for the health handler.
    web/src/app/api/protected/route.tsManagedWeb route for the protected handler.
    web/src/app/api/auth/sign-in/route.tsManagedSign-in route; delegates to @empire-builder-kit/runtime/auth-web.
    web/src/app/api/auth/sign-out/route.tsManagedSign-out route; delegates to @empire-builder-kit/runtime/auth-web.
    web/src/app/api/auth/refresh/route.tsManagedSession refresh route; delegates to @empire-builder-kit/runtime/auth-web.
    web/src/app/api/auth/password-reset/route.tsManagedPassword-reset route; delegates to @empire-builder-kit/runtime/auth-web.