# konmichos/easy-inventory architecture

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

- Interactive diagram: https://gitdiagram.com/konmichos/easy-inventory
- Repository: https://github.com/konmichos/easy-inventory

## Overview

Easy Inventory is a local WinForms application for small businesses. Users enter through the main window, which initializes the SQLite database and dispatches to customer, warehouse, sales, payments, and settings screens. Those screens support inventory and customer records, transactions, payment tracking, customer analysis, backups, and Excel export; JSON-backed localization is shared across the interface. The README documents the product capabilities, but several control implementations were not sampled, so some screen-to-storage and navigation links are intentionally omitted.

Main entry points: [`MainProgram.cs`](https://github.com/konmichos/easy-inventory/blob/main/MainProgram.cs) (Main window), [`UserControls/Settings.cs`](https://github.com/konmichos/easy-inventory/blob/main/UserControls/Settings.cs) (Settings), [`Classes/TranslationManager.cs`](https://github.com/konmichos/easy-inventory/blob/main/Classes/TranslationManager.cs) (Translation manager), [`Program.cs`](https://github.com/konmichos/easy-inventory/blob/main/Program.cs) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application shell"]
  node_program["Application entry<br/>[Program.cs]"]
  node_main["Main window<br/>[MainProgram.cs]"]
end

subgraph group_operations["Business operations"]
  node_customers["Customers<br/>[Customers.cs]"]
  node_analysis["Customer analysis"]
  node_warehouse["Warehouse<br/>[Warehouse.cs]"]
  node_sales["Sales<br/>[Sales.cs]"]
  node_payments["Payments<br/>[Payments.cs]"]
  node_popup["Record editor<br/>[PopupForm.cs]"]
end

subgraph group_persistence["Local data"]
  node_dbhelper["Database access<br/>[DatabaseHelper.cs]"]
  node_database[("SQLite database")]
end

subgraph group_support["Settings and localization"]
  node_settings["Settings<br/>[Settings.cs]"]
  node_settingsfile["App settings<br/>[Settings.json]"]
  node_translation["Translation manager"]
  node_languages["Language files"]
end

node_user(("Business user"))
node_excel["Excel report"]

node_user -->|"starts"| node_program
node_program -->|"opens"| node_main
node_main -->|"initializes"| node_dbhelper
node_dbhelper -->|"creates"| node_database
node_main -->|"loads view"| node_customers
node_main -->|"dispatches"| node_warehouse
node_main -->|"dispatches"| node_sales
node_main -->|"dispatches"| node_payments
node_main -->|"dispatches"| node_settings
node_settings -->|"backs up"| node_database
node_settings -->|"exports"| node_excel
node_program -->|"creates if missing"| node_settingsfile
node_translation -->|"reads language"| node_settingsfile
node_translation -->|"loads translations"| node_languages
node_main -->|"localizes menu"| node_translation
node_settings -->|"localizes screen"| node_translation
node_popup -->|"writes records"| node_dbhelper
node_popup -->|"updates stock"| node_database

click node_program "https://github.com/konmichos/easy-inventory/blob/main/Program.cs"
click node_main "https://github.com/konmichos/easy-inventory/blob/main/MainProgram.cs"
click node_customers "https://github.com/konmichos/easy-inventory/blob/main/UserControls/Customers.cs"
click node_analysis "https://github.com/konmichos/easy-inventory/blob/main/UserControls/CustomerAnalysis.cs"
click node_warehouse "https://github.com/konmichos/easy-inventory/blob/main/UserControls/Warehouse.cs"
click node_sales "https://github.com/konmichos/easy-inventory/blob/main/UserControls/Sales.cs"
click node_payments "https://github.com/konmichos/easy-inventory/blob/main/UserControls/Payments.cs"
click node_popup "https://github.com/konmichos/easy-inventory/blob/main/UserControls/PopupForm.cs"
click node_settings "https://github.com/konmichos/easy-inventory/blob/main/UserControls/Settings.cs"
click node_dbhelper "https://github.com/konmichos/easy-inventory/blob/main/Classes/DatabaseHelper.cs"
click node_settingsfile "https://github.com/konmichos/easy-inventory/blob/main/Settings.json"
click node_translation "https://github.com/konmichos/easy-inventory/blob/main/Classes/TranslationManager.cs"
click node_languages "https://github.com/konmichos/easy-inventory/tree/main/Language"

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_user toneBlue
class node_customers,node_analysis,node_warehouse,node_sales,node_payments,node_popup toneAmber
class node_dbhelper,node_database toneMint
class node_settings,node_settingsfile,node_translation,node_languages toneRose
class node_excel toneIndigo
```

## Components

### Application shell

- [Application entry](https://github.com/konmichos/easy-inventory/blob/main/Program.cs): `Program.cs`
- [Main window](https://github.com/konmichos/easy-inventory/blob/main/MainProgram.cs): `MainProgram.cs`

### Business operations

- [Customers](https://github.com/konmichos/easy-inventory/blob/main/UserControls/Customers.cs): `UserControls/Customers.cs`
- [Customer analysis](https://github.com/konmichos/easy-inventory/blob/main/UserControls/CustomerAnalysis.cs): `UserControls/CustomerAnalysis.cs`
- [Warehouse](https://github.com/konmichos/easy-inventory/blob/main/UserControls/Warehouse.cs): `UserControls/Warehouse.cs`
- [Sales](https://github.com/konmichos/easy-inventory/blob/main/UserControls/Sales.cs): `UserControls/Sales.cs`
- [Payments](https://github.com/konmichos/easy-inventory/blob/main/UserControls/Payments.cs): `UserControls/Payments.cs`
- [Record editor](https://github.com/konmichos/easy-inventory/blob/main/UserControls/PopupForm.cs): `UserControls/PopupForm.cs`

### Local data

- [Database access](https://github.com/konmichos/easy-inventory/blob/main/Classes/DatabaseHelper.cs): `Classes/DatabaseHelper.cs`
- **SQLite database**

### Settings and localization

- [Settings](https://github.com/konmichos/easy-inventory/blob/main/UserControls/Settings.cs): `UserControls/Settings.cs`
- [App settings](https://github.com/konmichos/easy-inventory/blob/main/Settings.json): `Settings.json`
- [Translation manager](https://github.com/konmichos/easy-inventory/blob/main/Classes/TranslationManager.cs): `Classes/TranslationManager.cs`
- [Language files](https://github.com/konmichos/easy-inventory/tree/main/Language): `Language`

### Other components

- **Business user**
- **Excel report**

## Connections

- Business user → Application entry: starts
- Application entry → Main window: opens
- Main window → Database access: initializes
- Database access → SQLite database: creates
- Main window → Customers: loads view
- Main window → Warehouse: dispatches
- Main window → Sales: dispatches
- Main window → Payments: dispatches
- Main window → Settings: dispatches
- Settings → SQLite database: backs up
- Settings → Excel report: exports
- Application entry → App settings: creates if missing
- Translation manager → App settings: reads language
- Translation manager → Language files: loads translations
- Main window → Translation manager: localizes menu
- Settings → Translation manager: localizes screen
- Record editor → Database access: writes records
- Record editor → SQLite database: updates stock
