# dchaganti997/chartwells-digital-signage architecture

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

- Interactive diagram: https://gitdiagram.com/dchaganti997/chartwells-digital-signage
- Repository: https://github.com/dchaganti997/chartwells-digital-signage

## Overview

Chartwells Signage is a web-based digital signage system. An operator uses the admin dashboard to manage screens and publish text, images, or video; the server updates screen state and notifies connected players, which render the content and report their status. Screen metadata persists in a JSON file, while uploaded media and browser-side caches support playback, including offline operation. The graph reflects the sampled server, admin, player, and service-worker code; other UI files and runtime details were not inspected.

Main entry points: [`server.js`](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/server.js) (Signage server), [`public/player/player.js`](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/player/player.js) (Signage player), [`public/admin/admin.js`](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/admin/admin.js) (Admin dashboard), [`public/sw.js`](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/sw.js) (Service worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Screen management"]
  node_admin_console["Admin dashboard<br/>[admin.js]"]
end

subgraph group_server["Server and state"]
  node_signage_server["Signage server<br/>[server.js]"]
  node_screen_state["Screen state<br/>[server.js]"]
  node_screen_store[("Screen JSON<br/>[screens.json]")]
  node_media_files[("Uploaded media")]
end

subgraph group_playback["Player and offline playback"]
  node_player["Signage player<br/>[player.js]"]
  node_local_content[("Content cache<br/>[player.js]")]
  node_service_worker["Service worker<br/>[sw.js]"]
  node_browser_cache[("Browser asset cache<br/>[sw.js]")]
end

node_operator(("Operator"))

node_operator -->|"manages screens"| node_admin_console
node_admin_console -->|"publishes content"| node_signage_server
node_admin_console -->|"requests screen data"| node_signage_server
node_signage_server -->|"updates state"| node_screen_state
node_screen_state -->|"loads and saves"| node_screen_store
node_signage_server -->|"stores uploads"| node_media_files
node_signage_server -->|"sends config and updates"| node_player
node_signage_server -->|"pushes screen updates"| node_admin_console
node_player -->|"registers and reports status"| node_signage_server
node_player -->|"caches and restores content"| node_local_content
node_player -->|"registers"| node_service_worker
node_service_worker -->|"caches player assets"| node_browser_cache
node_service_worker -->|"caches media requests"| node_media_files

click node_admin_console "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/admin/admin.js"
click node_signage_server "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/server.js"
click node_screen_state "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/server.js"
click node_screen_store "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/data/screens.json"
click node_media_files "https://github.com/dchaganti997/chartwells-digital-signage/tree/main/public/uploads"
click node_player "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/player/player.js"
click node_local_content "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/player/player.js"
click node_service_worker "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/sw.js"
click node_browser_cache "https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/sw.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_admin_console toneBlue
class node_signage_server,node_screen_state,node_screen_store,node_media_files toneAmber
class node_player,node_local_content,node_service_worker,node_browser_cache toneMint
class node_operator toneIndigo
```

## Components

### Screen management

- [Admin dashboard](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/admin/admin.js): `public/admin/admin.js`

### Server and state

- [Signage server](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/server.js): `server.js`
- [Screen state](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/server.js): `server.js`
- [Screen JSON](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/data/screens.json): `data/screens.json`
- [Uploaded media](https://github.com/dchaganti997/chartwells-digital-signage/tree/main/public/uploads): `public/uploads`

### Player and offline playback

- [Signage player](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/player/player.js): `public/player/player.js`
- [Content cache](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/player/player.js): `public/player/player.js`
- [Service worker](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/sw.js): `public/sw.js`
- [Browser asset cache](https://github.com/dchaganti997/chartwells-digital-signage/blob/main/public/sw.js): `public/sw.js`

### Other components

- **Operator**

## Connections

- Operator → Admin dashboard: manages screens
- Admin dashboard → Signage server: publishes content (evidence: `public/admin/admin.js`)
- Admin dashboard → Signage server: requests screen data (evidence: `public/admin/admin.js`)
- Signage server → Screen state: updates state (evidence: `server.js`)
- Screen state → Screen JSON: loads and saves (evidence: `server.js`)
- Signage server → Uploaded media: stores uploads (evidence: `server.js`)
- Signage server → Signage player: sends config and updates (evidence: `server.js`)
- Signage server → Admin dashboard: pushes screen updates (evidence: `server.js`)
- Signage player → Signage server: registers and reports status (evidence: `server.js`)
- Signage player → Content cache: caches and restores content (evidence: `public/player/player.js`)
- Signage player → Service worker: registers (evidence: `public/player/player.js`)
- Service worker → Browser asset cache: caches player assets (evidence: `public/sw.js`)
- Service worker → Uploaded media: caches media requests (evidence: `public/sw.js`)
