# nextlyhq/nextly architecture

> Architecture diagram of the GitHub repository nextlyhq/nextly, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nextlyhq/nextly
- Repository: https://github.com/nextlyhq/nextly

## Overview

Nextly is a self-hosted content platform embedded in a Next.js application. Developers define content models in TypeScript or through the admin’s visual schema tools; editors then manage entries, compose pages, translate content, and control publication. The admin and typed APIs use core services backed by a selectable database adapter, while the application renders published content. The README documents major capabilities such as versioning, scheduling, roles, webhooks, jobs, plugins, and storage options. Some subsystems are represented at their source-directory level because their implementation files were not sampled.

Main entry points: [`packages/admin/src/components/features`](https://github.com/nextlyhq/nextly/tree/main/packages/admin/src/components/features) (Admin interface), [`packages/nextly/src/domains/collections/services`](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/collections/services) (Collection services), [`packages/plugin-page-builder/src`](https://github.com/nextlyhq/nextly/tree/main/packages/plugin-page-builder/src) (Visual page builder), [`packages/adapter-drizzle/src`](https://github.com/nextlyhq/nextly/tree/main/packages/adapter-drizzle/src) (SQL adapters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Model and author"]
  node_admin["Admin interface"]
  node_schema["Content schemas"]
  node_pagebuilder["Visual page builder"]
end

subgraph group_runtime["Content runtime"]
  node_api["REST and Direct APIs"]
  node_frontend["Next.js frontend"]
  node_blocks["Block rendering"]
end

subgraph group_platform["Core platform"]
  node_entryservice["Collection services"]
  node_singles["Single documents"]
  node_fieldgroups["Field groups"]
  node_i18n["Locale resolution"]
  node_versions["Version history"]
  node_releases["Scheduled releases"]
  node_access["Roles and permissions"]
  node_users["User management"]
end

subgraph group_integrations["Adapters and extensions"]
  node_database[("Application database")]
  node_adapters["SQL adapters"]
  node_storage["Media storage"]
  node_plugins["Plugin SDK"]
  node_webhooks["Webhook delivery"]
  node_jobs["Background jobs"]
end

node_editor(("Content team"))

node_editor -->|"edits content"| node_admin
node_admin -->|"defines models"| node_schema
node_admin -->|"manages entries"| node_entryservice
node_admin -->|"composes pages"| node_pagebuilder
node_pagebuilder -->|"renders blocks"| node_blocks
node_frontend -.->|"reads content"| node_entryservice
node_entryservice -->|"resolves locales"| node_i18n
node_entryservice -.->|"populates fields"| node_fieldgroups
node_admin -->|"edits singletons"| node_singles
node_entryservice -.->|"captures versions"| node_versions
node_admin -->|"schedules publishing"| node_releases
node_entryservice -.->|"checks permissions"| node_access
node_admin -.->|"manages users"| node_users
node_admin -->|"uses typed APIs"| node_api
node_api -.->|"dispatches requests"| node_entryservice
node_entryservice -.->|"queries through"| node_adapters
node_singles -.->|"queries through"| node_adapters
node_adapters -->|"reads and writes"| node_database
node_entryservice -.->|"handles media"| node_storage
node_admin -->|"loads extensions"| node_plugins
node_plugins -->|"extends platform"| node_pagebuilder
node_webhooks -.->|"stores deliveries"| node_database
node_admin -.->|"views deliveries"| node_webhooks
node_admin -->|"monitors jobs"| node_jobs

click node_admin "https://github.com/nextlyhq/nextly/tree/main/packages/admin/src/components/features"
click node_schema "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/collections"
click node_pagebuilder "https://github.com/nextlyhq/nextly/tree/main/packages/plugin-page-builder/src"
click node_entryservice "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/collections/services"
click node_singles "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/singles/services"
click node_fieldgroups "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/field-groups/services"
click node_i18n "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/i18n"
click node_versions "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/versions"
click node_releases "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/releases"
click node_access "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/auth"
click node_users "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/users/services"
click node_api "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src"
click node_frontend "https://github.com/nextlyhq/nextly/tree/main/apps/playground/src/app/(frontend)"
click node_blocks "https://github.com/nextlyhq/nextly/tree/main/packages/blocks-react/src"
click node_adapters "https://github.com/nextlyhq/nextly/tree/main/packages/adapter-drizzle/src"
click node_storage "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/storage"
click node_plugins "https://github.com/nextlyhq/nextly/tree/main/packages/plugin-sdk/src"
click node_webhooks "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/webhooks/services"
click node_jobs "https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/jobs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_admin,node_schema,node_pagebuilder toneBlue
class node_api,node_frontend,node_blocks toneAmber
class node_entryservice,node_singles,node_fieldgroups,node_i18n,node_versions,node_releases,node_access,node_users toneMint
class node_database,node_adapters,node_storage,node_plugins,node_webhooks,node_jobs toneRose
class node_editor toneIndigo
```

## Components

### Model and author

- [Admin interface](https://github.com/nextlyhq/nextly/tree/main/packages/admin/src/components/features): `packages/admin/src/components/features`
- [Content schemas](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/collections): `packages/nextly/src/collections`
- [Visual page builder](https://github.com/nextlyhq/nextly/tree/main/packages/plugin-page-builder/src): `packages/plugin-page-builder/src`

### Content runtime

- [REST and Direct APIs](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src): `packages/nextly/src`
- [Next.js frontend](https://github.com/nextlyhq/nextly/tree/main/apps/playground/src/app/(frontend)): `apps/playground/src/app/(frontend)`
- [Block rendering](https://github.com/nextlyhq/nextly/tree/main/packages/blocks-react/src): `packages/blocks-react/src`

### Core platform

- [Collection services](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/collections/services): `packages/nextly/src/domains/collections/services`
- [Single documents](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/singles/services): `packages/nextly/src/domains/singles/services`
- [Field groups](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/field-groups/services): `packages/nextly/src/domains/field-groups/services`
- [Locale resolution](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/i18n): `packages/nextly/src/domains/i18n`
- [Version history](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/versions): `packages/nextly/src/domains/versions`
- [Scheduled releases](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/releases): `packages/nextly/src/domains/releases`
- [Roles and permissions](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/auth): `packages/nextly/src/domains/auth`
- [User management](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/users/services): `packages/nextly/src/domains/users/services`

### Adapters and extensions

- **Application database**
- [SQL adapters](https://github.com/nextlyhq/nextly/tree/main/packages/adapter-drizzle/src): `packages/adapter-drizzle/src`
- [Media storage](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/storage): `packages/nextly/src/storage`
- [Plugin SDK](https://github.com/nextlyhq/nextly/tree/main/packages/plugin-sdk/src): `packages/plugin-sdk/src`
- [Webhook delivery](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/webhooks/services): `packages/nextly/src/domains/webhooks/services`
- [Background jobs](https://github.com/nextlyhq/nextly/tree/main/packages/nextly/src/domains/jobs): `packages/nextly/src/domains/jobs`

### Other components

- **Content team**

## Connections

- Content team → Admin interface: edits content (evidence: `README.md`)
- Admin interface → Content schemas: defines models (evidence: `README.md`)
- Admin interface → Collection services: manages entries (evidence: `README.md`)
- Admin interface → Visual page builder: composes pages (evidence: `README.md`)
- Visual page builder → Block rendering: renders blocks (evidence: `README.md`)
- Next.js frontend → Collection services: reads content
- Collection services → Locale resolution: resolves locales (evidence: `packages/nextly/src/domains/collections/services/collection-query-service.ts`)
- Collection services → Field groups: populates fields
- Admin interface → Single documents: edits singletons (evidence: `README.md`)
- Collection services → Version history: captures versions
- Admin interface → Scheduled releases: schedules publishing (evidence: `README.md`)
- Collection services → Roles and permissions: checks permissions
- Admin interface → User management: manages users
- Admin interface → REST and Direct APIs: uses typed APIs (evidence: `README.md`)
- REST and Direct APIs → Collection services: dispatches requests (evidence: `packages/nextly/src/services/collections/collection-relationship-service.ts`)
- Collection services → SQL adapters: queries through
- Single documents → SQL adapters: queries through
- SQL adapters → Application database: reads and writes (evidence: `README.md`)
- Collection services → Media storage: handles media
- Admin interface → Plugin SDK: loads extensions (evidence: `README.md`)
- Plugin SDK → Visual page builder: extends platform (evidence: `README.md`)
- Webhook delivery → Application database: stores deliveries
- Admin interface → Webhook delivery: views deliveries
- Admin interface → Background jobs: monitors jobs (evidence: `README.md`)
