# rafbor42/bdartlibrairie architecture

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

- Interactive diagram: https://gitdiagram.com/rafbor42/bdartlibrairie
- Repository: https://github.com/rafbor42/bdartlibrairie

## Overview

BdArtLibrairie is a GTK desktop application for managing a comic-book festival bookstore. Volunteers maintain authors and albums, scan or select books to record sales and payments, print receipts, and review amounts owed to authors. The README also documents filtering, sales reports, backups, and online catalog data. The graph combines those documented capabilities with sampled startup, data, and dialog code; unsampled wiring is shown only where the README establishes the capability, not as inferred call chains.

Main entry points: [`MainWindow.cs`](https://github.com/rafbor42/bdartlibrairie/blob/main/MainWindow.cs) (Main window), [`Datas.cs`](https://github.com/rafbor42/bdartlibrairie/blob/main/Datas.cs) (Catalog and sales data), [`VenteBox.cs`](https://github.com/rafbor42/bdartlibrairie/blob/main/VenteBox.cs) (Sale and payment entry), [`Program.cs`](https://github.com/rafbor42/bdartlibrairie/blob/main/Program.cs) (Application startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop workflow"]
  node_program["Application startup<br/>[Program.cs]"]
  node_main["Main window<br/>[MainWindow.cs]"]
end

subgraph group_catalog["Catalog management"]
  node_author_dialog["Author editor<br/>[AuteurBox.cs]"]
  node_album_dialog["Album editor<br/>[AlbumBox.cs]"]
  node_catalog_picker["Album selector<br/>[SelectAlbumBox.cs]"]
end

subgraph group_sales["Sales and reporting"]
  node_sale_dialog["Sale and payment entry<br/>[VenteBox.cs]"]
  node_sales_report["Sales balance report<br/>[BilanVentes.cs]"]
  node_error_viewer["Price discrepancy viewer<br/>[LireFichierBox.cs]"]
end

subgraph group_data["Data and integrations"]
  node_datas["Catalog and sales data<br/>[Datas.cs]"]
  node_global["App settings and utilities<br/>[Global.cs]"]
  node_csv_store[("Local CSV files")]
  node_backup[("Backup files")]
  node_online_catalog[("Online catalog files")]
end

node_volunteer(("Bookstore volunteer"))
node_receipt_printer{{"Receipt printer"}}
node_spreadsheet_user(("Spreadsheet user"))

node_volunteer -->|"starts app"| node_program
node_program -->|"opens window"| node_main
node_volunteer -->|"uses tabs"| node_main
node_main -->|"loads and updates"| node_datas
node_main -->|"edits authors"| node_author_dialog
node_main -->|"edits albums"| node_album_dialog
node_main -->|"selects books"| node_catalog_picker
node_main -->|"records sale"| node_sale_dialog
node_main -->|"opens report"| node_sales_report
node_main -->|"shows discrepancies"| node_error_viewer
node_author_dialog -->|"updates author data"| node_datas
node_album_dialog -->|"updates album data"| node_datas
node_catalog_picker -->|"reads catalog"| node_datas
node_sale_dialog -->|"records payments"| node_datas
node_datas -->|"reads and writes"| node_csv_store
node_sales_report -->|"reads aggregates"| node_datas
node_datas -->|"creates backups"| node_backup
node_volunteer -.->|"prepares CSV"| node_spreadsheet_user
node_spreadsheet_user -.->|"imports catalog"| node_csv_store
node_main -->|"uses settings"| node_global
node_global -.->|"downloads catalog"| node_online_catalog
node_sale_dialog -.->|"prints receipts"| node_receipt_printer

click node_program "https://github.com/rafbor42/bdartlibrairie/blob/main/Program.cs"
click node_main "https://github.com/rafbor42/bdartlibrairie/blob/main/MainWindow.cs"
click node_author_dialog "https://github.com/rafbor42/bdartlibrairie/blob/main/AuteurBox.cs"
click node_album_dialog "https://github.com/rafbor42/bdartlibrairie/blob/main/AlbumBox.cs"
click node_catalog_picker "https://github.com/rafbor42/bdartlibrairie/blob/main/SelectAlbumBox.cs"
click node_datas "https://github.com/rafbor42/bdartlibrairie/blob/main/Datas.cs"
click node_global "https://github.com/rafbor42/bdartlibrairie/blob/main/Global.cs"
click node_sale_dialog "https://github.com/rafbor42/bdartlibrairie/blob/main/VenteBox.cs"
click node_sales_report "https://github.com/rafbor42/bdartlibrairie/blob/main/BilanVentes.cs"
click node_error_viewer "https://github.com/rafbor42/bdartlibrairie/blob/main/LireFichierBox.cs"

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_program,node_main,node_spreadsheet_user toneBlue
class node_author_dialog,node_album_dialog,node_catalog_picker toneAmber
class node_sale_dialog,node_sales_report,node_error_viewer toneMint
class node_datas,node_global,node_csv_store,node_backup,node_online_catalog toneRose
class node_volunteer,node_receipt_printer toneIndigo
```

## Components

### Desktop workflow

- [Application startup](https://github.com/rafbor42/bdartlibrairie/blob/main/Program.cs): `Program.cs`
- [Main window](https://github.com/rafbor42/bdartlibrairie/blob/main/MainWindow.cs): `MainWindow.cs`

### Catalog management

- [Author editor](https://github.com/rafbor42/bdartlibrairie/blob/main/AuteurBox.cs): `AuteurBox.cs`
- [Album editor](https://github.com/rafbor42/bdartlibrairie/blob/main/AlbumBox.cs): `AlbumBox.cs`
- [Album selector](https://github.com/rafbor42/bdartlibrairie/blob/main/SelectAlbumBox.cs): `SelectAlbumBox.cs`

### Sales and reporting

- [Sale and payment entry](https://github.com/rafbor42/bdartlibrairie/blob/main/VenteBox.cs): `VenteBox.cs`
- [Sales balance report](https://github.com/rafbor42/bdartlibrairie/blob/main/BilanVentes.cs): `BilanVentes.cs`
- [Price discrepancy viewer](https://github.com/rafbor42/bdartlibrairie/blob/main/LireFichierBox.cs): `LireFichierBox.cs`

### Data and integrations

- [Catalog and sales data](https://github.com/rafbor42/bdartlibrairie/blob/main/Datas.cs): `Datas.cs`
- [App settings and utilities](https://github.com/rafbor42/bdartlibrairie/blob/main/Global.cs): `Global.cs`
- **Local CSV files**
- **Backup files**
- **Online catalog files**

### Other components

- **Bookstore volunteer**
- **Receipt printer**
- **Spreadsheet user**

## Connections

- Bookstore volunteer → Application startup: starts app
- Application startup → Main window: opens window
- Bookstore volunteer → Main window: uses tabs
- Main window → Catalog and sales data: loads and updates
- Main window → Author editor: edits authors
- Main window → Album editor: edits albums
- Main window → Album selector: selects books
- Main window → Sale and payment entry: records sale
- Main window → Sales balance report: opens report
- Main window → Price discrepancy viewer: shows discrepancies
- Author editor → Catalog and sales data: updates author data
- Album editor → Catalog and sales data: updates album data
- Album selector → Catalog and sales data: reads catalog
- Sale and payment entry → Catalog and sales data: records payments
- Catalog and sales data → Local CSV files: reads and writes
- Sales balance report → Catalog and sales data: reads aggregates
- Catalog and sales data → Backup files: creates backups
- Bookstore volunteer → Spreadsheet user: prepares CSV
- Spreadsheet user → Local CSV files: imports catalog
- Main window → App settings and utilities: uses settings
- App settings and utilities → Online catalog files: downloads catalog
- Sale and payment entry → Receipt printer: prints receipts
