# abdullahzaher/vibress architecture

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

- Interactive diagram: https://gitdiagram.com/abdullahzaher/vibress
- Repository: https://github.com/abdullahzaher/vibress

## Overview

Vibress is a self-hostable CMS and publication platform. Staff manage content, themes, settings, plugins, and monetization in the Admin SPA; members use the Portal; readers consume the SSR public site. These clients call the Fastify API, which owns domain operations and persists state, while background workers handle queued work such as email, webhooks, analytics, and search indexing. The README documents the broad runtime topology and capabilities; source excerpts provide additional evidence for storage, theme, and search details. Many domain routes and integrations are unsampled, so their internal links are omitted.

Main entry points: [`apps/api/src/main.ts`](https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/main.ts) (REST API), [`packages/database/src/connection.ts`](https://github.com/abdullahzaher/vibress/blob/main/packages/database/src/connection.ts) (PostgreSQL), [`apps/worker/src/main.ts`](https://github.com/abdullahzaher/vibress/blob/main/apps/worker/src/main.ts) (Background Workers), [`apps/admin/src/app/App.tsx`](https://github.com/abdullahzaher/vibress/blob/main/apps/admin/src/app/App.tsx) (Admin SPA)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User Applications"]
  node_admin["Admin SPA<br/>[App.tsx]"]
  node_portal["Member Portal<br/>[router.tsx]"]
  node_web["Public SSR Site<br/>[page.tsx]"]
end

subgraph group_api["API and Domains"]
  node_api["REST API<br/>[main.ts]"]
  node_content["Content Management<br/>[content.ts]"]
  node_memberships["Membership and Billing<br/>[admin-billing.ts]"]
  node_collab["Collaborative Editing<br/>[room-manager.ts]"]
  node_storage["Media Storage<br/>[storage-service.ts]"]
end

subgraph group_publishing["Publishing and Themes"]
  node_studio["Studio Editor<br/>[index.ts]"]
  node_themes["Theme Rendering<br/>[theme-engine.ts]"]
  node_search["Search Indexing"]
  node_i18n["Localization"]
end

subgraph group_runtime["Persistence and Workers"]
  node_database[("PostgreSQL<br/>[connection.ts]")]
  node_queue["Redis Queue<br/>[index.ts]"]
  node_worker["Background Workers<br/>[main.ts]"]
  node_s3["S3 Provider"]
end

subgraph group_extensions["Extensions"]
  node_plugins["Plugin Runtime<br/>[plugin-host.ts]"]
  node_pluginstore["Scoped Plugin Storage"]
end

node_staff(("Staff"))
node_member(("Members"))
node_reader(("Readers"))

node_staff -->|"manages"| node_admin
node_admin -->|"calls"| node_api
node_member -->|"uses"| node_portal
node_portal -->|"calls"| node_api
node_reader -->|"reads"| node_web
node_web -->|"fetches content"| node_api
node_api -->|"routes content"| node_content
node_api -->|"routes billing"| node_memberships
node_api -->|"persists"| node_database
node_api -->|"enqueues work"| node_queue
node_content -.->|"reads and writes"| node_database
node_memberships -.->|"persists"| node_database
node_admin -->|"edits blocks"| node_studio
node_collab -->|"syncs documents"| node_studio
node_worker -->|"consumes jobs"| node_queue
node_worker -->|"updates data"| node_database
node_worker -.->|"runs indexing"| node_search
node_search -->|"indexes content"| node_database
node_api -->|"handles uploads"| node_storage
node_storage -->|"uses provider"| node_s3
node_themes -->|"formats locales"| node_i18n
node_web -.->|"renders themes"| node_themes
node_api -->|"hosts extensions"| node_plugins
node_plugins -.->|"accesses scoped data"| node_pluginstore
node_pluginstore -->|"reads and writes"| node_database

click node_admin "https://github.com/abdullahzaher/vibress/blob/main/apps/admin/src/app/App.tsx"
click node_portal "https://github.com/abdullahzaher/vibress/blob/main/apps/portal/src/router.tsx"
click node_web "https://github.com/abdullahzaher/vibress/blob/main/apps/web/src/app/page.tsx"
click node_api "https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/main.ts"
click node_content "https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/routes/content.ts"
click node_memberships "https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/routes/admin-billing.ts"
click node_collab "https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/collaboration/room-manager.ts"
click node_studio "https://github.com/abdullahzaher/vibress/blob/main/packages/studio-core/src/index.ts"
click node_themes "https://github.com/abdullahzaher/vibress/blob/main/packages/theme-core/src/theme-engine.ts"
click node_search "https://github.com/abdullahzaher/vibress/blob/main/apps/worker/src/processors/search-indexer-worker.ts"
click node_database "https://github.com/abdullahzaher/vibress/blob/main/packages/database/src/connection.ts"
click node_queue "https://github.com/abdullahzaher/vibress/blob/main/packages/queue/src/index.ts"
click node_worker "https://github.com/abdullahzaher/vibress/blob/main/apps/worker/src/main.ts"
click node_storage "https://github.com/abdullahzaher/vibress/blob/main/packages/domains/storage/src/application/storage-service.ts"
click node_s3 "https://github.com/abdullahzaher/vibress/blob/main/packages/storage-s3/src/s3-storage-provider.ts"
click node_plugins "https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/plugins/plugin-host.ts"
click node_pluginstore "https://github.com/abdullahzaher/vibress/blob/main/packages/domains/plugins/src/application/plugin-scoped-storage.ts"
click node_i18n "https://github.com/abdullahzaher/vibress/blob/main/packages/i18n/src/translation-service.ts"

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_portal,node_web toneBlue
class node_api,node_content,node_memberships,node_collab,node_storage toneAmber
class node_studio,node_themes,node_search,node_i18n toneMint
class node_database,node_queue,node_worker,node_s3 toneRose
class node_plugins,node_pluginstore,node_staff,node_member,node_reader toneIndigo
```

## Components

### User Applications

- [Admin SPA](https://github.com/abdullahzaher/vibress/blob/main/apps/admin/src/app/App.tsx): `apps/admin/src/app/App.tsx`
- [Member Portal](https://github.com/abdullahzaher/vibress/blob/main/apps/portal/src/router.tsx): `apps/portal/src/router.tsx`
- [Public SSR Site](https://github.com/abdullahzaher/vibress/blob/main/apps/web/src/app/page.tsx): `apps/web/src/app/page.tsx`

### API and Domains

- [REST API](https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/main.ts): `apps/api/src/main.ts`
- [Content Management](https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/routes/content.ts): `apps/api/src/routes/content.ts`
- [Membership and Billing](https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/routes/admin-billing.ts): `apps/api/src/routes/admin-billing.ts`
- [Collaborative Editing](https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/collaboration/room-manager.ts): `apps/api/src/collaboration/room-manager.ts`
- [Media Storage](https://github.com/abdullahzaher/vibress/blob/main/packages/domains/storage/src/application/storage-service.ts): `packages/domains/storage/src/application/storage-service.ts`

### Publishing and Themes

- [Studio Editor](https://github.com/abdullahzaher/vibress/blob/main/packages/studio-core/src/index.ts): `packages/studio-core/src/index.ts`
- [Theme Rendering](https://github.com/abdullahzaher/vibress/blob/main/packages/theme-core/src/theme-engine.ts): `packages/theme-core/src/theme-engine.ts`
- [Search Indexing](https://github.com/abdullahzaher/vibress/blob/main/apps/worker/src/processors/search-indexer-worker.ts): `apps/worker/src/processors/search-indexer-worker.ts`
- [Localization](https://github.com/abdullahzaher/vibress/blob/main/packages/i18n/src/translation-service.ts): `packages/i18n/src/translation-service.ts`

### Persistence and Workers

- [PostgreSQL](https://github.com/abdullahzaher/vibress/blob/main/packages/database/src/connection.ts): `packages/database/src/connection.ts`
- [Redis Queue](https://github.com/abdullahzaher/vibress/blob/main/packages/queue/src/index.ts): `packages/queue/src/index.ts`
- [Background Workers](https://github.com/abdullahzaher/vibress/blob/main/apps/worker/src/main.ts): `apps/worker/src/main.ts`
- [S3 Provider](https://github.com/abdullahzaher/vibress/blob/main/packages/storage-s3/src/s3-storage-provider.ts): `packages/storage-s3/src/s3-storage-provider.ts`

### Extensions

- [Plugin Runtime](https://github.com/abdullahzaher/vibress/blob/main/apps/api/src/plugins/plugin-host.ts): `apps/api/src/plugins/plugin-host.ts`
- [Scoped Plugin Storage](https://github.com/abdullahzaher/vibress/blob/main/packages/domains/plugins/src/application/plugin-scoped-storage.ts): `packages/domains/plugins/src/application/plugin-scoped-storage.ts`

### Other components

- **Staff**
- **Members**
- **Readers**

## Connections

- Staff → Admin SPA: manages (evidence: `README.md`)
- Admin SPA → REST API: calls (evidence: `README.md`)
- Members → Member Portal: uses (evidence: `README.md`)
- Member Portal → REST API: calls (evidence: `README.md`)
- Readers → Public SSR Site: reads (evidence: `README.md`)
- Public SSR Site → REST API: fetches content (evidence: `README.md`)
- REST API → Content Management: routes content (evidence: `README.md`)
- REST API → Membership and Billing: routes billing (evidence: `README.md`)
- REST API → PostgreSQL: persists (evidence: `README.md`)
- REST API → Redis Queue: enqueues work (evidence: `README.md`)
- Content Management → PostgreSQL: reads and writes
- Membership and Billing → PostgreSQL: persists
- Admin SPA → Studio Editor: edits blocks (evidence: `README.md`)
- Collaborative Editing → Studio Editor: syncs documents (evidence: `README.md`)
- Background Workers → Redis Queue: consumes jobs (evidence: `README.md`)
- Background Workers → PostgreSQL: updates data (evidence: `README.md`)
- Background Workers → Search Indexing: runs indexing (evidence: `apps/worker/src/main.ts`)
- Search Indexing → PostgreSQL: indexes content (evidence: `apps/worker/src/processors/search-indexer-worker.ts`)
- REST API → Media Storage: handles uploads
- Media Storage → S3 Provider: uses provider (evidence: `packages/domains/storage/src/application/storage-service.ts`)
- Theme Rendering → Localization: formats locales (evidence: `packages/theme-core/src/theme-engine.ts`)
- Public SSR Site → Theme Rendering: renders themes
- REST API → Plugin Runtime: hosts extensions (evidence: `README.md`)
- Plugin Runtime → Scoped Plugin Storage: accesses scoped data
- Scoped Plugin Storage → PostgreSQL: reads and writes
