# sophorndara/wedding-cash-record architecture

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

- Interactive diagram: https://gitdiagram.com/sophorndara/wedding-cash-record
- Repository: https://github.com/sophorndara/wedding-cash-record

## Overview

Wedding Manager is a Khmer-capable desktop app for recording wedding guests and gifts. The primary workflow runs from launching the Tkinter UI through guest entry/editing, SQLite persistence, refreshed searchable guest listings and KHR/USD totals, with Excel export documented by the README. Font detection and Khmer numeral conversion support that workflow; custom Khmer dialogs provide interaction feedback. The UI excerpts are partial, so export and some event wiring are documented capabilities rather than fully verified implementation paths.

Main entry points: [`ui/wedding_app.py`](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py) (Guest manager UI), [`database/wedding_db.py`](https://github.com/sophorndara/wedding-cash-record/blob/main/database/wedding_db.py) (Guest data operations), [`main.py`](https://github.com/sophorndara/wedding-cash-record/blob/main/main.py) (App launcher), [`config/settings.py`](https://github.com/sophorndara/wedding-cash-record/blob/main/config/settings.py) (App settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_entry["App launcher<br/>[main.py]"]
  node_window["Guest manager UI<br/>[wedding_app.py]"]
  node_dialogs["Khmer dialogs<br/>[message_box.py]"]
end

subgraph group_records["Guest records"]
  node_guestform["Guest entry and editing<br/>[wedding_app.py]"]
  node_guestlist["Searchable guest list<br/>[wedding_app.py]"]
  node_summary["Gift summaries<br/>[wedding_app.py]"]
  node_export["Excel export<br/>[wedding_app.py]"]
  node_dbapi["Guest data operations<br/>[wedding_db.py]"]
  node_sqlite[("SQLite guest store<br/>[wedding_db.py]")]
end

subgraph group_support["Localization support"]
  node_conversion["Khmer numeral conversion<br/>[converters.py]"]
  node_fontdetect["Khmer font detection<br/>[font_utils.py]"]
end

subgraph group_settings["Configuration"]
  node_config["App settings<br/>[settings.py]"]
end

node_user(("Wedding manager"))

node_user -->|"launches"| node_entry
node_entry -->|"starts"| node_window
node_window -->|"presents"| node_guestform
node_guestform -->|"saves edits"| node_dbapi
node_window -->|"initializes"| node_dbapi
node_dbapi -->|"reads writes"| node_sqlite
node_window -->|"renders"| node_guestlist
node_guestlist -->|"fetches records"| node_dbapi
node_window -->|"refreshes totals"| node_summary
node_summary -->|"fetches totals"| node_dbapi
node_window -->|"offers export"| node_export
node_window -->|"uses dialogs"| node_dialogs
node_window -->|"reads settings"| node_config
node_config -->|"detects font"| node_fontdetect
node_guestform -.->|"converts amounts"| node_conversion

click node_entry "https://github.com/sophorndara/wedding-cash-record/blob/main/main.py"
click node_window "https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py"
click node_dialogs "https://github.com/sophorndara/wedding-cash-record/blob/main/ui/message_box.py"
click node_guestform "https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py"
click node_guestlist "https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py"
click node_summary "https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py"
click node_export "https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py"
click node_dbapi "https://github.com/sophorndara/wedding-cash-record/blob/main/database/wedding_db.py"
click node_sqlite "https://github.com/sophorndara/wedding-cash-record/blob/main/database/wedding_db.py"
click node_conversion "https://github.com/sophorndara/wedding-cash-record/blob/main/utils/converters.py"
click node_fontdetect "https://github.com/sophorndara/wedding-cash-record/blob/main/utils/font_utils.py"
click node_config "https://github.com/sophorndara/wedding-cash-record/blob/main/config/settings.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_window,node_dialogs toneBlue
class node_guestform,node_guestlist,node_summary,node_export,node_dbapi,node_sqlite toneAmber
class node_conversion,node_fontdetect toneMint
class node_config toneRose
class node_user toneIndigo
```

## Components

### Desktop app

- [App launcher](https://github.com/sophorndara/wedding-cash-record/blob/main/main.py): `main.py`
- [Guest manager UI](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py): `ui/wedding_app.py`
- [Khmer dialogs](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/message_box.py): `ui/message_box.py`

### Guest records

- [Guest entry and editing](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py): `ui/wedding_app.py`
- [Searchable guest list](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py): `ui/wedding_app.py`
- [Gift summaries](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py): `ui/wedding_app.py`
- [Excel export](https://github.com/sophorndara/wedding-cash-record/blob/main/ui/wedding_app.py): `ui/wedding_app.py`
- [Guest data operations](https://github.com/sophorndara/wedding-cash-record/blob/main/database/wedding_db.py): `database/wedding_db.py`
- [SQLite guest store](https://github.com/sophorndara/wedding-cash-record/blob/main/database/wedding_db.py): `database/wedding_db.py`

### Localization support

- [Khmer numeral conversion](https://github.com/sophorndara/wedding-cash-record/blob/main/utils/converters.py): `utils/converters.py`
- [Khmer font detection](https://github.com/sophorndara/wedding-cash-record/blob/main/utils/font_utils.py): `utils/font_utils.py`

### Configuration

- [App settings](https://github.com/sophorndara/wedding-cash-record/blob/main/config/settings.py): `config/settings.py`

### Other components

- **Wedding manager**

## Connections

- Wedding manager → App launcher: launches (evidence: `README.md`)
- App launcher → Guest manager UI: starts (evidence: `main.py`)
- Guest manager UI → Guest entry and editing: presents (evidence: `ui/wedding_app.py`)
- Guest entry and editing → Guest data operations: saves edits (evidence: `ui/wedding_app.py`)
- Guest manager UI → Guest data operations: initializes (evidence: `ui/wedding_app.py`)
- Guest data operations → SQLite guest store: reads writes (evidence: `database/wedding_db.py`)
- Guest manager UI → Searchable guest list: renders (evidence: `ui/wedding_app.py`)
- Searchable guest list → Guest data operations: fetches records (evidence: `ui/wedding_app.py`)
- Guest manager UI → Gift summaries: refreshes totals (evidence: `ui/wedding_app.py`)
- Gift summaries → Guest data operations: fetches totals (evidence: `ui/wedding_app.py`)
- Guest manager UI → Excel export: offers export (evidence: `README.md`)
- Guest manager UI → Khmer dialogs: uses dialogs (evidence: `ui/wedding_app.py`)
- Guest manager UI → App settings: reads settings (evidence: `ui/wedding_app.py`)
- App settings → Khmer font detection: detects font (evidence: `config/settings.py`)
- Guest entry and editing → Khmer numeral conversion: converts amounts
