> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackra.figentra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Package categories

> packages/<category>/<name>: one level of category, packages flat inside it.

A package lives at `packages/<category>/<name>` and is published as `@stackra/<name>`. The category is
only a folder: it never appears in the package name or an import path, so moving a package between
categories changes nothing for its consumers.

| Category | Holds |
| - | - |
| `foundation` | The core every other package builds on: container, config, contracts, events, logger, support |
| `application` | Codegen (IR, compiler, schema generation) and AI; the definition package is dropped (0092) |
| `communication` | Notifications, webhooks, mail |
| `cross-cutting` | Concerns that touch every layer: analytics, brand, SEO |
| `data` | Media, search, persistence helpers |
| `developer` | CLI, devtools, Vite plugins |
| `experience` | UI building blocks: console shell, forms, navigation, dashboards |
| `runtime` | Cache, outbox, queue, scheduler, workflow, realtime (0078) |
| `security` | Identity, IAM, tenancy, consent, CSP |
| `state` | Settings, feature flags, theming |
| `tooling` | Shared tsconfig, oxlint, vitest and tsdown presets |

> [!NOTE]
>
> A package never imports an app, a service or `encore.dev`, and never deep-imports another
> package's `src/`.

## A new package

1. Create `packages/<category>/<name>/` with `package.json` named `@stackra/<name>`.
2. `turbo.jsonc`: `{ "extends": ["//"], "tags": ["tier:lib"] }`.
3. `tsconfig.json`: `{ "extends": "@stackra/typescript-config/library" }` (or another preset).
4. `vitest.config.ts`: extend a preset from `@stackra/vitest-config`.
5. Every dependency is `catalog:<name>` or `workspace:*`.

`pnpm validate` checks steps 1, 2, 3 and 5.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.