# veeranki97/sd-dynamics architecture

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

- Interactive diagram: https://gitdiagram.com/veeranki97/sd-dynamics
- Repository: https://github.com/veeranki97/sd-dynamics

## Overview

SD Dynamics is an offline-first Indian GST billing and service ERP. Users work through the React application to manage clients, invoices, purchases, receipts, work orders, and accounting records; the app persists business data through a local Express API as JSON files. The README also documents GST returns, inventory, tax reporting, cost centers, and PDF layouts. The graph reflects the sampled app, client, storage, server, and invoice-controller evidence; links to unsampled feature screens are shown only where the app’s imports or README support them.

Main entry points: [`src/App.jsx`](https://github.com/veeranki97/sd-dynamics/blob/main/src/App.jsx) (App shell), [`src/components/ClientsView.jsx`](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ClientsView.jsx) (Clients), [`src/server.js`](https://github.com/veeranki97/sd-dynamics/blob/main/src/server.js) (Local API server), [`src/store.js`](https://github.com/veeranki97/sd-dynamics/blob/main/src/store.js) (Data API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App shell<br/>[App.jsx]"]
end

subgraph group_operations["Business Operations"]
  node_clients["Clients<br/>[ClientsView.jsx]"]
  node_invoices["Invoice creation"]
  node_invoicepreview["Invoice preview<br/>[InvoicePreview.jsx]"]
  node_purchases["Purchase bills<br/>[PurchaseBills.jsx]"]
  node_purchaseorders["Purchase orders"]
  node_workorders["Work orders<br/>[WorkOrdersView.jsx]"]
  node_inventory["Inventory<br/>[InventoryView.jsx]"]
  node_receipts["Receipts and expenses<br/>[ReceiptVoucher.jsx]"]
end

subgraph group_accounts["Accounting and Tax"]
  node_gst["GST returns<br/>[GSTReturns.jsx]"]
  node_books["Financial books"]
  node_ledger["General ledger"]
  node_chartaccounts["Chart of accounts"]
  node_costcenters["Cost centers"]
  node_reports["Reports<br/>[ReportsView.jsx]"]
  node_tax["Income tax<br/>[IncomeTax.jsx]"]
  node_invoicecontroller["Invoice controller"]
  node_glutils["Ledger utilities<br/>[glLedger.js]"]
  node_softdelete["Soft-delete utilities<br/>[softDelete.js]"]
end

subgraph group_platform["Local Data Services"]
  node_store["Data API client<br/>[store.js]"]
  node_server["Local API server<br/>[server.js]"]
  node_jsondata[("Local JSON data<br/>[server.js]")]
  node_utils["GST calculations<br/>[utils.js]"]
  node_drive["Google Drive backup<br/>[googleDrive.js]"]
end

node_user(("Business user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_clients
node_app -->|"loads"| node_invoices
node_app -->|"saves profile"| node_store
node_app -->|"loads"| node_gst
node_app -->|"loads"| node_purchases
node_app -->|"loads"| node_inventory
node_clients -->|"reads and writes"| node_store
node_clients -.->|"uses print settings"| node_invoicepreview
node_invoices -.->|"previews"| node_invoicepreview
node_store -->|"requests API"| node_server
node_server -->|"reads and writes"| node_jsondata
node_server -->|"uses"| node_utils
node_invoicecontroller -->|"creates entries"| node_glutils
node_invoicecontroller -->|"soft deletes"| node_softdelete
node_user -->|"manages"| node_purchaseorders
node_user -->|"manages"| node_workorders
node_user -->|"records"| node_receipts
node_user -->|"reviews"| node_books
node_user -->|"reviews"| node_ledger
node_user -->|"configures"| node_chartaccounts
node_user -->|"assigns"| node_costcenters
node_user -->|"reviews"| node_reports
node_user -->|"prepares"| node_tax
node_user -.->|"backs up"| node_drive

click node_app "https://github.com/veeranki97/sd-dynamics/blob/main/src/App.jsx"
click node_clients "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ClientsView.jsx"
click node_invoices "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/InvoiceGenerator.jsx"
click node_invoicepreview "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/InvoicePreview.jsx"
click node_purchases "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/PurchaseBills.jsx"
click node_purchaseorders "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/PurchaseOrdersView.jsx"
click node_workorders "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/WorkOrdersView.jsx"
click node_inventory "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/InventoryView.jsx"
click node_receipts "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ReceiptVoucher.jsx"
click node_gst "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/GSTReturns.jsx"
click node_books "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/FinancialBooksView.jsx"
click node_ledger "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/GeneralLedgerView.jsx"
click node_chartaccounts "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ChartOfAccountsView.jsx"
click node_costcenters "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/CostCentersView.jsx"
click node_reports "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ReportsView.jsx"
click node_tax "https://github.com/veeranki97/sd-dynamics/blob/main/src/components/IncomeTax.jsx"
click node_invoicecontroller "https://github.com/veeranki97/sd-dynamics/blob/main/src/controllers/invoiceController.js"
click node_glutils "https://github.com/veeranki97/sd-dynamics/blob/main/src/utils/glLedger.js"
click node_softdelete "https://github.com/veeranki97/sd-dynamics/blob/main/src/utils/softDelete.js"
click node_store "https://github.com/veeranki97/sd-dynamics/blob/main/src/store.js"
click node_server "https://github.com/veeranki97/sd-dynamics/blob/main/src/server.js"
click node_jsondata "https://github.com/veeranki97/sd-dynamics/blob/main/src/server.js"
click node_utils "https://github.com/veeranki97/sd-dynamics/blob/main/src/utils.js"
click node_drive "https://github.com/veeranki97/sd-dynamics/blob/main/src/services/googleDrive.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_user toneBlue
class node_clients,node_invoices,node_invoicepreview,node_purchases,node_purchaseorders,node_workorders,node_inventory,node_receipts toneAmber
class node_gst,node_books,node_ledger,node_chartaccounts,node_costcenters,node_reports,node_tax,node_invoicecontroller,node_glutils,node_softdelete toneMint
class node_store,node_server,node_jsondata,node_utils,node_drive toneRose
```

## Components

### Application

- [App shell](https://github.com/veeranki97/sd-dynamics/blob/main/src/App.jsx): `src/App.jsx`

### Business Operations

- [Clients](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ClientsView.jsx): `src/components/ClientsView.jsx`
- [Invoice creation](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/InvoiceGenerator.jsx): `src/components/InvoiceGenerator.jsx`
- [Invoice preview](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/InvoicePreview.jsx): `src/components/InvoicePreview.jsx`
- [Purchase bills](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/PurchaseBills.jsx): `src/components/PurchaseBills.jsx`
- [Purchase orders](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/PurchaseOrdersView.jsx): `src/components/PurchaseOrdersView.jsx`
- [Work orders](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/WorkOrdersView.jsx): `src/components/WorkOrdersView.jsx`
- [Inventory](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/InventoryView.jsx): `src/components/InventoryView.jsx`
- [Receipts and expenses](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ReceiptVoucher.jsx): `src/components/ReceiptVoucher.jsx`

### Accounting and Tax

- [GST returns](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/GSTReturns.jsx): `src/components/GSTReturns.jsx`
- [Financial books](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/FinancialBooksView.jsx): `src/components/FinancialBooksView.jsx`
- [General ledger](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/GeneralLedgerView.jsx): `src/components/GeneralLedgerView.jsx`
- [Chart of accounts](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ChartOfAccountsView.jsx): `src/components/ChartOfAccountsView.jsx`
- [Cost centers](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/CostCentersView.jsx): `src/components/CostCentersView.jsx`
- [Reports](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/ReportsView.jsx): `src/components/ReportsView.jsx`
- [Income tax](https://github.com/veeranki97/sd-dynamics/blob/main/src/components/IncomeTax.jsx): `src/components/IncomeTax.jsx`
- [Invoice controller](https://github.com/veeranki97/sd-dynamics/blob/main/src/controllers/invoiceController.js): `src/controllers/invoiceController.js`
- [Ledger utilities](https://github.com/veeranki97/sd-dynamics/blob/main/src/utils/glLedger.js): `src/utils/glLedger.js`
- [Soft-delete utilities](https://github.com/veeranki97/sd-dynamics/blob/main/src/utils/softDelete.js): `src/utils/softDelete.js`

### Local Data Services

- [Data API client](https://github.com/veeranki97/sd-dynamics/blob/main/src/store.js): `src/store.js`
- [Local API server](https://github.com/veeranki97/sd-dynamics/blob/main/src/server.js): `src/server.js`
- [Local JSON data](https://github.com/veeranki97/sd-dynamics/blob/main/src/server.js): `src/server.js`
- [GST calculations](https://github.com/veeranki97/sd-dynamics/blob/main/src/utils.js): `src/utils.js`
- [Google Drive backup](https://github.com/veeranki97/sd-dynamics/blob/main/src/services/googleDrive.js): `src/services/googleDrive.js`

### Other components

- **Business user**

## Connections

- Business user → App shell: uses (evidence: `README.md`)
- App shell → Clients: routes to (evidence: `src/App.jsx`)
- App shell → Invoice creation: loads (evidence: `src/App.jsx`)
- App shell → Data API client: saves profile (evidence: `src/App.jsx`)
- App shell → GST returns: loads (evidence: `src/App.jsx`)
- App shell → Purchase bills: loads (evidence: `src/App.jsx`)
- App shell → Inventory: loads (evidence: `src/App.jsx`)
- Clients → Data API client: reads and writes (evidence: `src/components/ClientsView.jsx`)
- Clients → Invoice preview: uses print settings
- Invoice creation → Invoice preview: previews
- Data API client → Local API server: requests API (evidence: `src/store.js`)
- Local API server → Local JSON data: reads and writes (evidence: `src/server.js`)
- Local API server → GST calculations: uses (evidence: `src/server.js`)
- Invoice controller → Ledger utilities: creates entries (evidence: `src/controllers/invoiceController.js`)
- Invoice controller → Soft-delete utilities: soft deletes (evidence: `src/controllers/invoiceController.js`)
- Business user → Purchase orders: manages (evidence: `README.md`)
- Business user → Work orders: manages (evidence: `README.md`)
- Business user → Receipts and expenses: records (evidence: `README.md`)
- Business user → Financial books: reviews (evidence: `README.md`)
- Business user → General ledger: reviews (evidence: `README.md`)
- Business user → Chart of accounts: configures (evidence: `README.md`)
- Business user → Cost centers: assigns (evidence: `README.md`)
- Business user → Reports: reviews (evidence: `README.md`)
- Business user → Income tax: prepares (evidence: `README.md`)
- Business user → Google Drive backup: backs up
