# knibel/sn-dienstplan architecture

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

- Interactive diagram: https://gitdiagram.com/knibel/sn-dienstplan
- Repository: https://github.com/knibel/sn-dienstplan

## Overview

sn-dienstplan appears to be a browser-based staff scheduling application. The apparent workflow is planning a week—choosing days and assigning staff—alongside maintaining staff, groups, activities and notes, then saving or printing the plan. Feature names indicate these capabilities, but the application source is the unsampled dienstplan.html; its internal modules and their relationships cannot be verified. The sampled service worker does show network-first GET handling with a cache fallback. The README contains only the project name.

Main entry points: [`sw.js`](https://github.com/knibel/sn-dienstplan/blob/main/sw.js) (Service worker), [`dienstplan.html`](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html) (Weekly planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Schedule planning"]
  node_planner["Weekly planner<br/>[dienstplan.html]"]
  node_day_details["Day details<br/>[dienstplan.html]"]
  node_assignments["Staff assignments<br/>[dienstplan.html]"]
  node_week_navigation["Week navigation<br/>[dienstplan.html]"]
end

subgraph group_management["Plan management"]
  node_staff["Staff management<br/>[dienstplan.html]"]
  node_groups["Group management<br/>[dienstplan.html]"]
  node_activities["Activity catalog<br/>[dienstplan.html]"]
  node_misc_catalog["Miscellaneous catalog<br/>[dienstplan.html]"]
  node_notes["Comments and notes<br/>[dienstplan.html]"]
end

subgraph group_persistence["Save and print"]
  node_persistence_ui["Plan persistence<br/>[dienstplan.html]"]
  node_printing["Print view<br/>[dienstplan.html]"]
end

subgraph group_offline["Offline delivery"]
  node_service_worker["Service worker<br/>[sw.js]"]
  node_browser_cache[("Browser cache")]
end

node_network(("Web network"))
node_user(("Scheduler"))

node_user -.->|"uses"| node_planner
node_network -->|"sends GET"| node_service_worker
node_service_worker -->|"fetches first"| node_network
node_service_worker -->|"caches responses"| node_browser_cache
node_service_worker -->|"fallback reads"| node_browser_cache

click node_planner "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_day_details "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_assignments "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_week_navigation "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_staff "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_groups "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_activities "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_misc_catalog "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_notes "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_persistence_ui "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_printing "https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html"
click node_service_worker "https://github.com/knibel/sn-dienstplan/blob/main/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_planner,node_day_details,node_assignments,node_week_navigation toneBlue
class node_staff,node_groups,node_activities,node_misc_catalog,node_notes toneAmber
class node_persistence_ui,node_printing toneMint
class node_service_worker,node_browser_cache,node_user toneRose
class node_network toneIndigo
```

## Components

### Schedule planning

- [Weekly planner](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Day details](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Staff assignments](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Week navigation](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`

### Plan management

- [Staff management](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Group management](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Activity catalog](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Miscellaneous catalog](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Comments and notes](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`

### Save and print

- [Plan persistence](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`
- [Print view](https://github.com/knibel/sn-dienstplan/blob/main/dienstplan.html): `dienstplan.html`

### Offline delivery

- [Service worker](https://github.com/knibel/sn-dienstplan/blob/main/sw.js): `sw.js`
- **Browser cache**

### Other components

- **Web network**
- **Scheduler**

## Connections

- Scheduler → Weekly planner: uses
- Web network → Service worker: sends GET (evidence: `sw.js`)
- Service worker → Web network: fetches first (evidence: `sw.js`)
- Service worker → Browser cache: caches responses (evidence: `sw.js`)
- Service worker → Browser cache: fallback reads (evidence: `sw.js`)
