# Package Architecture

> Understand the current package layout and public package names in the monorepo.

*Canonical: https://makerkit.dev/docs/nextjs-drizzle/project-structure/package-architecture*

---

This repo uses top-level workspace packages plus a few grouped package families under `packages/`.

## Core Packages

- `@kit/database` - Drizzle schema, client, migrations, test helpers
- `@kit/rbac` - RBAC config and defaults
- `@kit/shared` - shared utilities
- `@kit/policies` - authorization policy helpers
- `@kit/action-middleware` - server-action middleware

## Authentication

- `@kit/better-auth` - Better Auth setup and plugins
- `@kit/auth` - auth UI and hooks
- `@kit/otp` - OTP UI and helpers

## Account and Organization

Under `packages/account/`:

- `@kit/account-core`
- `@kit/account-hooks`
- `@kit/account-ui`

Under `packages/organization/`:

- `@kit/organization-core`
- `@kit/organization-hooks`
- `@kit/organization-policies`
- `@kit/organization-ui`

## Billing

Under `packages/billing/`:

- `@kit/billing`
- `@kit/billing-api`
- `@kit/billing-ui`
- `@kit/billing-stripe`
- `@kit/billing-polar`
- `@kit/web-billing-config`

## UI, Content, and Integrations

- `@kit/ui`
- `@kit/i18n`
- `@kit/storage`
- `@kit/analytics`
- `@kit/admin`
- `@kit/mailers`
- `@kit/mailers-shared`
- `@kit/nodemailer`
- `@kit/resend`
- `@kit/email-templates`

## Monitoring

Under `packages/monitoring/`:

- `@kit/monitoring`
- `@kit/monitoring-core`
- `@kit/sentry`

## CMS

Under `packages/cms/`:

- `@kit/cms`
- `@kit/cms-types`
- `@kit/keystatic`
- `@kit/wordpress`
- `@kit/pagefind`

## Package Placement

Use a top-level workspace package only when the code is genuinely shared across apps or large enough to deserve a stable boundary. Otherwise prefer local feature code under `apps/web/app/[locale]/...`.

There is no special `packages/features/` directory in this repo. Shared packages live directly under `packages/` or inside grouped folders like `packages/account/` and `packages/organization/`.

---

**Next:** [Configuration →](../configuration/overview)
