# siteserver/cms architecture

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

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

## Overview

SSCMS is a .NET website/CMS platform with a web application, core services, a CLI, and a database foundation. One visible runtime path is template preview: a web request obtains template content and uses the parse manager to produce a response. The tree and README also identify content management, STL templates, plugins, cloud/storage, WeChat, and CLI capabilities. Some of those implementations were not sampled, so their internal call relationships are omitted rather than inferred.

Main entry points: [`src/SSCMS.Web/Controllers/Preview/PreviewController.cs`](https://github.com/siteserver/cms/blob/master/src/SSCMS.Web/Controllers/Preview/PreviewController.cs) (Template Preview), [`src/Datory/Database.cs`](https://github.com/siteserver/cms/blob/master/src/Datory/Database.cs) (Database Access), [`src/SSCMS.Core/Services/ParseManager.cs`](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/ParseManager.cs) (STL Parsing), [`src/SSCMS.Cli/Application.cs`](https://github.com/siteserver/cms/blob/master/src/SSCMS.Cli/Application.cs) (CLI Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and Rendering"]
  node_preview["Template Preview"]
  node_parser["STL Parsing<br/>[ParseManager.cs]"]
  node_stl["STL Elements<br/>[StlParser]"]
end

subgraph group_content["CMS Content"]
  node_contentmodels["Content Models<br/>[Content.cs]"]
  node_site["Site Models<br/>[Site.cs]"]
  node_contentrepo["Content Repository"]
  node_channelrepo["Channel Repository"]
  node_adminrepo["Administrator Repository"]
end

subgraph group_core["Core Services"]
  node_path["Path Management<br/>[PathManager.cs]"]
  node_auth["Authorization<br/>[AuthManager.cs]"]
  node_storage["Storage Files"]
  node_cli["CLI Application<br/>[Application.cs]"]
  node_jobs["CLI Jobs<br/>[Jobs]"]
  node_cliapi["CLI API Client<br/>[CliApiService.cs]"]
end

subgraph group_integrations["Extensions and Integrations"]
  node_plugin["Plugin Runtime<br/>[Plugins]"]
  node_cloud["Cloud Services<br/>[CloudManager.cs]"]
  node_wx["WeChat Services<br/>[WxManager.cs]"]
end

subgraph group_data["Data Foundation"]
  node_dbmanager["Database Management<br/>[DatabaseManager.cs]"]
  node_datory["Database Access<br/>[Database.cs]"]
  node_entity["Entity Mapping<br/>[Entity.cs]"]
end

node_visitor(("Web User"))

node_visitor -->|"requests preview"| node_preview
node_preview -->|"loads template"| node_path
node_preview -->|"parses page"| node_parser
node_parser -->|"uses elements"| node_stl
node_preview -.->|"reads content"| node_contentrepo
node_preview -.->|"resolves channel"| node_channelrepo
node_contentrepo -.->|"persists records"| node_datory
node_channelrepo -.->|"persists records"| node_datory
node_adminrepo -.->|"persists records"| node_datory
node_contentmodels -->|"inherits mapping"| node_entity
node_site -.->|"inherits mapping"| node_entity
node_dbmanager -.->|"manages database"| node_datory
node_storage -->|"uses database"| node_datory
node_cli -->|"dispatches commands"| node_jobs
node_cli -.->|"resolves services"| node_cliapi
node_auth -.->|"checks accounts"| node_adminrepo
node_plugin -.->|"extends CMS"| node_parser
node_cloud -.->|"syncs storage"| node_storage
node_wx -.->|"sends previews"| node_visitor

click node_preview "https://github.com/siteserver/cms/blob/master/src/SSCMS.Web/Controllers/Preview/PreviewController.cs"
click node_parser "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/ParseManager.cs"
click node_stl "https://github.com/siteserver/cms/tree/master/src/SSCMS.Core/StlParser"
click node_path "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/PathManager.cs"
click node_contentmodels "https://github.com/siteserver/cms/blob/master/src/SSCMS/Models/Content.cs"
click node_site "https://github.com/siteserver/cms/blob/master/src/SSCMS/Models/Site.cs"
click node_contentrepo "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/ContentRepository.cs"
click node_channelrepo "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/ChannelRepository.cs"
click node_adminrepo "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/AdministratorRepository.cs"
click node_auth "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/AuthManager.cs"
click node_plugin "https://github.com/siteserver/cms/tree/master/src/SSCMS.Core/Plugins"
click node_cloud "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/CloudManager.cs"
click node_wx "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/WxManager.cs"
click node_storage "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/StorageFileRepository.cs"
click node_dbmanager "https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/DatabaseManager.cs"
click node_datory "https://github.com/siteserver/cms/blob/master/src/Datory/Database.cs"
click node_entity "https://github.com/siteserver/cms/blob/master/src/Datory/Entity.cs"
click node_cli "https://github.com/siteserver/cms/blob/master/src/SSCMS.Cli/Application.cs"
click node_jobs "https://github.com/siteserver/cms/tree/master/src/SSCMS.Cli/Jobs"
click node_cliapi "https://github.com/siteserver/cms/blob/master/src/SSCMS.Cli/Services/CliApiService.cs"

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_preview,node_parser,node_stl,node_visitor toneBlue
class node_contentmodels,node_site,node_contentrepo,node_channelrepo,node_adminrepo toneAmber
class node_path,node_auth,node_storage,node_cli,node_jobs,node_cliapi toneMint
class node_plugin,node_cloud,node_wx toneRose
class node_dbmanager,node_datory,node_entity toneIndigo
```

## Components

### Web and Rendering

- [Template Preview](https://github.com/siteserver/cms/blob/master/src/SSCMS.Web/Controllers/Preview/PreviewController.cs): `src/SSCMS.Web/Controllers/Preview/PreviewController.cs`
- [STL Parsing](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/ParseManager.cs): `src/SSCMS.Core/Services/ParseManager.cs`
- [STL Elements](https://github.com/siteserver/cms/tree/master/src/SSCMS.Core/StlParser): `src/SSCMS.Core/StlParser`

### CMS Content

- [Content Models](https://github.com/siteserver/cms/blob/master/src/SSCMS/Models/Content.cs): `src/SSCMS/Models/Content.cs`
- [Site Models](https://github.com/siteserver/cms/blob/master/src/SSCMS/Models/Site.cs): `src/SSCMS/Models/Site.cs`
- [Content Repository](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/ContentRepository.cs): `src/SSCMS.Core/Repositories/ContentRepository.cs`
- [Channel Repository](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/ChannelRepository.cs): `src/SSCMS.Core/Repositories/ChannelRepository.cs`
- [Administrator Repository](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/AdministratorRepository.cs): `src/SSCMS.Core/Repositories/AdministratorRepository.cs`

### Core Services

- [Path Management](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/PathManager.cs): `src/SSCMS.Core/Services/PathManager.cs`
- [Authorization](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/AuthManager.cs): `src/SSCMS.Core/Services/AuthManager.cs`
- [Storage Files](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Repositories/StorageFileRepository.cs): `src/SSCMS.Core/Repositories/StorageFileRepository.cs`
- [CLI Application](https://github.com/siteserver/cms/blob/master/src/SSCMS.Cli/Application.cs): `src/SSCMS.Cli/Application.cs`
- [CLI Jobs](https://github.com/siteserver/cms/tree/master/src/SSCMS.Cli/Jobs): `src/SSCMS.Cli/Jobs`
- [CLI API Client](https://github.com/siteserver/cms/blob/master/src/SSCMS.Cli/Services/CliApiService.cs): `src/SSCMS.Cli/Services/CliApiService.cs`

### Extensions and Integrations

- [Plugin Runtime](https://github.com/siteserver/cms/tree/master/src/SSCMS.Core/Plugins): `src/SSCMS.Core/Plugins`
- [Cloud Services](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/CloudManager.cs): `src/SSCMS.Core/Services/CloudManager.cs`
- [WeChat Services](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/WxManager.cs): `src/SSCMS.Core/Services/WxManager.cs`

### Data Foundation

- [Database Management](https://github.com/siteserver/cms/blob/master/src/SSCMS.Core/Services/DatabaseManager.cs): `src/SSCMS.Core/Services/DatabaseManager.cs`
- [Database Access](https://github.com/siteserver/cms/blob/master/src/Datory/Database.cs): `src/Datory/Database.cs`
- [Entity Mapping](https://github.com/siteserver/cms/blob/master/src/Datory/Entity.cs): `src/Datory/Entity.cs`

### Other components

- **Web User**

## Connections

- Web User → Template Preview: requests preview (evidence: `src/SSCMS.Web/Controllers/Preview/PreviewController.cs`)
- Template Preview → Path Management: loads template (evidence: `src/SSCMS.Web/Controllers/Preview/PreviewController.cs`)
- Template Preview → STL Parsing: parses page (evidence: `src/SSCMS.Web/Controllers/Preview/PreviewController.cs`)
- STL Parsing → STL Elements: uses elements
- Template Preview → Content Repository: reads content
- Template Preview → Channel Repository: resolves channel
- Content Repository → Database Access: persists records
- Channel Repository → Database Access: persists records
- Administrator Repository → Database Access: persists records
- Content Models → Entity Mapping: inherits mapping (evidence: `src/SSCMS/Models/Content.cs`)
- Site Models → Entity Mapping: inherits mapping (evidence: `src/SSCMS/Models/Site.cs`)
- Database Management → Database Access: manages database
- Storage Files → Database Access: uses database (evidence: `src/SSCMS.Core/Repositories/StorageFileRepository.cs`)
- CLI Application → CLI Jobs: dispatches commands (evidence: `src/SSCMS.Cli/Application.cs`)
- CLI Application → CLI API Client: resolves services
- Authorization → Administrator Repository: checks accounts
- Plugin Runtime → STL Parsing: extends CMS
- Cloud Services → Storage Files: syncs storage
- WeChat Services → Web User: sends previews
