# akashkbsa/mononmani-welding-works architecture

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

- Interactive diagram: https://gitdiagram.com/akashkbsa/mononmani-welding-works
- Repository: https://github.com/akashkbsa/mononmani-welding-works

## Overview

Mononmani Welding Works is a desktop invoicing and payment-management application. Users navigate a dashboard and customer, invoice, payment, and settings screens; forms submit through a TypeScript API service to Tauri commands, which manage records in SQLite. Invoice and payment workflows include GST calculations, payment allocation, outstanding-balance tracking, and invoice PDF printing. The tree and excerpts establish the UI-to-service calls and repository responsibilities; command-to-repository and some backend integration links are shown as unverified where command implementations were not sampled.

Main entry points: [`src/services/api.ts`](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/services/api.ts) (Tauri API client), [`src/App.tsx`](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/App.tsx) (App navigation), [`src/pages/InvoicesPage.tsx`](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/InvoicesPage.tsx) (Invoice screens), [`src/pages/PaymentsPage.tsx`](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/PaymentsPage.tsx) (Payment screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Desktop interface"]
  node_app["App navigation<br/>[App.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_customer_ui["Customer screens<br/>[CustomersPage.tsx]"]
  node_invoice_ui["Invoice screens<br/>[InvoicesPage.tsx]"]
  node_payment_ui["Payment screens<br/>[PaymentsPage.tsx]"]
  node_settings_ui["Settings screen<br/>[SettingsPage.tsx]"]
  node_customer_forms["Customer forms"]
  node_invoice_forms["Invoice forms"]
  node_invoice_details["Invoice details"]
  node_payment_forms["Payment forms"]
  node_payment_details["Payment details"]
end

subgraph group_domain["Billing workflows"]
  node_customer_repo["Customer records<br/>[repository.rs]"]
  node_invoice_repo["Invoice records<br/>[repository.rs]"]
  node_payment_repo["Payment allocation<br/>[repository.rs]"]
  node_gst["GST calculations<br/>[gst.ts]"]
end

subgraph group_backend["Tauri services"]
  node_api["Tauri API client<br/>[api.ts]"]
  node_customer_commands["Customer commands<br/>[commands.rs]"]
  node_invoice_commands["Invoice commands<br/>[commands.rs]"]
  node_payment_commands["Payment commands<br/>[commands.rs]"]
  node_storage_commands["Storage commands"]
  node_pdf["Invoice PDF<br/>[renderer.rs]"]
end

subgraph group_persistence["Local data"]
  node_database[("SQLite database")]
  node_migration["Schema migrations<br/>[migrations.rs]"]
end

node_user(("Business user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_customer_ui
node_app -->|"routes to"| node_invoice_ui
node_app -->|"routes to"| node_payment_ui
node_app -->|"routes to"| node_settings_ui
node_dashboard -->|"requests data"| node_api
node_customer_ui -->|"requests data"| node_api
node_invoice_ui -->|"requests data"| node_api
node_payment_ui -->|"requests data"| node_api
node_settings_ui -->|"requests settings"| node_api
node_customer_ui -->|"opens form"| node_customer_forms
node_invoice_ui -->|"opens form"| node_invoice_forms
node_invoice_ui -->|"opens details"| node_invoice_details
node_payment_ui -->|"opens form"| node_payment_forms
node_payment_ui -->|"opens details"| node_payment_details
node_customer_forms -->|"saves customer"| node_api
node_invoice_forms -->|"saves invoice"| node_api
node_invoice_forms -->|"calculates tax"| node_gst
node_invoice_details -->|"loads details"| node_api
node_invoice_details -->|"opens payment"| node_payment_forms
node_payment_forms -->|"saves payment"| node_api
node_payment_details -->|"loads details"| node_api
node_dashboard -->|"opens invoice"| node_invoice_details
node_api -.->|"invokes commands"| node_customer_commands
node_api -.->|"invokes commands"| node_invoice_commands
node_api -.->|"invokes commands"| node_payment_commands
node_api -.->|"invokes settings"| node_storage_commands
node_api -.->|"requests printing"| node_pdf
node_customer_commands -.->|"delegates"| node_customer_repo
node_invoice_commands -.->|"delegates"| node_invoice_repo
node_payment_commands -.->|"delegates"| node_payment_repo
node_customer_repo -->|"reads and writes"| node_database
node_invoice_repo -->|"reads and writes"| node_database
node_payment_repo -->|"reads and writes"| node_database
node_invoice_repo -->|"uses customer data"| node_customer_repo
node_payment_repo -->|"checks invoices"| node_invoice_repo
node_migration -->|"defines schema"| node_database

click node_app "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/App.tsx"
click node_dashboard "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/DashboardPage.tsx"
click node_customer_ui "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/CustomersPage.tsx"
click node_invoice_ui "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/InvoicesPage.tsx"
click node_payment_ui "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/PaymentsPage.tsx"
click node_settings_ui "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/SettingsPage.tsx"
click node_customer_forms "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/customers/CustomerFormModal.tsx"
click node_invoice_forms "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/invoices/InvoiceFormModal.tsx"
click node_invoice_details "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/invoices/InvoiceDetailsModal.tsx"
click node_payment_forms "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/payments/PaymentFormModal.tsx"
click node_payment_details "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/payments/PaymentDetailsModal.tsx"
click node_api "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/services/api.ts"
click node_customer_commands "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/customers/commands.rs"
click node_invoice_commands "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/invoices/commands.rs"
click node_payment_commands "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/payments/commands.rs"
click node_storage_commands "https://github.com/akashkbsa/mononmani-welding-works/tree/main/src-tauri/src/storage"
click node_pdf "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/pdf/renderer.rs"
click node_customer_repo "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/customers/repository.rs"
click node_invoice_repo "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/invoices/repository.rs"
click node_payment_repo "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/payments/repository.rs"
click node_gst "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/lib/gst.ts"
click node_database "https://github.com/akashkbsa/mononmani-welding-works/tree/main/src-tauri/src/db"
click node_migration "https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/db/migrations.rs"

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_app,node_dashboard,node_customer_ui,node_invoice_ui,node_payment_ui,node_settings_ui,node_customer_forms,node_invoice_forms,node_invoice_details,node_payment_forms,node_payment_details,node_user toneBlue
class node_customer_repo,node_invoice_repo,node_payment_repo,node_gst toneAmber
class node_api,node_customer_commands,node_invoice_commands,node_payment_commands,node_storage_commands,node_pdf toneMint
class node_database,node_migration toneRose
```

## Components

### Desktop interface

- [App navigation](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Customer screens](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/CustomersPage.tsx): `src/pages/CustomersPage.tsx`
- [Invoice screens](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/InvoicesPage.tsx): `src/pages/InvoicesPage.tsx`
- [Payment screens](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/PaymentsPage.tsx): `src/pages/PaymentsPage.tsx`
- [Settings screen](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/pages/SettingsPage.tsx): `src/pages/SettingsPage.tsx`
- [Customer forms](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/customers/CustomerFormModal.tsx): `src/components/customers/CustomerFormModal.tsx`
- [Invoice forms](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/invoices/InvoiceFormModal.tsx): `src/components/invoices/InvoiceFormModal.tsx`
- [Invoice details](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/invoices/InvoiceDetailsModal.tsx): `src/components/invoices/InvoiceDetailsModal.tsx`
- [Payment forms](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/payments/PaymentFormModal.tsx): `src/components/payments/PaymentFormModal.tsx`
- [Payment details](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/components/payments/PaymentDetailsModal.tsx): `src/components/payments/PaymentDetailsModal.tsx`

### Billing workflows

- [Customer records](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/customers/repository.rs): `src-tauri/src/customers/repository.rs`
- [Invoice records](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/invoices/repository.rs): `src-tauri/src/invoices/repository.rs`
- [Payment allocation](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/payments/repository.rs): `src-tauri/src/payments/repository.rs`
- [GST calculations](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/lib/gst.ts): `src/lib/gst.ts`

### Tauri services

- [Tauri API client](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src/services/api.ts): `src/services/api.ts`
- [Customer commands](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/customers/commands.rs): `src-tauri/src/customers/commands.rs`
- [Invoice commands](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/invoices/commands.rs): `src-tauri/src/invoices/commands.rs`
- [Payment commands](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/payments/commands.rs): `src-tauri/src/payments/commands.rs`
- [Storage commands](https://github.com/akashkbsa/mononmani-welding-works/tree/main/src-tauri/src/storage): `src-tauri/src/storage`
- [Invoice PDF](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/pdf/renderer.rs): `src-tauri/src/pdf/renderer.rs`

### Local data

- [SQLite database](https://github.com/akashkbsa/mononmani-welding-works/tree/main/src-tauri/src/db): `src-tauri/src/db`
- [Schema migrations](https://github.com/akashkbsa/mononmani-welding-works/blob/main/src-tauri/src/db/migrations.rs): `src-tauri/src/db/migrations.rs`

### Other components

- **Business user**

## Connections

- Business user → App navigation: uses (evidence: `src/App.tsx`)
- App navigation → Dashboard: routes to (evidence: `src/App.tsx`)
- App navigation → Customer screens: routes to (evidence: `src/App.tsx`)
- App navigation → Invoice screens: routes to (evidence: `src/App.tsx`)
- App navigation → Payment screens: routes to (evidence: `src/App.tsx`)
- App navigation → Settings screen: routes to (evidence: `src/App.tsx`)
- Dashboard → Tauri API client: requests data (evidence: `src/pages/DashboardPage.tsx`)
- Customer screens → Tauri API client: requests data (evidence: `src/pages/CustomersPage.tsx`)
- Invoice screens → Tauri API client: requests data (evidence: `src/pages/InvoicesPage.tsx`)
- Payment screens → Tauri API client: requests data (evidence: `src/pages/PaymentsPage.tsx`)
- Settings screen → Tauri API client: requests settings (evidence: `src/pages/SettingsPage.tsx`)
- Customer screens → Customer forms: opens form (evidence: `src/pages/CustomersPage.tsx`)
- Invoice screens → Invoice forms: opens form (evidence: `src/pages/InvoicesPage.tsx`)
- Invoice screens → Invoice details: opens details (evidence: `src/pages/InvoicesPage.tsx`)
- Payment screens → Payment forms: opens form (evidence: `src/pages/PaymentsPage.tsx`)
- Payment screens → Payment details: opens details (evidence: `src/pages/PaymentsPage.tsx`)
- Customer forms → Tauri API client: saves customer (evidence: `src/components/customers/CustomerFormModal.tsx`)
- Invoice forms → Tauri API client: saves invoice (evidence: `src/components/invoices/InvoiceFormModal.tsx`)
- Invoice forms → GST calculations: calculates tax (evidence: `src/components/invoices/InvoiceFormModal.tsx`)
- Invoice details → Tauri API client: loads details (evidence: `src/components/invoices/InvoiceDetailsModal.tsx`)
- Invoice details → Payment forms: opens payment (evidence: `src/components/invoices/InvoiceDetailsModal.tsx`)
- Payment forms → Tauri API client: saves payment (evidence: `src/components/payments/PaymentFormModal.tsx`)
- Payment details → Tauri API client: loads details (evidence: `src/components/payments/PaymentDetailsModal.tsx`)
- Dashboard → Invoice details: opens invoice (evidence: `src/pages/DashboardPage.tsx`)
- Tauri API client → Customer commands: invokes commands
- Tauri API client → Invoice commands: invokes commands
- Tauri API client → Payment commands: invokes commands
- Tauri API client → Storage commands: invokes settings
- Tauri API client → Invoice PDF: requests printing
- Customer commands → Customer records: delegates
- Invoice commands → Invoice records: delegates
- Payment commands → Payment allocation: delegates
- Customer records → SQLite database: reads and writes (evidence: `src-tauri/src/customers/repository.rs`)
- Invoice records → SQLite database: reads and writes (evidence: `src-tauri/src/invoices/repository.rs`)
- Payment allocation → SQLite database: reads and writes (evidence: `src-tauri/src/payments/repository.rs`)
- Invoice records → Customer records: uses customer data (evidence: `src-tauri/src/invoices/repository.rs`)
- Payment allocation → Invoice records: checks invoices (evidence: `src-tauri/src/payments/repository.rs`)
- Schema migrations → SQLite database: defines schema (evidence: `src-tauri/src/db/mod.rs`)
