# deepaksurisetti/invoiq architecture

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

- Interactive diagram: https://gitdiagram.com/deepaksurisetti/invoiq
- Repository: https://github.com/deepaksurisetti/invoiq

## Overview

InvoiQ is a frontend-only invoice, quote, and estimate editor. Users select document type and simple or detailed mode, enter parties, currency, line items and optional charges, review a live preview, then export PDF or CSV. App owns the in-memory document state and dispatches rendering and exports; calculations and currency utilities support those views and exports. The README confirms client-side operation without storage. Evidence is limited to the supplied excerpts and README, so the graph omits unshown interactions rather than inferring them.

Main entry points: [`src/App.jsx`](https://github.com/deepaksurisetti/invoiq/blob/main/src/App.jsx) (Application state), [`src/data/currencies.js`](https://github.com/deepaksurisetti/invoiq/blob/main/src/data/currencies.js) (Currency catalog), [`src/utils/pdfExport.js`](https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/pdfExport.js) (PDF export), [`src/utils/csvExport.js`](https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/csvExport.js) (CSV export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application workflow"]
  node_app["Application state<br/>[App.jsx]"]
  node_header["Document controls<br/>[Header.jsx]"]
end

subgraph group_editing["Document editing"]
  node_form["Invoice form<br/>[FormPanel.jsx]"]
  node_items["Line items<br/>[ItemsTable.jsx]"]
  node_currencyselect["Currency selector<br/>[CurrencySelect.jsx]"]
end

subgraph group_rendering["Preview and calculations"]
  node_currencies["Currency catalog<br/>[currencies.js]"]
  node_preview["Live preview<br/>[PreviewPanel.jsx]"]
  node_calculations["Totals and amounts<br/>[calculations.js]"]
end

subgraph group_export["Document exports"]
  node_pdf["PDF export<br/>[pdfExport.js]"]
  node_csv["CSV export<br/>[csvExport.js]"]
end

node_user(("User"))
node_browser(("Browser download"))

node_user -->|"edits document"| node_app
node_app -->|"renders controls"| node_header
node_app -->|"renders form"| node_form
node_app -->|"renders preview"| node_preview
node_header -->|"changes state"| node_app
node_form -->|"renders selector"| node_currencyselect
node_form -->|"renders table"| node_items
node_currencyselect -->|"filters catalog"| node_currencies
node_items -->|"calculates amounts"| node_calculations
node_items -->|"formats amounts"| node_currencies
node_preview -->|"calculates totals"| node_calculations
node_preview -->|"formats amounts"| node_currencies
node_app -->|"dispatches export"| node_pdf
node_app -->|"dispatches export"| node_csv
node_pdf -->|"calculates totals"| node_calculations
node_pdf -->|"looks up currency"| node_currencies
node_pdf -->|"saves PDF"| node_browser
node_csv -->|"calculates totals"| node_calculations
node_csv -->|"looks up currency"| node_currencies
node_csv -->|"downloads CSV"| node_browser

click node_app "https://github.com/deepaksurisetti/invoiq/blob/main/src/App.jsx"
click node_header "https://github.com/deepaksurisetti/invoiq/blob/main/src/components/Header.jsx"
click node_form "https://github.com/deepaksurisetti/invoiq/blob/main/src/components/FormPanel.jsx"
click node_items "https://github.com/deepaksurisetti/invoiq/blob/main/src/components/ItemsTable.jsx"
click node_currencyselect "https://github.com/deepaksurisetti/invoiq/blob/main/src/components/CurrencySelect.jsx"
click node_currencies "https://github.com/deepaksurisetti/invoiq/blob/main/src/data/currencies.js"
click node_preview "https://github.com/deepaksurisetti/invoiq/blob/main/src/components/PreviewPanel.jsx"
click node_calculations "https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/calculations.js"
click node_pdf "https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/pdfExport.js"
click node_csv "https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/csvExport.js"

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_header,node_user,node_browser toneBlue
class node_form,node_items,node_currencyselect toneAmber
class node_currencies,node_preview,node_calculations toneMint
class node_pdf,node_csv toneRose
```

## Components

### Application workflow

- [Application state](https://github.com/deepaksurisetti/invoiq/blob/main/src/App.jsx): `src/App.jsx`
- [Document controls](https://github.com/deepaksurisetti/invoiq/blob/main/src/components/Header.jsx): `src/components/Header.jsx`

### Document editing

- [Invoice form](https://github.com/deepaksurisetti/invoiq/blob/main/src/components/FormPanel.jsx): `src/components/FormPanel.jsx`
- [Line items](https://github.com/deepaksurisetti/invoiq/blob/main/src/components/ItemsTable.jsx): `src/components/ItemsTable.jsx`
- [Currency selector](https://github.com/deepaksurisetti/invoiq/blob/main/src/components/CurrencySelect.jsx): `src/components/CurrencySelect.jsx`

### Preview and calculations

- [Currency catalog](https://github.com/deepaksurisetti/invoiq/blob/main/src/data/currencies.js): `src/data/currencies.js`
- [Live preview](https://github.com/deepaksurisetti/invoiq/blob/main/src/components/PreviewPanel.jsx): `src/components/PreviewPanel.jsx`
- [Totals and amounts](https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/calculations.js): `src/utils/calculations.js`

### Document exports

- [PDF export](https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/pdfExport.js): `src/utils/pdfExport.js`
- [CSV export](https://github.com/deepaksurisetti/invoiq/blob/main/src/utils/csvExport.js): `src/utils/csvExport.js`

### Other components

- **User**
- **Browser download**

## Connections

- User → Application state: edits document (evidence: `README.md`)
- Application state → Document controls: renders controls (evidence: `src/App.jsx`)
- Application state → Invoice form: renders form (evidence: `src/App.jsx`)
- Application state → Live preview: renders preview (evidence: `src/App.jsx`)
- Document controls → Application state: changes state (evidence: `src/App.jsx`)
- Invoice form → Currency selector: renders selector (evidence: `src/components/FormPanel.jsx`)
- Invoice form → Line items: renders table (evidence: `src/components/FormPanel.jsx`)
- Currency selector → Currency catalog: filters catalog (evidence: `src/components/CurrencySelect.jsx`)
- Line items → Totals and amounts: calculates amounts (evidence: `src/components/ItemsTable.jsx`)
- Line items → Currency catalog: formats amounts (evidence: `src/components/ItemsTable.jsx`)
- Live preview → Totals and amounts: calculates totals (evidence: `src/components/PreviewPanel.jsx`)
- Live preview → Currency catalog: formats amounts (evidence: `src/components/PreviewPanel.jsx`)
- Application state → PDF export: dispatches export (evidence: `src/App.jsx`)
- Application state → CSV export: dispatches export (evidence: `src/App.jsx`)
- PDF export → Totals and amounts: calculates totals (evidence: `src/utils/pdfExport.js`)
- PDF export → Currency catalog: looks up currency (evidence: `src/utils/pdfExport.js`)
- PDF export → Browser download: saves PDF (evidence: `src/utils/pdfExport.js`)
- CSV export → Totals and amounts: calculates totals (evidence: `src/utils/csvExport.js`)
- CSV export → Currency catalog: looks up currency (evidence: `src/utils/csvExport.js`)
- CSV export → Browser download: downloads CSV (evidence: `src/utils/csvExport.js`)
