reference2 min readv1
Slice files
A generated Product Slice, file by file. Managed files change through a framework upgrade. Seeded files are starting points that you edit.
Configuration
| File | Owner | Purpose |
|---|---|---|
package.json | Managed keys only | Dependencies and the ./contracts export. See Ownership. |
project.json | Managed | The Slice’s Nx targets. |
tsconfig.json | Managed | TypeScript configuration. |
vitest.config.ts | Managed | Test configuration. |
sst.config.ts | Managed | The SST application entry. |
sst-env.d.ts | Written by SST | Types for linked resources. |
ebk-globals.d.ts | Managed | Ambient types for infrastructure code. |
.ebk/ownership.json | Managed | The ownership record for this Slice. |
README.md | Seeded | Your notes about the Slice. |
Infrastructure and data
| File | Owner | Purpose |
|---|---|---|
infra/index.ts | Managed | Re-exports the infrastructure. |
infra/product.ts | Managed | The Slice’s resources, built with the shared Slice builders. |
data/persistence.json | Managed | Which stores the Slice uses. DynamoDB by default. |
data/key-value.ts | Managed | The Slice’s key-value store, from the runtime package. |
data/records.ts | Seeded | Example records. Replace with yours. |
Contracts and API
| File | Owner | Purpose |
|---|---|---|
contracts/index.ts | Seeded | The types other projects may import. |
api/health.ts | Seeded | A health handler. |
api/protected.ts | Seeded | A handler that requires a signed-in user. |
Web
| File | Owner | Purpose |
|---|---|---|
web/tsconfig.json | Managed | TypeScript configuration for the app. |
web/next.config.ts | Managed | Next.js configuration. |
web/open-next.config.ts | Managed | OpenNext configuration. |
web/src/app/layout.tsx | Seeded | The root layout. |
web/src/app/page.tsx | Seeded | The home page. |
web/src/app/page.spec.tsx | Seeded | A test for the home page. |
web/src/app/globals.css | Seeded | Global styles. |
web/src/app/icon.svg | Seeded | The site icon. |
web/src/app/sign-in/page.tsx | Seeded | The sign-in page. |
web/src/app/api/health/route.ts | Managed | Web route for the health handler. |
web/src/app/api/protected/route.ts | Managed | Web route for the protected handler. |
web/src/app/api/auth/sign-in/route.ts | Managed | Sign-in route; delegates to @empire-builder-kit/runtime/auth-web. |
web/src/app/api/auth/sign-out/route.ts | Managed | Sign-out route; delegates to @empire-builder-kit/runtime/auth-web. |
web/src/app/api/auth/refresh/route.ts | Managed | Session refresh route; delegates to @empire-builder-kit/runtime/auth-web. |
web/src/app/api/auth/password-reset/route.ts | Managed | Password-reset route; delegates to @empire-builder-kit/runtime/auth-web. |
Continue building