# callismartltd/smart-license-server architecture

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

- Interactive diagram: https://gitdiagram.com/callismartltd/smart-license-server
- Repository: https://github.com/callismartltd/smart-license-server

## Overview

Smart License Server privately hosts software and manages its distribution, licenses, and monetization across standalone, WordPress, and CLI environments. The principal workflow is an administrator or API client submitting hosted-app or license operations, which reach domain controllers and result in managed app files and license records; customers then use the client portal and download/update services. The graph also preserves the documented security, analytics, email, caching, and asynchronous-work capabilities. README and the tree establish these product areas; sampled excerpts support only selected controller, middleware, and queue relationships.

Main entry points: [`src/Admin`](https://github.com/callismartltd/smart-license-server/tree/main/src/Admin) (Admin interface), [`src/RESTAPI`](https://github.com/callismartltd/smart-license-server/tree/main/src/RESTAPI) (Versioned REST API), [`src/HostedApps/HostingController.php`](https://github.com/callismartltd/smart-license-server/blob/main/src/HostedApps/HostingController.php) (Hosted app control), [`src/Background/Jobs`](https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Jobs) (Async job handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_web_env["Web environments"]
  node_wp_env["WordPress environment"]
  node_console["CLI environment"]
  node_middleware["HTTP middleware"]
  node_rest["Versioned REST API"]
  node_admin_ui["Admin interface"]
end

subgraph group_domain["Hosting and licensing"]
  node_hosting["Hosted app control"]
  node_app_service["Hosted app service"]
  node_repositories["App repositories"]
  node_downloads["File delivery"]
  node_licenses["Licenses and pricing"]
  node_monetization["Payment integrations"]
end

subgraph group_identity["Accounts and clients"]
  node_client_portal["Client dashboard"]
  node_security["Identity and access"]
end

subgraph group_operations["Operations and integrations"]
  node_analytics["Usage analytics"]
  node_email["Email delivery"]
  node_cache["Cache adapters"]
  node_settings["Settings"]
end

subgraph group_async["Background work"]
  node_job_queue["Job queue"]
  node_worker_scheduler["Workers and scheduler"]
  node_job_handlers["Async job handlers"]
  node_job_store[("Database job storage")]
end

node_admin(("Administrator"))
node_customer(("Customer"))
node_api_client(("API client"))

node_admin -->|"uses admin UI"| node_web_env
node_customer -->|"uses portal"| node_web_env
node_api_client -->|"calls API"| node_rest
node_web_env -->|"runs requests through"| node_middleware
node_wp_env -->|"provides admin"| node_admin_ui
node_wp_env -->|"provides REST"| node_rest
node_console -->|"manages jobs"| node_job_queue
node_middleware -->|"enforces access"| node_security
node_rest -->|"handles app operations"| node_hosting
node_rest -->|"handles license operations"| node_licenses
node_admin_ui -->|"manages hosted apps"| node_hosting
node_admin_ui -->|"manages licenses"| node_licenses
node_hosting -->|"looks up apps"| node_app_service
node_hosting -->|"manages app files"| node_repositories
node_downloads -->|"serves hosted files"| node_repositories
node_licenses -.->|"uses provider integrations"| node_monetization
node_customer -->|"uses account portal"| node_client_portal
node_client_portal -->|"uses identity and access"| node_security
node_admin_ui -->|"views usage"| node_analytics
node_admin_ui -->|"configures services"| node_settings
node_settings -->|"configures adapters"| node_cache
node_worker_scheduler -->|"dispatches and claims"| node_job_queue
node_job_queue -->|"persists jobs"| node_job_store
node_worker_scheduler -->|"runs jobs"| node_job_handlers
node_job_handlers -->|"sends notifications"| node_email
node_job_handlers -->|"records and prunes usage"| node_analytics

click node_web_env "https://github.com/callismartltd/smart-license-server/tree/main/src/Environments/Application"
click node_wp_env "https://github.com/callismartltd/smart-license-server/tree/main/src/Environments/WordPress"
click node_console "https://github.com/callismartltd/smart-license-server/tree/main/src/Environments/Application/CLI"
click node_middleware "https://github.com/callismartltd/smart-license-server/blob/main/src/Environments/Application/Web/MiddlewarePipeline.php"
click node_rest "https://github.com/callismartltd/smart-license-server/tree/main/src/RESTAPI"
click node_admin_ui "https://github.com/callismartltd/smart-license-server/tree/main/src/Admin"
click node_hosting "https://github.com/callismartltd/smart-license-server/blob/main/src/HostedApps/HostingController.php"
click node_app_service "https://github.com/callismartltd/smart-license-server/blob/main/src/HostedApps/HostedApplicationService.php"
click node_repositories "https://github.com/callismartltd/smart-license-server/tree/main/src/FileSystem"
click node_downloads "https://github.com/callismartltd/smart-license-server/tree/main/src/FileSystem/DownloadsApi"
click node_licenses "https://github.com/callismartltd/smart-license-server/tree/main/src/Monetization"
click node_monetization "https://github.com/callismartltd/smart-license-server/tree/main/src/Monetization/Providers"
click node_client_portal "https://github.com/callismartltd/smart-license-server/tree/main/src/ClientDashboard"
click node_security "https://github.com/callismartltd/smart-license-server/tree/main/src/Security"
click node_analytics "https://github.com/callismartltd/smart-license-server/tree/main/src/Analytics"
click node_email "https://github.com/callismartltd/smart-license-server/tree/main/src/Email"
click node_cache "https://github.com/callismartltd/smart-license-server/tree/main/src/Cache"
click node_settings "https://github.com/callismartltd/smart-license-server/tree/main/src/SettingsAPI"
click node_job_queue "https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Queue"
click node_worker_scheduler "https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Workers"
click node_job_handlers "https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Jobs"
click node_job_store "https://github.com/callismartltd/smart-license-server/blob/main/src/Background/Queue/Adapters/DatabaseJobStorageAdapter.php"

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_web_env,node_wp_env,node_console,node_middleware,node_rest,node_admin_ui,node_api_client toneBlue
class node_hosting,node_app_service,node_repositories,node_downloads,node_licenses,node_monetization toneAmber
class node_client_portal,node_security toneMint
class node_analytics,node_email,node_cache,node_settings toneRose
class node_job_queue,node_worker_scheduler,node_job_handlers,node_job_store,node_admin,node_customer toneIndigo
```

## Components

### Application entry

- [Web environments](https://github.com/callismartltd/smart-license-server/tree/main/src/Environments/Application): `src/Environments/Application`
- [WordPress environment](https://github.com/callismartltd/smart-license-server/tree/main/src/Environments/WordPress): `src/Environments/WordPress`
- [CLI environment](https://github.com/callismartltd/smart-license-server/tree/main/src/Environments/Application/CLI): `src/Environments/Application/CLI`
- [HTTP middleware](https://github.com/callismartltd/smart-license-server/blob/main/src/Environments/Application/Web/MiddlewarePipeline.php): `src/Environments/Application/Web/MiddlewarePipeline.php`
- [Versioned REST API](https://github.com/callismartltd/smart-license-server/tree/main/src/RESTAPI): `src/RESTAPI`
- [Admin interface](https://github.com/callismartltd/smart-license-server/tree/main/src/Admin): `src/Admin`

### Hosting and licensing

- [Hosted app control](https://github.com/callismartltd/smart-license-server/blob/main/src/HostedApps/HostingController.php): `src/HostedApps/HostingController.php`
- [Hosted app service](https://github.com/callismartltd/smart-license-server/blob/main/src/HostedApps/HostedApplicationService.php): `src/HostedApps/HostedApplicationService.php`
- [App repositories](https://github.com/callismartltd/smart-license-server/tree/main/src/FileSystem): `src/FileSystem`
- [File delivery](https://github.com/callismartltd/smart-license-server/tree/main/src/FileSystem/DownloadsApi): `src/FileSystem/DownloadsApi`
- [Licenses and pricing](https://github.com/callismartltd/smart-license-server/tree/main/src/Monetization): `src/Monetization`
- [Payment integrations](https://github.com/callismartltd/smart-license-server/tree/main/src/Monetization/Providers): `src/Monetization/Providers`

### Accounts and clients

- [Client dashboard](https://github.com/callismartltd/smart-license-server/tree/main/src/ClientDashboard): `src/ClientDashboard`
- [Identity and access](https://github.com/callismartltd/smart-license-server/tree/main/src/Security): `src/Security`

### Operations and integrations

- [Usage analytics](https://github.com/callismartltd/smart-license-server/tree/main/src/Analytics): `src/Analytics`
- [Email delivery](https://github.com/callismartltd/smart-license-server/tree/main/src/Email): `src/Email`
- [Cache adapters](https://github.com/callismartltd/smart-license-server/tree/main/src/Cache): `src/Cache`
- [Settings](https://github.com/callismartltd/smart-license-server/tree/main/src/SettingsAPI): `src/SettingsAPI`

### Background work

- [Job queue](https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Queue): `src/Background/Queue`
- [Workers and scheduler](https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Workers): `src/Background/Workers`
- [Async job handlers](https://github.com/callismartltd/smart-license-server/tree/main/src/Background/Jobs): `src/Background/Jobs`
- [Database job storage](https://github.com/callismartltd/smart-license-server/blob/main/src/Background/Queue/Adapters/DatabaseJobStorageAdapter.php): `src/Background/Queue/Adapters/DatabaseJobStorageAdapter.php`

### Other components

- **Administrator**
- **Customer**
- **API client**

## Connections

- Administrator → Web environments: uses admin UI
- Customer → Web environments: uses portal
- API client → Versioned REST API: calls API
- Web environments → HTTP middleware: runs requests through
- WordPress environment → Admin interface: provides admin
- WordPress environment → Versioned REST API: provides REST
- CLI environment → Job queue: manages jobs
- HTTP middleware → Identity and access: enforces access
- Versioned REST API → Hosted app control: handles app operations
- Versioned REST API → Licenses and pricing: handles license operations
- Admin interface → Hosted app control: manages hosted apps
- Admin interface → Licenses and pricing: manages licenses
- Hosted app control → Hosted app service: looks up apps
- Hosted app control → App repositories: manages app files
- File delivery → App repositories: serves hosted files
- Licenses and pricing → Payment integrations: uses provider integrations
- Customer → Client dashboard: uses account portal
- Client dashboard → Identity and access: uses identity and access
- Admin interface → Usage analytics: views usage
- Admin interface → Settings: configures services
- Settings → Cache adapters: configures adapters
- Workers and scheduler → Job queue: dispatches and claims
- Job queue → Database job storage: persists jobs
- Workers and scheduler → Async job handlers: runs jobs
- Async job handlers → Email delivery: sends notifications
- Async job handlers → Usage analytics: records and prunes usage
