Shared packages
Reusable infrastructure lives under packages/. Apps depend on these; apps never depend on each other.
| Package | Purpose |
|---|---|
@constellation-platform/auth-core | JWT types, clearance levels, permission checking |
@constellation-platform/auth-next | Next.js auth middleware (withAuth, withTenantAuth) |
@constellation-platform/db | Tenant-scoped Prisma client, audit trail |
@constellation-platform/errors | Standard error hierarchy and API envelope |
@constellation-platform/audit | Transactional audit via outbox (auditCritical()) |
@constellation-platform/events | Outbox-based event publishing and subscription |
@constellation-platform/testing | Test tenant/user factories, test transaction wrapper |
@constellation/contracts | Shared Zod schemas and derived types |
@constellation/ui | Shared React components |
@constellation/config | Shared ESLint, TypeScript, Vitest configs |
Stub — per-package API docs to be added in follow-up PRs.