# adarshaldkar/cms-content_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/adarshaldkar/cms-content_management_system
- Repository: https://github.com/adarshaldkar/cms-content_management_system

## Overview

The Gazette is an editorial publishing platform: readers browse published stories, while authors create and save manuscripts, submit them for review, and editors publish or schedule approved work. The client calls a NestJS API whose domain services manage editorial, identity, media, and community features; persistence is routed through a multi-database mesh. The README also describes document ingestion, asynchronous jobs, analytics, and real-time notifications. Several of these subsystems are represented by their exact source directories because their implementation was not sampled; those links are documented or marked unverified.

Main entry points: [`client/src/api/client.ts`](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/api/client.ts) (HTTP client), [`client/src/App.tsx`](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/App.tsx) (Web application), [`server/src/modules/articles/articles.controller.ts`](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/articles/articles.controller.ts) (Article endpoints), [`server/src/modules/articles/workflow.service.ts`](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/articles/workflow.service.ts) (Article workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["Web application<br/>[App.tsx]"]
  node_api_client["HTTP client<br/>[client.ts]"]
  node_stories["Story management"]
  node_editor_ui["Article editor"]
  node_reader_ui["Article reading"]
  node_schedule_ui["Publishing calendar"]
  node_auth_ui["Authentication state<br/>[authStore.ts]"]
end

subgraph group_editorial["Editorial workflow"]
  node_article_service["Article workflow"]
  node_publishing["Scheduled publishing"]
  node_documents["Document ingestion"]
  node_media["Media management<br/>[media.service.ts]"]
  node_embeds["Embed handling"]
end

subgraph group_community["Community and communications"]
  node_community_api["Social interactions"]
  node_messages["Messaging"]
  node_newsletter["Newsletter"]
  node_notifications["Notifications"]
end

subgraph group_platform["API and platform services"]
  node_auth_api["Authentication<br/>[auth.service.ts]"]
  node_articles_api["Article endpoints"]
  node_jobs["Background jobs"]
  node_security["Request security<br/>[jwt-auth.guard.ts]"]
end

subgraph group_data["Persistence and operations"]
  node_article_store[("Article persistence")]
  node_analytics[("Analytics storage")]
  node_mesh["Database mesh"]
end

node_browser(("Reader / author"))

node_browser -->|"uses"| node_app
node_app -->|"routes to"| node_stories
node_app -->|"routes to"| node_reader_ui
node_stories -->|"requests stories"| node_api_client
node_editor_ui -.->|"saves drafts"| node_api_client
node_reader_ui -.->|"loads articles"| node_api_client
node_schedule_ui -->|"manages slots"| node_api_client
node_api_client -->|"calls API"| node_articles_api
node_api_client -->|"refreshes session"| node_auth_api
node_articles_api -->|"dispatches workflow"| node_article_service
node_article_service -.->|"uses repository"| node_article_store
node_publishing -.->|"transitions stories"| node_article_service
node_documents -->|"uploads images"| node_media
node_browser -.->|"signs in"| node_auth_ui
node_auth_api -.->|"issues credentials"| node_security
node_messages -.->|"fans out updates"| node_notifications
node_newsletter -.->|"queues broadcasts"| node_jobs
node_publishing -.->|"schedules work"| node_jobs
node_articles_api -->|"guards requests"| node_security
node_article_store -.->|"routes persistence"| node_mesh
node_mesh -.->|"supports analytics"| node_analytics
node_embeds -.->|"handles rich media"| node_media
node_community_api -.->|"persists interactions"| node_mesh

click node_app "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/App.tsx"
click node_api_client "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/api/client.ts"
click node_stories "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/user/StoriesManagerPage.tsx"
click node_editor_ui "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/ArticleEditorPage.tsx"
click node_reader_ui "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/ArticleReaderPage.tsx"
click node_schedule_ui "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/admin/PublishingSlotsManagerPage.tsx"
click node_auth_ui "https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/stores/authStore.ts"
click node_auth_api "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/auth/auth.service.ts"
click node_articles_api "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/articles/articles.controller.ts"
click node_article_service "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/articles/workflow.service.ts"
click node_article_store "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/repositories/interfaces/article.repository.interface.ts"
click node_publishing "https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/publishing-slots"
click node_documents "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/documents/pdf-ingestion.service.ts"
click node_media "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/media/media.service.ts"
click node_embeds "https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/embeds"
click node_community_api "https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/comments"
click node_messages "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/messages/messages.controller.ts"
click node_newsletter "https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/newsletter"
click node_notifications "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/notifications/notifications.controller.ts"
click node_jobs "https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/jobs"
click node_analytics "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/database/clickhouse.service.ts"
click node_mesh "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/database/multi-database-mesh.service.ts"
click node_security "https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/common/guards/jwt-auth.guard.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_app,node_api_client,node_stories,node_editor_ui,node_reader_ui,node_schedule_ui,node_auth_ui toneBlue
class node_article_service,node_publishing,node_documents,node_media,node_embeds toneAmber
class node_community_api,node_messages,node_newsletter,node_notifications toneMint
class node_auth_api,node_articles_api,node_jobs,node_security toneRose
class node_article_store,node_analytics,node_mesh,node_browser toneIndigo
```

## Components

### Client experience

- [Web application](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [HTTP client](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/api/client.ts): `client/src/api/client.ts`
- [Story management](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/user/StoriesManagerPage.tsx): `client/src/pages/user/StoriesManagerPage.tsx`
- [Article editor](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/ArticleEditorPage.tsx): `client/src/pages/ArticleEditorPage.tsx`
- [Article reading](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/ArticleReaderPage.tsx): `client/src/pages/ArticleReaderPage.tsx`
- [Publishing calendar](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/pages/admin/PublishingSlotsManagerPage.tsx): `client/src/pages/admin/PublishingSlotsManagerPage.tsx`
- [Authentication state](https://github.com/adarshaldkar/cms-content_management_system/blob/main/client/src/stores/authStore.ts): `client/src/stores/authStore.ts`

### Editorial workflow

- [Article workflow](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/articles/workflow.service.ts): `server/src/modules/articles/workflow.service.ts`
- [Scheduled publishing](https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/publishing-slots): `server/src/modules/publishing-slots`
- [Document ingestion](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/documents/pdf-ingestion.service.ts): `server/src/modules/documents/pdf-ingestion.service.ts`
- [Media management](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/media/media.service.ts): `server/src/modules/media/media.service.ts`
- [Embed handling](https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/embeds): `server/src/modules/embeds`

### Community and communications

- [Social interactions](https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/comments): `server/src/modules/comments`
- [Messaging](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/messages/messages.controller.ts): `server/src/modules/messages/messages.controller.ts`
- [Newsletter](https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/newsletter): `server/src/modules/newsletter`
- [Notifications](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/notifications/notifications.controller.ts): `server/src/modules/notifications/notifications.controller.ts`

### API and platform services

- [Authentication](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/auth/auth.service.ts): `server/src/modules/auth/auth.service.ts`
- [Article endpoints](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/modules/articles/articles.controller.ts): `server/src/modules/articles/articles.controller.ts`
- [Background jobs](https://github.com/adarshaldkar/cms-content_management_system/tree/main/server/src/modules/jobs): `server/src/modules/jobs`
- [Request security](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/common/guards/jwt-auth.guard.ts): `server/src/common/guards/jwt-auth.guard.ts`

### Persistence and operations

- [Article persistence](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/repositories/interfaces/article.repository.interface.ts): `server/src/repositories/interfaces/article.repository.interface.ts`
- [Analytics storage](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/database/clickhouse.service.ts): `server/src/database/clickhouse.service.ts`
- [Database mesh](https://github.com/adarshaldkar/cms-content_management_system/blob/main/server/src/database/multi-database-mesh.service.ts): `server/src/database/multi-database-mesh.service.ts`

### Other components

- **Reader / author**

## Connections

- Reader / author → Web application: uses
- Web application → Story management: routes to (evidence: `client/src/App.tsx`)
- Web application → Article reading: routes to (evidence: `client/src/App.tsx`)
- Story management → HTTP client: requests stories (evidence: `client/src/pages/user/StoriesManagerPage.tsx`)
- Article editor → HTTP client: saves drafts
- Article reading → HTTP client: loads articles
- Publishing calendar → HTTP client: manages slots (evidence: `client/src/pages/admin/PublishingSlotsManagerPage.tsx`)
- HTTP client → Article endpoints: calls API
- HTTP client → Authentication: refreshes session (evidence: `client/src/api/client.ts`)
- Article endpoints → Article workflow: dispatches workflow (evidence: `server/src/modules/articles/articles.controller.ts`)
- Article workflow → Article persistence: uses repository
- Scheduled publishing → Article workflow: transitions stories
- Document ingestion → Media management: uploads images (evidence: `server/src/modules/documents/pdf-ingestion.service.ts`)
- Reader / author → Authentication state: signs in
- Authentication → Request security: issues credentials
- Messaging → Notifications: fans out updates
- Newsletter → Background jobs: queues broadcasts
- Scheduled publishing → Background jobs: schedules work
- Article endpoints → Request security: guards requests (evidence: `server/src/modules/articles/articles.controller.ts`)
- Article persistence → Database mesh: routes persistence
- Database mesh → Analytics storage: supports analytics
- Embed handling → Media management: handles rich media
- Social interactions → Database mesh: persists interactions
