# petko-todorov/activity-log architecture

> Architecture diagram of the GitHub repository petko-todorov/activity-log, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/petko-todorov/activity-log
- Repository: https://github.com/petko-todorov/activity-log

## Overview

Activity Log is a PySide6 desktop app for recording activities with dates, reviewing a sortable recency list and per-activity history, and editing or deleting entries. The workflow starts at the desktop user, enters through the Qt application and main window, then updates the activity model and persists JSON through storage. The graph separates UI, activity operations, and persistence. Source excerpts show the main runtime wiring; no separate domain or service layer is present.

Main entry points: [`storage.py`](https://github.com/petko-todorov/activity-log/blob/main/storage.py) (JSON persistence), [`ui/main_window.py`](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py) (Main window), [`main.py`](https://github.com/petko-todorov/activity-log/blob/main/main.py) (Qt entry point), [`ui/ui_main_window.py`](https://github.com/petko-todorov/activity-log/blob/main/ui/ui_main_window.py) (Window widgets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_entry["Qt entry point<br/>[main.py]"]
end

subgraph group_interface["Desktop interface"]
  node_window["Main window<br/>[main_window.py]"]
  node_widgets["Window widgets<br/>[ui_main_window.py]"]
end

subgraph group_activity["Activity management"]
  node_capture["Activity entry<br/>[main_window.py]"]
  node_list["Sortable activity list<br/>[main_window.py]"]
  node_history["Activity history details<br/>[main_window.py]"]
  node_suggestions["Name suggestions<br/>[main_window.py]"]
  node_edit["Rename activity<br/>[main_window.py]"]
  node_delete["Delete entries<br/>[main_window.py]"]
end

subgraph group_persistence["Local persistence"]
  node_storage["JSON persistence<br/>[storage.py]"]
  node_jsonfile[("Activity data file<br/>[activities.json]")]
end

node_user(("Desktop user"))

node_user -->|"launches"| node_entry
node_entry -->|"creates"| node_window
node_window -->|"configures"| node_widgets
node_user -->|"enters activity"| node_capture
node_capture -->|"saves"| node_storage
node_window -->|"loads data"| node_storage
node_storage -->|"reads and writes"| node_jsonfile
node_capture -->|"refreshes"| node_list
node_user -->|"views and sorts"| node_list
node_list -->|"selection updates"| node_history
node_window -->|"configures"| node_suggestions
node_user -->|"requests rename"| node_edit
node_edit -->|"saves changes"| node_storage
node_user -->|"requests deletion"| node_delete
node_delete -->|"saves changes"| node_storage
node_delete -->|"refreshes"| node_list

click node_entry "https://github.com/petko-todorov/activity-log/blob/main/main.py"
click node_window "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_widgets "https://github.com/petko-todorov/activity-log/blob/main/ui/ui_main_window.py"
click node_capture "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_list "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_history "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_suggestions "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_edit "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_delete "https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py"
click node_storage "https://github.com/petko-todorov/activity-log/blob/main/storage.py"
click node_jsonfile "https://github.com/petko-todorov/activity-log/blob/main/activities.json"

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_window,node_widgets toneAmber
class node_capture,node_list,node_history,node_suggestions,node_edit,node_delete toneMint
class node_storage,node_jsonfile toneRose
```

## Components

### Application runtime

- [Qt entry point](https://github.com/petko-todorov/activity-log/blob/main/main.py): `main.py`

### Desktop interface

- [Main window](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`
- [Window widgets](https://github.com/petko-todorov/activity-log/blob/main/ui/ui_main_window.py): `ui/ui_main_window.py`

### Activity management

- [Activity entry](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`
- [Sortable activity list](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`
- [Activity history details](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`
- [Name suggestions](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`
- [Rename activity](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`
- [Delete entries](https://github.com/petko-todorov/activity-log/blob/main/ui/main_window.py): `ui/main_window.py`

### Local persistence

- [JSON persistence](https://github.com/petko-todorov/activity-log/blob/main/storage.py): `storage.py`
- [Activity data file](https://github.com/petko-todorov/activity-log/blob/main/activities.json): `activities.json`

### Other components

- **Desktop user**

## Connections

- Desktop user → Qt entry point: launches (evidence: `README.md`)
- Qt entry point → Main window: creates (evidence: `main.py`)
- Main window → Window widgets: configures (evidence: `ui/main_window.py`)
- Desktop user → Activity entry: enters activity (evidence: `ui/main_window.py`)
- Activity entry → JSON persistence: saves (evidence: `ui/main_window.py`)
- Main window → JSON persistence: loads data (evidence: `ui/main_window.py`)
- JSON persistence → Activity data file: reads and writes (evidence: `storage.py`)
- Activity entry → Sortable activity list: refreshes (evidence: `ui/main_window.py`)
- Desktop user → Sortable activity list: views and sorts (evidence: `README.md`)
- Sortable activity list → Activity history details: selection updates (evidence: `ui/main_window.py`)
- Main window → Name suggestions: configures (evidence: `ui/main_window.py`)
- Desktop user → Rename activity: requests rename (evidence: `ui/main_window.py`)
- Rename activity → JSON persistence: saves changes (evidence: `ui/main_window.py`)
- Desktop user → Delete entries: requests deletion (evidence: `ui/main_window.py`)
- Delete entries → JSON persistence: saves changes (evidence: `ui/main_window.py`)
- Delete entries → Sortable activity list: refreshes (evidence: `ui/main_window.py`)
