# suvarnalingwat1322-debug/sd architecture

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

- Interactive diagram: https://gitdiagram.com/suvarnalingwat1322-debug/sd
- Repository: https://github.com/suvarnalingwat1322-debug/sd

## Overview

This is a GST invoicing application for S.D. Enterprises. Users navigate a dashboard, maintain customer records, create and save GST invoices, then search, edit, duplicate, or delete them in invoice history; invoices can also be rendered and exported as PDFs. Customer records support Excel import/export, while settings hold business and tax defaults. The workflow is inferred from the sampled routes and source references; unsampled screens are represented by their exact paths, and no backend or remote service is evidenced.

Main entry points: [`src/App.tsx`](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/App.tsx) (Route Application), [`src/pages/CreateInvoice.tsx`](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/CreateInvoice.tsx) (Invoice Editor), [`src/store/index.ts`](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/store/index.ts) (Persisted App State), [`src/pages/CustomerList.tsx`](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/CustomerList.tsx) (Customer Records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Application Shell"]
  node_app["Route Application<br/>[App.tsx]"]
  node_layout["Navigation Layout<br/>[Layout.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
end

subgraph group_invoicing["Invoice Workflow"]
  node_invoiceform["Invoice Editor<br/>[CreateInvoice.tsx]"]
  node_history["Invoice History<br/>[InvoiceHistory.tsx]"]
  node_preview["Invoice Preview<br/>[InvoicePreview.tsx]"]
end

subgraph group_records["Customer Records"]
  node_customerlist["Customer Records<br/>[CustomerList.tsx]"]
  node_recordmodal["Record Editor"]
  node_excel["Excel Transfer<br/>[excel.ts]"]
end

subgraph group_state["Application State"]
  node_settings["Business Settings<br/>[SettingsPage.tsx]"]
  node_store[("Persisted App State<br/>[index.ts]")]
  node_types["Domain Data Types<br/>[types.ts]"]
end

subgraph group_calculations["Invoice Calculations"]
  node_gst["GST Calculator<br/>[gstCalc.ts]"]
  node_words["Rupee Words<br/>[indianWords.ts]"]
end

node_user(("Business User"))

node_user -->|"uses"| node_app
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_customerlist
node_app -->|"routes to"| node_invoiceform
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_settings
node_user -.->|"views"| node_dashboard
node_user -.->|"manages"| node_customerlist
node_user -.->|"creates"| node_invoiceform
node_user -.->|"reviews"| node_history
node_user -.->|"configures"| node_settings
node_customerlist -->|"renders"| node_recordmodal
node_customerlist -->|"imports and exports"| node_excel
node_customerlist -->|"reads and updates"| node_store
node_invoiceform -->|"reads and saves"| node_store
node_invoiceform -->|"calculates tax"| node_gst
node_invoiceform -->|"converts amount"| node_words
node_invoiceform -->|"renders"| node_preview
node_history -->|"reads and deletes"| node_store
node_settings -->|"reads and updates"| node_store
node_dashboard -->|"reads"| node_store
node_store -->|"uses"| node_types
node_excel -->|"uses"| node_types
node_preview -->|"uses"| node_types

click node_app "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/App.tsx"
click node_layout "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/components/Layout.tsx"
click node_dashboard "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/Dashboard.tsx"
click node_invoiceform "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/CreateInvoice.tsx"
click node_history "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/InvoiceHistory.tsx"
click node_preview "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/components/InvoicePreview.tsx"
click node_customerlist "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/CustomerList.tsx"
click node_recordmodal "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/components/CustomerRecordModal.tsx"
click node_excel "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/utils/excel.ts"
click node_settings "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/SettingsPage.tsx"
click node_store "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/store/index.ts"
click node_types "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/types.ts"
click node_gst "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/utils/gstCalc.ts"
click node_words "https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/utils/indianWords.ts"

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_layout,node_dashboard,node_user toneBlue
class node_invoiceform,node_history,node_preview toneAmber
class node_customerlist,node_recordmodal,node_excel toneMint
class node_settings,node_store,node_types toneRose
class node_gst,node_words toneIndigo
```

## Components

### Application Shell

- [Route Application](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation Layout](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/components/Layout.tsx): `src/components/Layout.tsx`
- [Dashboard](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`

### Invoice Workflow

- [Invoice Editor](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/CreateInvoice.tsx): `src/pages/CreateInvoice.tsx`
- [Invoice History](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/InvoiceHistory.tsx): `src/pages/InvoiceHistory.tsx`
- [Invoice Preview](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/components/InvoicePreview.tsx): `src/components/InvoicePreview.tsx`

### Customer Records

- [Customer Records](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/CustomerList.tsx): `src/pages/CustomerList.tsx`
- [Record Editor](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/components/CustomerRecordModal.tsx): `src/components/CustomerRecordModal.tsx`
- [Excel Transfer](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/utils/excel.ts): `src/utils/excel.ts`

### Application State

- [Business Settings](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/pages/SettingsPage.tsx): `src/pages/SettingsPage.tsx`
- [Persisted App State](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/store/index.ts): `src/store/index.ts`
- [Domain Data Types](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/types.ts): `src/types.ts`

### Invoice Calculations

- [GST Calculator](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/utils/gstCalc.ts): `src/utils/gstCalc.ts`
- [Rupee Words](https://github.com/suvarnalingwat1322-debug/sd/blob/main/src/utils/indianWords.ts): `src/utils/indianWords.ts`

### Other components

- **Business User**

## Connections

- Business User → Route Application: uses
- Route Application → Navigation Layout: routes through (evidence: `src/App.tsx`)
- Route Application → Dashboard: routes to (evidence: `src/App.tsx`)
- Route Application → Customer Records: routes to (evidence: `src/App.tsx`)
- Route Application → Invoice Editor: routes to (evidence: `src/App.tsx`)
- Route Application → Invoice History: routes to (evidence: `src/App.tsx`)
- Route Application → Business Settings: routes to (evidence: `src/App.tsx`)
- Business User → Dashboard: views
- Business User → Customer Records: manages
- Business User → Invoice Editor: creates
- Business User → Invoice History: reviews
- Business User → Business Settings: configures
- Customer Records → Record Editor: renders (evidence: `src/pages/CustomerList.tsx`)
- Customer Records → Excel Transfer: imports and exports (evidence: `src/pages/CustomerList.tsx`)
- Customer Records → Persisted App State: reads and updates (evidence: `src/pages/CustomerList.tsx`)
- Invoice Editor → Persisted App State: reads and saves (evidence: `src/pages/CreateInvoice.tsx`)
- Invoice Editor → GST Calculator: calculates tax (evidence: `src/pages/CreateInvoice.tsx`)
- Invoice Editor → Rupee Words: converts amount (evidence: `src/pages/CreateInvoice.tsx`)
- Invoice Editor → Invoice Preview: renders (evidence: `src/pages/CreateInvoice.tsx`)
- Invoice History → Persisted App State: reads and deletes (evidence: `src/pages/InvoiceHistory.tsx`)
- Business Settings → Persisted App State: reads and updates (evidence: `src/pages/SettingsPage.tsx`)
- Dashboard → Persisted App State: reads (evidence: `src/pages/Dashboard.tsx`)
- Persisted App State → Domain Data Types: uses (evidence: `src/store/index.ts`)
- Excel Transfer → Domain Data Types: uses (evidence: `src/utils/excel.ts`)
- Invoice Preview → Domain Data Types: uses (evidence: `src/components/InvoicePreview.tsx`)
