Imports
Every import path, grouped by what it does. The Install column is the command that makes the import available; everything else works the same whichever install it comes from.
Storage, documents, and assets backends are listed separately under Adapters.
Content
The interfaces every backend implements, and the JSON:API handlers that serve them over HTTP.
| Import | Install | What it does |
|---|---|---|
contentia/storage | pnpm add contentia | StorageRepository: objects, folders, and atoms |
contentia/documents | pnpm add contentia | DocumentsRepository: documents with drafts, publishing, revisions |
contentia/assets | pnpm add contentia | AssetsRepository: media files with URLs and image variations |
contentia/catalog | pnpm add contentia | CatalogProvider: collections and their JSON Schemas |
contentia/storage/api | pnpm add contentia | buildJsonApi: a storage repository as a JSON:API handler |
contentia/documents/api | pnpm add contentia | A documents repository as a JSON:API handler |
contentia/assets/api | pnpm add contentia | An assets repository as a JSON:API handler |
contentia/catalog-api | pnpm add contentia | Catalog settings as a JSON:API handler |
contentia/json-api | pnpm add contentia | Shared JSON:API helpers, including the explicit allowAll policy |
Catalogs
Where collection definitions come from.
| Import | Install | What it does |
|---|---|---|
contentia/catalog-convention | pnpm add contentia | Collections by convention: each collection is the folder with the same name. Defaults are created on first use, no seeding needed. |
contentia/catalog-decap | pnpm add contentia | Collections derived from a Decap CMS config, so the server and the editor share one source of truth. Supports multi-folder and nested collections. |
@contentia/aws/catalog-ddb | pnpm add contentia @contentia/aws | Catalog settings stored in DynamoDB |
Serializers
Any serializer works with any storage adapter. Register one per file extension.
| Import | Install | What it does |
|---|---|---|
contentia/serializers/json | pnpm add contentia | JSON |
contentia/serializers/yaml | pnpm add contentia | YAML |
contentia/serializers/markdown | pnpm add contentia | Markdown with frontmatter |
contentia/serializers/raw | pnpm add contentia | Raw text or binary, stored as-is |
Running tasks
Nothing to import: await a task (or call task.run({ onProgress })), and iterate a stream with for await or load it whole with stream.collect(). These work without Effect.
| Import | Install | What it does |
|---|---|---|
contentia/core | pnpm add contentia | ContentiaTask, ContentiaStream, shared types, and errors, for code that uses Effect directly |
Errors
| Import | Install | What it does |
|---|---|---|
contentia/core/errors | pnpm add contentia | Every ContentiaError class. Commonly caught: NotFoundError, BadRequestError, ForbiddenError, LockConflictError, VersionMismatchError, EntryAlreadyExistsError, TooManyRequestsError |
contentia/core/errors-extra | pnpm add contentia | HTTP mapping for errors: ErrorCodeToStatusMap (error code to HTTP status), ErrorCodeToKeyMap, ErrorClasses |
Serving and authentication
| Import | Install | What it does |
|---|---|---|
contentia/server/api | pnpm add contentia | contentiaApi: documents, storage, and assets behind one authenticated endpoint |
contentia/server/oauth2 | pnpm add contentia | A self-contained OAuth2 login server: PKCE, email and password, passkeys, TOTP two-factor |
contentia/server/oauth2/i18n | pnpm add contentia | Translations for the login pages (…/en, …/nl) |
contentia/auth | pnpm add contentia | Scopes (hasScope, requireScope, …), personal access tokens (mintPersonalAccessToken, hashToken, …), and resolveBearer |
contentia/locks/in-process | pnpm add contentia | InProcessLockManager: advisory document locks for a single server process |
contentia/server/mcp | pnpm add contentia @modelcontextprotocol/sdk | The MCP server: exposes the API to AI agents with two tools, read_api_spec and api_request. The MCP SDK is an optional peer |
See API Server for how these fit together.
Uploads
| Import | Install | What it does |
|---|---|---|
contentia/file-sanitizer | pnpm add contentia | Strips privacy-sensitive metadata from PNG, GIF, WebP, and JPEG uploads, and scans for dangerous content (sanitizeFile, canSanitize) |
contentia/sanitizer | pnpm add contentia | The Sanitizer interface assets repositories accept, for plugging in your own sanitizer |
Integrations
| Import | Install | What it does |
|---|---|---|
@contentia/astro | pnpm add contentia @contentia/astro | Astro integration: dev JSON:API, content hot reload, types |
@contentia/astro/loader | pnpm add contentia @contentia/astro | Content Layer loaders: documentsLoader(), objectsLoader(), contentiaCollections() |
@contentia/astro/live | pnpm add contentia @contentia/astro | liveDocumentsLoader() for live collections and draft previews |
@contentia/astro/api | pnpm add contentia @contentia/astro | createApiHandler: serve the API from an Astro route |
@contentia/astro/testing | pnpm add contentia @contentia/astro | A fake LoaderContext for testing loaders without booting Astro |
@contentia/vite-plugin | pnpm add contentia @contentia/vite-plugin | Vite plugin: import content as ES modules at build time |
@contentia/decap | pnpm add contentia @contentia/decap @laikacms/decap-cms react | Decap CMS backend: the Decap admin reads and writes entries and media through the Contentia API |
Writing your own adapter
| Import | Install | What it does |
|---|---|---|
contentia/storage/testing | pnpm add contentia | Contract tests for StorageRepository implementations |
contentia/documents/testing | pnpm add contentia | Contract tests for DocumentsRepository, plus InMemoryDocumentsRepository, a fast in-memory backend for tests |
contentia/assets/testing | pnpm add contentia | Contract tests for AssetsRepository implementations |
Utilities
| Import | Install | What it does |
|---|---|---|
contentia/core/utilities | pnpm add contentia | Dependency-free helpers (memoize, lazy, Url, Header, Paths) that don't pull in Effect |
contentia/core/types/* | pnpm add contentia | Individual type modules: datetime, mime-type, pagination, role, … |
contentia/crypto | pnpm add contentia | Hashing, password hashing, constant-time comparison, randomness. Import contentia/crypto/<module> to pull in one part only |
contentia/i18n | pnpm add contentia | Shared UI strings: OK, Cancel, Save, … (…/en, …/nl) |
Older dashed import names (contentia/storage-fs, contentia/storage-serializers-json, …) are aliases of the paths above and resolve to the same modules.