# phadebe/caldavtui architecture

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

- Interactive diagram: https://gitdiagram.com/phadebe/caldavtui
- Repository: https://github.com/phadebe/caldavtui

## Overview

CalDavTui is an early-stage calendar interface intended to combine calendars and sync them via CalDAV. The visible runtime supports prompting for event details, constructing event records, and a rudimentary JSON serialization/write path; the shown main block does not yet invoke that workflow. The README documents CalDAV syncing as a goal, but no implementation is present in the sampled source. The graph reflects only evidenced calls and marks that planned integration as unverified.

Main entry points: [`persistence/persistence.py`](https://github.com/phadebe/caldavtui/blob/main/persistence/persistence.py) (JSON persistence), [`main.py`](https://github.com/phadebe/caldavtui/blob/main/main.py) (Event prompts), [`persistence/serialisation.py`](https://github.com/phadebe/caldavtui/blob/main/persistence/serialisation.py) (Event serialization), [`models.py`](https://github.com/phadebe/caldavtui/blob/main/models.py) (Calendar records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Event Interface"]
  node_entry["Event prompts<br/>[main.py]"]
end

subgraph group_core["Calendar Data"]
  node_records["Calendar records<br/>[models.py]"]
end

subgraph group_storage["JSON Persistence"]
  node_encoding["Event serialization<br/>[serialisation.py]"]
  node_persistence["JSON persistence<br/>[persistence.py]"]
  node_jsonfile[("Local JSON file")]
end

node_user(("Calendar user"))
node_caldav["CalDAV service"]

node_user -->|"enters details"| node_entry
node_entry -->|"constructs events"| node_records
node_persistence -->|"builds event"| node_entry
node_persistence -->|"serializes event"| node_encoding
node_encoding -->|"converts dataclass"| node_records
node_persistence -->|"writes JSON"| node_jsonfile
node_persistence -.->|"planned sync"| node_caldav

click node_entry "https://github.com/phadebe/caldavtui/blob/main/main.py"
click node_records "https://github.com/phadebe/caldavtui/blob/main/models.py"
click node_encoding "https://github.com/phadebe/caldavtui/blob/main/persistence/serialisation.py"
click node_persistence "https://github.com/phadebe/caldavtui/blob/main/persistence/persistence.py"

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_entry,node_user toneBlue
class node_records toneAmber
class node_encoding,node_persistence,node_jsonfile toneMint
class node_caldav toneIndigo
```

## Components

### Event Interface

- [Event prompts](https://github.com/phadebe/caldavtui/blob/main/main.py): `main.py`

### Calendar Data

- [Calendar records](https://github.com/phadebe/caldavtui/blob/main/models.py): `models.py`

### JSON Persistence

- [Event serialization](https://github.com/phadebe/caldavtui/blob/main/persistence/serialisation.py): `persistence/serialisation.py`
- [JSON persistence](https://github.com/phadebe/caldavtui/blob/main/persistence/persistence.py): `persistence/persistence.py`
- **Local JSON file**

### Other components

- **Calendar user**
- **CalDAV service**

## Connections

- Calendar user → Event prompts: enters details (evidence: `main.py`)
- Event prompts → Calendar records: constructs events (evidence: `main.py`)
- JSON persistence → Event prompts: builds event (evidence: `persistence/persistence.py`)
- JSON persistence → Event serialization: serializes event (evidence: `persistence/persistence.py`)
- Event serialization → Calendar records: converts dataclass (evidence: `persistence/serialisation.py`)
- JSON persistence → Local JSON file: writes JSON (evidence: `persistence/persistence.py`)
- JSON persistence → CalDAV service: planned sync (evidence: `README.md`)
