Packages in the Monorepo
How shared packages relate to apps — summary, dependency graph, and links to package docs.
Packages in the Monorepo
Shared code lives under packages/. This page explains how packages relate to each other and to apps. API surface, examples, and integration guides live in the Packages section — linked below so there is a single source of truth.
Package summary
| Package | Role | Used by |
|---|---|---|
| @repo/api | Appwrite clients and helpers (server/session and browser patterns) | web, admin |
| @repo/ui | Components, theme, shared UI patterns | web, admin, docs |
| @repo/editor | Puck editor and renderer for visual pages | web, admin |
| @repo/payment | Vipps-oriented checkout and order flows (DI-friendly core) | web, admin |
| @repo/ai | AI-assisted features (admin) | admin |
| @repo/eslint-config | Shared lint presets | all |
| @repo/typescript-config | Shared tsconfig bases | all |
Dependency graph (conceptual)
Package docs (canonical references)
- @repo/api — Overview (server, client, storage)
- @repo/ui — Overview
- @repo/payment — Overview
- @repo/ai — Overview
- @repo/editor — Overview (stub; implementation in
packages/editor)
Tooling packages (eslint-config, typescript-config) are consumed via extends in each app or package; see existing eslint.config.* and tsconfig.json files in the repo.
Conventions
- Apps depend on packages; packages do not depend on apps — Avoid circular coupling.
- Prefer framework-agnostic cores — Pass infrastructure in (see Dependency injection).
- Document exports in the Packages tab — Keep long examples there, not here.
ℹ️
Adding a package
Create a new workspace package under packages/, wire it in the root workspace, add it to the Turborepo pipeline if it has a build step, and add documentation under content/docs/packages/ when the API is stable enough for others to consume.
