# larping-till-we-succeed/time-capsule architecture

> Architecture diagram of the GitHub repository larping-till-we-succeed/time-capsule, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/larping-till-we-succeed/time-capsule
- Repository: https://github.com/larping-till-we-succeed/time-capsule

## Overview

TimeCapsule is a desktop project-folder snapshot and history browser. The user creates or selects a project, captures manual or automatic snapshots, then browses the timeline, inspects snapshot details, compares versions, restores files, and reviews project statistics or settings. The PySide6 main window coordinates the views and snapshot actions; the storage engine tracks files and persists project history. The README is empty, so feature coverage follows the supplied source index and excerpts; some view wiring is indicated by imports rather than shown call sites.

Main entry points: [`main.py`](https://github.com/larping-till-we-succeed/time-capsule/blob/main/main.py) (Main window), [`store.py`](https://github.com/larping-till-we-succeed/time-capsule/blob/main/store.py) (Snapshot storage), [`ui_timeline.py`](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_timeline.py) (Snapshot timeline), [`ui_dashboard.py`](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_dashboard.py) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_main["Main window<br/>[main.py]"]
  node_dialogs["Project dialogs<br/>[ui_dialogs.py]"]
  node_sidebar["Project navigation<br/>[ui_sidebar.py]"]
  node_settings["Auto-save settings<br/>[ui_settings.py]"]
end

subgraph group_history["Snapshot history"]
  node_timeline["Snapshot timeline<br/>[ui_timeline.py]"]
  node_detail["Snapshot detail<br/>[ui_detail.py]"]
  node_compare["Snapshot comparison<br/>[ui_compare.py]"]
  node_diffing["Text diffing<br/>[diffing.py]"]
end

subgraph group_insights["Project insights"]
  node_dashboard["Dashboard<br/>[ui_dashboard.py]"]
  node_stats["History statistics<br/>[ui_stats.py]"]
end

subgraph group_shared["Shared interface and storage"]
  node_store[("Snapshot storage<br/>[store.py]")]
  node_widgets["Reusable widgets<br/>[widgets.py]"]
  node_theme["Visual theme<br/>[theme.py]"]
end

node_user(("User"))
node_project["Project folder"]
node_localdata[("Local history data")]

node_user -.->|"uses"| node_main
node_main -->|"opens"| node_dialogs
node_main -->|"creates"| node_sidebar
node_main -->|"creates"| node_dashboard
node_main -->|"creates"| node_settings
node_main -->|"creates"| node_timeline
node_main -->|"creates"| node_compare
node_main -->|"reads and writes"| node_store
node_dialogs -->|"reads"| node_store
node_sidebar -->|"uses"| node_dashboard
node_dashboard -->|"checks changes"| node_store
node_timeline -->|"loads history"| node_store
node_timeline -->|"shows detail"| node_detail
node_detail -->|"compares snapshots"| node_store
node_compare -->|"reads blobs"| node_store
node_compare -->|"checks text"| node_diffing
node_stats -->|"loads statistics"| node_store
node_settings -->|"reads settings"| node_store
node_dashboard -->|"uses"| node_widgets
node_timeline -->|"uses"| node_widgets
node_detail -->|"uses"| node_widgets
node_stats -->|"uses"| node_widgets
node_main -->|"applies"| node_theme
node_store -->|"scans files"| node_project
node_store -->|"persists history"| node_localdata

click node_main "https://github.com/larping-till-we-succeed/time-capsule/blob/main/main.py"
click node_dialogs "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_dialogs.py"
click node_sidebar "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_sidebar.py"
click node_settings "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_settings.py"
click node_dashboard "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_dashboard.py"
click node_timeline "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_timeline.py"
click node_detail "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_detail.py"
click node_compare "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_compare.py"
click node_diffing "https://github.com/larping-till-we-succeed/time-capsule/blob/main/diffing.py"
click node_stats "https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_stats.py"
click node_store "https://github.com/larping-till-we-succeed/time-capsule/blob/main/store.py"
click node_widgets "https://github.com/larping-till-we-succeed/time-capsule/blob/main/widgets.py"
click node_theme "https://github.com/larping-till-we-succeed/time-capsule/blob/main/theme.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_main,node_dialogs,node_sidebar,node_settings,node_user toneBlue
class node_timeline,node_detail,node_compare,node_diffing,node_localdata toneAmber
class node_dashboard,node_stats toneMint
class node_store,node_widgets,node_theme toneRose
class node_project toneIndigo
```

## Components

### Application shell

- [Main window](https://github.com/larping-till-we-succeed/time-capsule/blob/main/main.py): `main.py`
- [Project dialogs](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_dialogs.py): `ui_dialogs.py`
- [Project navigation](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_sidebar.py): `ui_sidebar.py`
- [Auto-save settings](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_settings.py): `ui_settings.py`

### Snapshot history

- [Snapshot timeline](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_timeline.py): `ui_timeline.py`
- [Snapshot detail](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_detail.py): `ui_detail.py`
- [Snapshot comparison](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_compare.py): `ui_compare.py`
- [Text diffing](https://github.com/larping-till-we-succeed/time-capsule/blob/main/diffing.py): `diffing.py`

### Project insights

- [Dashboard](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_dashboard.py): `ui_dashboard.py`
- [History statistics](https://github.com/larping-till-we-succeed/time-capsule/blob/main/ui_stats.py): `ui_stats.py`

### Shared interface and storage

- [Snapshot storage](https://github.com/larping-till-we-succeed/time-capsule/blob/main/store.py): `store.py`
- [Reusable widgets](https://github.com/larping-till-we-succeed/time-capsule/blob/main/widgets.py): `widgets.py`
- [Visual theme](https://github.com/larping-till-we-succeed/time-capsule/blob/main/theme.py): `theme.py`

### Other components

- **User**
- **Project folder**
- **Local history data**

## Connections

- User → Main window: uses
- Main window → Project dialogs: opens (evidence: `main.py`)
- Main window → Project navigation: creates (evidence: `main.py`)
- Main window → Dashboard: creates (evidence: `main.py`)
- Main window → Auto-save settings: creates (evidence: `main.py`)
- Main window → Snapshot timeline: creates (evidence: `main.py`)
- Main window → Snapshot comparison: creates (evidence: `main.py`)
- Main window → Snapshot storage: reads and writes (evidence: `main.py`)
- Project dialogs → Snapshot storage: reads (evidence: `ui_dialogs.py`)
- Project navigation → Dashboard: uses (evidence: `ui_sidebar.py`)
- Dashboard → Snapshot storage: checks changes (evidence: `ui_dashboard.py`)
- Snapshot timeline → Snapshot storage: loads history (evidence: `ui_timeline.py`)
- Snapshot timeline → Snapshot detail: shows detail (evidence: `ui_timeline.py`)
- Snapshot detail → Snapshot storage: compares snapshots (evidence: `ui_detail.py`)
- Snapshot comparison → Snapshot storage: reads blobs (evidence: `ui_compare.py`)
- Snapshot comparison → Text diffing: checks text (evidence: `ui_compare.py`)
- History statistics → Snapshot storage: loads statistics (evidence: `ui_stats.py`)
- Auto-save settings → Snapshot storage: reads settings (evidence: `ui_settings.py`)
- Dashboard → Reusable widgets: uses (evidence: `ui_dashboard.py`)
- Snapshot timeline → Reusable widgets: uses (evidence: `ui_timeline.py`)
- Snapshot detail → Reusable widgets: uses (evidence: `ui_detail.py`)
- History statistics → Reusable widgets: uses (evidence: `ui_stats.py`)
- Main window → Visual theme: applies (evidence: `main.py`)
- Snapshot storage → Project folder: scans files (evidence: `store.py`)
- Snapshot storage → Local history data: persists history (evidence: `store.py`)
