# gehennawu/dsh-service architecture

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

- Interactive diagram: https://gitdiagram.com/gehennawu/dsh-service
- Repository: https://github.com/gehennawu/dsh-service

## Overview

dsh-service is a DSH Web operations plugin. Users open its service-control panel to inspect status or invoke maintenance and configuration capabilities; the plugin’s host-side entry point registers the service behavior and feature routes, while the browser client presents the corresponding views. The README also documents distinct backup/restore, quota, health, usage, session, skill, and subagent capabilities. Route modules and their helper relationships are supported by excerpts and the source index; client-to-route wiring and several unsampled feature internals are not shown, so those links are omitted or marked unverified.

Main entry points: [`index.js`](https://github.com/gehennawu/dsh-service/blob/main/index.js) (Plugin Entry), [`quota-routes.js`](https://github.com/gehennawu/dsh-service/blob/main/quota-routes.js) (Quota RPC), [`backup-routes.js`](https://github.com/gehennawu/dsh-service/blob/main/backup-routes.js) (Backup RPC), [`quota-adapters.js`](https://github.com/gehennawu/dsh-service/blob/main/quota-adapters.js) (Quota Adapters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Plugin Runtime"]
  node_runtime["Plugin Entry<br/>[index.js]"]
end

subgraph group_ops["Operations"]
  node_health["Health Diagnostics<br/>[plugin-health.js]"]
end

subgraph group_usage["Usage And Quota"]
  node_usageui["Usage Statistics<br/>[quota-core.js]"]
  node_quota["Quota RPC<br/>[quota-routes.js]"]
  node_adapters["Quota Adapters<br/>[quota-adapters.js]"]
end

subgraph group_maintenance["Maintenance"]
  node_backup["Backup RPC<br/>[backup-routes.js]"]
  node_integrity["Backup Integrity"]
  node_sessions["Session Management<br/>[session-routes.js]"]
  node_skills["Skill Management<br/>[skill-routes.js]"]
  node_subagent["Subagent Models<br/>[subagent-routes.js]"]
end

subgraph group_client["Web Client"]
  node_panel["Service Panel<br/>[client.js]"]
  node_apply["Client Apply<br/>[apply.js]"]
  node_settings["Feature Settings"]
  node_restart["Version And Restart<br/>[version-restart.js]"]
  node_mobile["Mobile Adaptation<br/>[mobile.js]"]
  node_modelicons["Model Icons<br/>[model-icons.js]"]
  node_notifications["Task Notifications"]
end

node_operator(("DSH User"))
node_providers(("Quota Providers"))
node_host(("DSH Web Host"))
node_github(("GitHub Releases"))

node_operator -->|"opens"| node_panel
node_panel -.->|"presents controls"| node_apply
node_operator -->|"configures features"| node_settings
node_operator -->|"checks or restarts"| node_restart
node_operator -->|"runs diagnostics"| node_health
node_operator -->|"views statistics"| node_usageui
node_operator -->|"queries quota"| node_quota
node_quota -->|"prepares adapters"| node_adapters
node_adapters -.->|"fetches usage"| node_providers
node_operator -->|"manages backups"| node_backup
node_backup -->|"validates archives"| node_integrity
node_operator -->|"manages sessions"| node_sessions
node_operator -->|"manages skills"| node_skills
node_operator -->|"sets model route"| node_subagent
node_runtime -->|"registers routes"| node_backup
node_runtime -->|"integrates health"| node_health
node_runtime -->|"registers routes"| node_quota
node_runtime -->|"registers routes"| node_sessions
node_runtime -->|"registers routes"| node_skills
node_runtime -->|"registers routes"| node_subagent
node_runtime -->|"loads as plugin"| node_host
node_restart -->|"checks releases"| node_github
node_operator -->|"uses mobile view"| node_mobile
node_operator -->|"views model icons"| node_modelicons
node_operator -->|"receives task notices"| node_notifications

click node_panel "https://github.com/gehennawu/dsh-service/blob/main/src/client.js"
click node_apply "https://github.com/gehennawu/dsh-service/blob/main/src/client/apply.js"
click node_settings "https://github.com/gehennawu/dsh-service/blob/main/src/client/feature-settings.js"
click node_restart "https://github.com/gehennawu/dsh-service/blob/main/src/client/version-restart.js"
click node_mobile "https://github.com/gehennawu/dsh-service/blob/main/src/client/mobile.js"
click node_modelicons "https://github.com/gehennawu/dsh-service/blob/main/src/client/model-icons.js"
click node_notifications "https://github.com/gehennawu/dsh-service/blob/main/src/client/notification-service.js"
click node_health "https://github.com/gehennawu/dsh-service/blob/main/plugin-health.js"
click node_usageui "https://github.com/gehennawu/dsh-service/blob/main/src/client/quota-core.js"
click node_quota "https://github.com/gehennawu/dsh-service/blob/main/quota-routes.js"
click node_adapters "https://github.com/gehennawu/dsh-service/blob/main/quota-adapters.js"
click node_backup "https://github.com/gehennawu/dsh-service/blob/main/backup-routes.js"
click node_integrity "https://github.com/gehennawu/dsh-service/blob/main/backup-integrity.js"
click node_sessions "https://github.com/gehennawu/dsh-service/blob/main/session-routes.js"
click node_skills "https://github.com/gehennawu/dsh-service/blob/main/skill-routes.js"
click node_subagent "https://github.com/gehennawu/dsh-service/blob/main/subagent-routes.js"
click node_runtime "https://github.com/gehennawu/dsh-service/blob/main/index.js"

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_runtime,node_operator toneBlue
class node_health toneAmber
class node_usageui,node_quota,node_adapters toneMint
class node_backup,node_integrity,node_sessions,node_skills,node_subagent toneRose
class node_panel,node_apply,node_settings,node_restart,node_mobile,node_modelicons,node_notifications,node_providers,node_host,node_github toneIndigo
```

## Components

### Plugin Runtime

- [Plugin Entry](https://github.com/gehennawu/dsh-service/blob/main/index.js): `index.js`

### Operations

- [Health Diagnostics](https://github.com/gehennawu/dsh-service/blob/main/plugin-health.js): `plugin-health.js`

### Usage And Quota

- [Usage Statistics](https://github.com/gehennawu/dsh-service/blob/main/src/client/quota-core.js): `src/client/quota-core.js`
- [Quota RPC](https://github.com/gehennawu/dsh-service/blob/main/quota-routes.js): `quota-routes.js`
- [Quota Adapters](https://github.com/gehennawu/dsh-service/blob/main/quota-adapters.js): `quota-adapters.js`

### Maintenance

- [Backup RPC](https://github.com/gehennawu/dsh-service/blob/main/backup-routes.js): `backup-routes.js`
- [Backup Integrity](https://github.com/gehennawu/dsh-service/blob/main/backup-integrity.js): `backup-integrity.js`
- [Session Management](https://github.com/gehennawu/dsh-service/blob/main/session-routes.js): `session-routes.js`
- [Skill Management](https://github.com/gehennawu/dsh-service/blob/main/skill-routes.js): `skill-routes.js`
- [Subagent Models](https://github.com/gehennawu/dsh-service/blob/main/subagent-routes.js): `subagent-routes.js`

### Web Client

- [Service Panel](https://github.com/gehennawu/dsh-service/blob/main/src/client.js): `src/client.js`
- [Client Apply](https://github.com/gehennawu/dsh-service/blob/main/src/client/apply.js): `src/client/apply.js`
- [Feature Settings](https://github.com/gehennawu/dsh-service/blob/main/src/client/feature-settings.js): `src/client/feature-settings.js`
- [Version And Restart](https://github.com/gehennawu/dsh-service/blob/main/src/client/version-restart.js): `src/client/version-restart.js`
- [Mobile Adaptation](https://github.com/gehennawu/dsh-service/blob/main/src/client/mobile.js): `src/client/mobile.js`
- [Model Icons](https://github.com/gehennawu/dsh-service/blob/main/src/client/model-icons.js): `src/client/model-icons.js`
- [Task Notifications](https://github.com/gehennawu/dsh-service/blob/main/src/client/notification-service.js): `src/client/notification-service.js`

### Other components

- **DSH User**
- **Quota Providers**
- **DSH Web Host**
- **GitHub Releases**

## Connections

- DSH User → Service Panel: opens (evidence: `README.md`)
- Service Panel → Client Apply: presents controls
- DSH User → Feature Settings: configures features (evidence: `README.md`)
- DSH User → Version And Restart: checks or restarts (evidence: `README.md`)
- DSH User → Health Diagnostics: runs diagnostics (evidence: `README.md`)
- DSH User → Usage Statistics: views statistics (evidence: `README.md`)
- DSH User → Quota RPC: queries quota (evidence: `README.md`)
- Quota RPC → Quota Adapters: prepares adapters (evidence: `quota-routes.js`)
- Quota Adapters → Quota Providers: fetches usage
- DSH User → Backup RPC: manages backups (evidence: `README.md`)
- Backup RPC → Backup Integrity: validates archives (evidence: `backup-routes.js`)
- DSH User → Session Management: manages sessions (evidence: `README.md`)
- DSH User → Skill Management: manages skills (evidence: `README.md`)
- DSH User → Subagent Models: sets model route (evidence: `README.md`)
- Plugin Entry → Backup RPC: registers routes (evidence: `index.js`)
- Plugin Entry → Health Diagnostics: integrates health (evidence: `index.js`)
- Plugin Entry → Quota RPC: registers routes (evidence: `index.js`)
- Plugin Entry → Session Management: registers routes (evidence: `index.js`)
- Plugin Entry → Skill Management: registers routes (evidence: `index.js`)
- Plugin Entry → Subagent Models: registers routes (evidence: `index.js`)
- Plugin Entry → DSH Web Host: loads as plugin (evidence: `README.md`)
- Version And Restart → GitHub Releases: checks releases (evidence: `README.md`)
- DSH User → Mobile Adaptation: uses mobile view (evidence: `README.md`)
- DSH User → Model Icons: views model icons (evidence: `README.md`)
- DSH User → Task Notifications: receives task notices (evidence: `README.md`)
