# therealapollyon/chromacal architecture

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

- Interactive diagram: https://gitdiagram.com/therealapollyon/chromacal
- Repository: https://github.com/therealapollyon/chromacal

## Overview

ChromaCal is a browser-based Home Assistant dashboard, paired with an optional Home Assistant automation Blueprint. The principal workflow is: a user configures lights and preferences in the dashboard; it computes observances and tonight’s schedule, then publishes the schedule to a Home Assistant state entity; the Blueprint watches that entity and commands the lights. The graph also preserves documented calendar, collision, selection, lighting-control, and presentation capabilities. No source excerpts were provided, so relationships are based on the README; all dashboard responsibilities point to the shipped HTML artifact.

Main entry points: [`dist/chromacal.html`](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html) (ChromaCal dashboard), [`blueprints/automation/chromacal/chromacal_sync.yaml`](https://github.com/therealapollyon/chromacal/blob/main/blueprints/automation/chromacal/chromacal_sync.yaml) (Sync Blueprint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_dashboard["ChromaCal dashboard<br/>[chromacal.html]"]
  node_event_controls["Event selection and skips<br/>[chromacal.html]"]
  node_light_controls["Light controls<br/>[chromacal.html]"]
  node_themes["Themes and display<br/>[chromacal.html]"]
end

subgraph group_calendar["Calendar and schedule"]
  node_calendar["Observance calendar<br/>[chromacal.html]"]
  node_collisions["Event collisions<br/>[chromacal.html]"]
  node_schedule["Tonight schedule<br/>[chromacal.html]"]
end

subgraph group_bridge["Home Assistant bridge"]
  node_schedule_entity["Schedule state entity"]
  node_blueprint["Sync Blueprint"]
end

node_user(("Homeowner"))
node_ha["Home Assistant"]
node_lights["Light entities"]

node_user -->|"configures"| node_dashboard
node_dashboard -->|"computes dates"| node_calendar
node_calendar -->|"identifies overlaps"| node_collisions
node_dashboard -->|"builds schedule"| node_schedule
node_event_controls -->|"selects events"| node_schedule
node_dashboard -->|"provides controls"| node_event_controls
node_dashboard -->|"provides controls"| node_light_controls
node_dashboard -->|"offers themes"| node_themes
node_dashboard -->|"publishes schedule"| node_schedule_entity
node_ha -->|"stores state"| node_schedule_entity
node_blueprint -->|"watches state"| node_schedule_entity
node_blueprint -->|"fires commands"| node_lights

click node_dashboard "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_calendar "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_collisions "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_schedule "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_event_controls "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_light_controls "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_themes "https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html"
click node_blueprint "https://github.com/therealapollyon/chromacal/blob/main/blueprints/automation/chromacal/chromacal_sync.yaml"

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_dashboard,node_event_controls,node_light_controls,node_themes toneBlue
class node_calendar,node_collisions,node_schedule toneAmber
class node_schedule_entity,node_blueprint toneMint
class node_user,node_ha,node_lights toneIndigo
```

## Components

### Dashboard

- [ChromaCal dashboard](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`
- [Event selection and skips](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`
- [Light controls](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`
- [Themes and display](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`

### Calendar and schedule

- [Observance calendar](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`
- [Event collisions](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`
- [Tonight schedule](https://github.com/therealapollyon/chromacal/blob/main/dist/chromacal.html): `dist/chromacal.html`

### Home Assistant bridge

- **Schedule state entity**
- [Sync Blueprint](https://github.com/therealapollyon/chromacal/blob/main/blueprints/automation/chromacal/chromacal_sync.yaml): `blueprints/automation/chromacal/chromacal_sync.yaml`

### Other components

- **Homeowner**
- **Home Assistant**
- **Light entities**

## Connections

- Homeowner → ChromaCal dashboard: configures (evidence: `README.md`)
- ChromaCal dashboard → Observance calendar: computes dates (evidence: `README.md`)
- Observance calendar → Event collisions: identifies overlaps (evidence: `README.md`)
- ChromaCal dashboard → Tonight schedule: builds schedule (evidence: `README.md`)
- Event selection and skips → Tonight schedule: selects events (evidence: `README.md`)
- ChromaCal dashboard → Event selection and skips: provides controls (evidence: `README.md`)
- ChromaCal dashboard → Light controls: provides controls (evidence: `README.md`)
- ChromaCal dashboard → Themes and display: offers themes (evidence: `README.md`)
- ChromaCal dashboard → Schedule state entity: publishes schedule (evidence: `README.md`)
- Home Assistant → Schedule state entity: stores state (evidence: `README.md`)
- Sync Blueprint → Schedule state entity: watches state (evidence: `README.md`)
- Sync Blueprint → Light entities: fires commands (evidence: `README.md`)
