# anish08-gh/billing-software architecture

> Architecture diagram of the GitHub repository anish08-gh/billing-software, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anish08-gh/billing-software
- Repository: https://github.com/anish08-gh/billing-software

## Overview

This is a shop billing application: shop users authenticate, maintain a product catalogue and profile, create and manage customer bills, record payments, and review dashboard and payment-history data. The React app calls a Spring backend through a shared API helper and can generate bill PDFs. Backend services implement billing, catalogue, authentication, and profile behavior over JPA repositories and domain entities. The excerpts show selected calls; several controller/service and persistence connections are not sampled, so those links are omitted or marked unverified.

Main entry points: [`Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java`](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java) (Account service), [`Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java`](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java) (Bill operations), [`Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java`](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java) (Catalogue service), [`Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ShopRepository.java`](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ShopRepository.java) (Shop repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["Shop workspace<br/>[App.jsx]"]
  node_login["Login screen<br/>[Login.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_pdf["Bill PDF<br/>[generateBillPdf.js]"]
end

subgraph group_identity["Identity and access"]
  node_authcontroller["Auth routes"]
  node_authservice["Account service<br/>[AuthService.java]"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_security["Security setup"]
end

subgraph group_billing["Billing domain"]
  node_billcontroller["Bill routes"]
  node_billservice["Bill operations<br/>[BillService.java]"]
  node_billdata["Bill entities"]
  node_billrepos["Bill repositories"]
  node_billmappers["Bill mappers"]
end

subgraph group_catalogue["Shop operations"]
  node_itemcontroller["Item routes"]
  node_itemservice["Catalogue service<br/>[ItemService.java]"]
  node_shopcontroller["Shop profile routes"]
  node_shopservice["Shop profile service"]
  node_itemmapper["Item mapper<br/>[ItemMapper.java]"]
  node_itemrepo["Item repository"]
end

subgraph group_persistence["Persistence"]
  node_shoprepo["Shop repository"]
  node_userrepo["User repository"]
  node_database[("Relational database")]
end

node_user(("Shop user"))
node_backend{{"Billing API"}}

node_user -->|"uses"| node_app
node_user -->|"signs in"| node_login
node_app -->|"requests data"| node_api
node_login -->|"authenticates via"| node_api
node_app -->|"generates bill"| node_pdf
node_api -->|"sends HTTP requests"| node_backend
node_authcontroller -.->|"delegates to"| node_authservice
node_authservice -->|"generates token"| node_jwt
node_authservice -->|"reads and saves users"| node_userrepo
node_authservice -->|"saves shop"| node_shoprepo
node_security -.->|"configures JWT"| node_jwt
node_billcontroller -->|"delegates bill work"| node_billservice
node_billservice -->|"reads and writes"| node_billrepos
node_billservice -->|"maps bill data"| node_billmappers
node_billservice -->|"builds audit snapshots"| node_billdata
node_itemcontroller -->|"delegates catalogue work"| node_itemservice
node_itemservice -->|"reads and saves items"| node_itemrepo
node_itemservice -->|"loads shop"| node_shoprepo
node_itemservice -->|"maps item data"| node_itemmapper
node_shopcontroller -.->|"delegates profile work"| node_shopservice
node_shopservice -->|"loads shop profile"| node_shoprepo
node_billrepos -.->|"persists records"| node_database
node_itemrepo -.->|"persists items"| node_database
node_shoprepo -.->|"persists shops"| node_database
node_userrepo -.->|"persists users"| node_database

click node_app "https://github.com/anish08-gh/billing-software/blob/main/frontend/src/App.jsx"
click node_login "https://github.com/anish08-gh/billing-software/blob/main/frontend/src/pages/Login.jsx"
click node_api "https://github.com/anish08-gh/billing-software/blob/main/frontend/src/services/api.js"
click node_pdf "https://github.com/anish08-gh/billing-software/blob/main/frontend/src/utils/generateBillPdf.js"
click node_authcontroller "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/AuthController.java"
click node_authservice "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java"
click node_jwt "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Security/JwtService.java"
click node_security "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Config/SecurityConfig.java"
click node_billcontroller "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/BillController.java"
click node_billservice "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java"
click node_billdata "https://github.com/anish08-gh/billing-software/tree/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Entity"
click node_billrepos "https://github.com/anish08-gh/billing-software/tree/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository"
click node_billmappers "https://github.com/anish08-gh/billing-software/tree/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Mapper/bill"
click node_itemcontroller "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ItemController.java"
click node_itemservice "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java"
click node_shopcontroller "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ShopProfileController.java"
click node_shopservice "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ShopProfileService.java"
click node_itemmapper "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Mapper/item/ItemMapper.java"
click node_itemrepo "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ItemRepository.java"
click node_shoprepo "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ShopRepository.java"
click node_userrepo "https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/UserRepository.java"

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_login,node_api,node_pdf,node_user toneBlue
class node_authcontroller,node_authservice,node_jwt,node_security toneAmber
class node_billcontroller,node_billservice,node_billdata,node_billrepos,node_billmappers,node_backend toneMint
class node_itemcontroller,node_itemservice,node_shopcontroller,node_shopservice,node_itemmapper,node_itemrepo toneRose
class node_shoprepo,node_userrepo,node_database toneIndigo
```

## Components

### Web application

- [Shop workspace](https://github.com/anish08-gh/billing-software/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login screen](https://github.com/anish08-gh/billing-software/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [API client](https://github.com/anish08-gh/billing-software/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Bill PDF](https://github.com/anish08-gh/billing-software/blob/main/frontend/src/utils/generateBillPdf.js): `frontend/src/utils/generateBillPdf.js`

### Identity and access

- [Auth routes](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/AuthController.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/AuthController.java`
- [Account service](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java`
- [JWT service](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Security/JwtService.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Security/JwtService.java`
- [Security setup](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Config/SecurityConfig.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Config/SecurityConfig.java`

### Billing domain

- [Bill routes](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/BillController.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/BillController.java`
- [Bill operations](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java`
- [Bill entities](https://github.com/anish08-gh/billing-software/tree/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Entity): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Entity`
- [Bill repositories](https://github.com/anish08-gh/billing-software/tree/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository`
- [Bill mappers](https://github.com/anish08-gh/billing-software/tree/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Mapper/bill): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Mapper/bill`

### Shop operations

- [Item routes](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ItemController.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ItemController.java`
- [Catalogue service](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java`
- [Shop profile routes](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ShopProfileController.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ShopProfileController.java`
- [Shop profile service](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ShopProfileService.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ShopProfileService.java`
- [Item mapper](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Mapper/item/ItemMapper.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Mapper/item/ItemMapper.java`
- [Item repository](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ItemRepository.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ItemRepository.java`

### Persistence

- [Shop repository](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ShopRepository.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/ShopRepository.java`
- [User repository](https://github.com/anish08-gh/billing-software/blob/main/Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/UserRepository.java): `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Repository/UserRepository.java`
- **Relational database**

### Other components

- **Shop user**
- **Billing API**

## Connections

- Shop user → Shop workspace: uses
- Shop user → Login screen: signs in
- Shop workspace → API client: requests data (evidence: `frontend/src/App.jsx`)
- Login screen → API client: authenticates via (evidence: `frontend/src/pages/Login.jsx`)
- Shop workspace → Bill PDF: generates bill (evidence: `frontend/src/App.jsx`)
- API client → Billing API: sends HTTP requests (evidence: `frontend/src/services/api.js`)
- Auth routes → Account service: delegates to (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/AuthController.java`)
- Account service → JWT service: generates token (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java`)
- Account service → User repository: reads and saves users (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java`)
- Account service → Shop repository: saves shop (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/AuthService.java`)
- Security setup → JWT service: configures JWT
- Bill routes → Bill operations: delegates bill work (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/BillController.java`)
- Bill operations → Bill repositories: reads and writes (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java`)
- Bill operations → Bill mappers: maps bill data (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java`)
- Bill operations → Bill entities: builds audit snapshots (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/BillService.java`)
- Item routes → Catalogue service: delegates catalogue work (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ItemController.java`)
- Catalogue service → Item repository: reads and saves items (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java`)
- Catalogue service → Shop repository: loads shop (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java`)
- Catalogue service → Item mapper: maps item data (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ItemService.java`)
- Shop profile routes → Shop profile service: delegates profile work (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Controller/ShopProfileController.java`)
- Shop profile service → Shop repository: loads shop profile (evidence: `Backend/BillingSoftware/src/main/java/com/shreedatta/BillingSoftware/Service/ShopProfileService.java`)
- Bill repositories → Relational database: persists records
- Item repository → Relational database: persists items
- Shop repository → Relational database: persists shops
- User repository → Relational database: persists users
