# prem-kumar-e/store architecture

> Architecture diagram of the GitHub repository prem-kumar-e/store, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prem-kumar-e/store
- Repository: https://github.com/prem-kumar-e/store

## Overview

Store is a Blazor Server point-of-sale and inventory application, with product/category management, barcode support, sales invoicing, transaction history, user administration, settings, and authentication. The likely user workflow is to manage catalog and stock, create a sale, and review invoices; the sampled invoice service confirms invoice persistence and stock deduction. The tree identifies the major UI areas, but their page-to-service calls are not shown in the sampled source, so those links are omitted. The graph includes the confirmed service-to-database layer and authentication API behavior.

Main entry points: [`StoreDBContext.cs`](https://github.com/prem-kumar-e/store/blob/master/StoreDBContext.cs) (EF data context), [`Services/UserService.cs`](https://github.com/prem-kumar-e/store/blob/master/Services/UserService.cs) (User management), [`Controller/AuthController.cs`](https://github.com/prem-kumar-e/store/blob/master/Controller/AuthController.cs) (Authentication API), [`Services/InvoiceService.cs`](https://github.com/prem-kumar-e/store/blob/master/Services/InvoiceService.cs) (Invoice processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Store interface"]
  node_product_ui["Product catalog<br/>[ProductList.razor]"]
  node_sales_ui["Sales checkout<br/>[Sales.razor]"]
  node_transactions_ui["Transactions<br/>[Transactions.razor]"]
  node_settings_ui["Store settings<br/>[Settings.razor]"]
  node_users_ui["User administration<br/>[Users.razor]"]
end

subgraph group_services["Business services"]
  node_product_service["Products and categories<br/>[ProdcutService.cs]"]
  node_invoice_service["Invoice processing<br/>[InvoiceService.cs]"]
  node_settings_service["Settings management<br/>[SettingsService.cs]"]
  node_user_service["User management<br/>[UserService.cs]"]
end

subgraph group_auth["Identity and API"]
  node_auth_controller["Authentication API<br/>[AuthController.cs]"]
  node_auth_state["Blazor auth state"]
  node_identity["ASP.NET Identity"]
end

subgraph group_persistence["Persistence"]
  node_db_context["EF data context<br/>[StoreDBContext.cs]"]
  node_sqlite[("SQLite store<br/>[store.db]")]
end

node_operator(("Store operator"))

node_operator -->|"manages catalog"| node_product_ui
node_operator -->|"records sales"| node_sales_ui
node_operator -->|"reviews invoices"| node_transactions_ui
node_operator -->|"configures store"| node_settings_ui
node_operator -->|"manages users"| node_users_ui
node_auth_controller -->|"signs in"| node_identity
node_auth_controller -->|"requests invoices"| node_invoice_service
node_user_service -->|"creates users"| node_identity
node_user_service -->|"authenticates"| node_identity
node_product_service -->|"reads and writes"| node_db_context
node_invoice_service -->|"reads and writes"| node_db_context
node_settings_service -->|"reads and writes"| node_db_context
node_db_context -->|"persists data"| node_sqlite

click node_product_ui "https://github.com/prem-kumar-e/store/blob/master/Pages/ProductList.razor"
click node_sales_ui "https://github.com/prem-kumar-e/store/blob/master/Pages/Sales.razor"
click node_transactions_ui "https://github.com/prem-kumar-e/store/blob/master/Pages/Transactions.razor"
click node_settings_ui "https://github.com/prem-kumar-e/store/blob/master/Pages/Settings.razor"
click node_users_ui "https://github.com/prem-kumar-e/store/blob/master/Pages/Users.razor"
click node_product_service "https://github.com/prem-kumar-e/store/blob/master/Services/ProdcutService.cs"
click node_invoice_service "https://github.com/prem-kumar-e/store/blob/master/Services/InvoiceService.cs"
click node_settings_service "https://github.com/prem-kumar-e/store/blob/master/Services/SettingsService.cs"
click node_user_service "https://github.com/prem-kumar-e/store/blob/master/Services/UserService.cs"
click node_auth_controller "https://github.com/prem-kumar-e/store/blob/master/Controller/AuthController.cs"
click node_auth_state "https://github.com/prem-kumar-e/store/blob/master/Services/CustomStateProvider.cs"
click node_db_context "https://github.com/prem-kumar-e/store/blob/master/StoreDBContext.cs"
click node_sqlite "https://github.com/prem-kumar-e/store/blob/master/wwwroot/App_Data/store.db"

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_product_ui,node_sales_ui,node_transactions_ui,node_settings_ui,node_users_ui toneBlue
class node_product_service,node_invoice_service,node_settings_service,node_user_service toneAmber
class node_auth_controller,node_auth_state,node_identity toneMint
class node_db_context,node_sqlite toneRose
class node_operator toneIndigo
```

## Components

### Store interface

- [Product catalog](https://github.com/prem-kumar-e/store/blob/master/Pages/ProductList.razor): `Pages/ProductList.razor`
- [Sales checkout](https://github.com/prem-kumar-e/store/blob/master/Pages/Sales.razor): `Pages/Sales.razor`
- [Transactions](https://github.com/prem-kumar-e/store/blob/master/Pages/Transactions.razor): `Pages/Transactions.razor`
- [Store settings](https://github.com/prem-kumar-e/store/blob/master/Pages/Settings.razor): `Pages/Settings.razor`
- [User administration](https://github.com/prem-kumar-e/store/blob/master/Pages/Users.razor): `Pages/Users.razor`

### Business services

- [Products and categories](https://github.com/prem-kumar-e/store/blob/master/Services/ProdcutService.cs): `Services/ProdcutService.cs`
- [Invoice processing](https://github.com/prem-kumar-e/store/blob/master/Services/InvoiceService.cs): `Services/InvoiceService.cs`
- [Settings management](https://github.com/prem-kumar-e/store/blob/master/Services/SettingsService.cs): `Services/SettingsService.cs`
- [User management](https://github.com/prem-kumar-e/store/blob/master/Services/UserService.cs): `Services/UserService.cs`

### Identity and API

- [Authentication API](https://github.com/prem-kumar-e/store/blob/master/Controller/AuthController.cs): `Controller/AuthController.cs`
- [Blazor auth state](https://github.com/prem-kumar-e/store/blob/master/Services/CustomStateProvider.cs): `Services/CustomStateProvider.cs`
- **ASP.NET Identity**

### Persistence

- [EF data context](https://github.com/prem-kumar-e/store/blob/master/StoreDBContext.cs): `StoreDBContext.cs`
- [SQLite store](https://github.com/prem-kumar-e/store/blob/master/wwwroot/App_Data/store.db): `wwwroot/App_Data/store.db`

### Other components

- **Store operator**

## Connections

- Store operator → Product catalog: manages catalog
- Store operator → Sales checkout: records sales
- Store operator → Transactions: reviews invoices
- Store operator → Store settings: configures store
- Store operator → User administration: manages users
- Authentication API → ASP.NET Identity: signs in
- Authentication API → Invoice processing: requests invoices
- User management → ASP.NET Identity: creates users
- User management → ASP.NET Identity: authenticates
- Products and categories → EF data context: reads and writes
- Invoice processing → EF data context: reads and writes
- Settings management → EF data context: reads and writes
- EF data context → SQLite store: persists data
