# richyizhao/inventory-tracker-app architecture

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

- Interactive diagram: https://gitdiagram.com/richyizhao/inventory-tracker-app
- Repository: https://github.com/richyizhao/inventory-tracker-app

## Overview

Inventory Tracker is a web application for managing a product catalog, categories, stock movements, users and permissions, with dashboard and analytics views. Users interact through the React client, which sends requests to the ASP.NET API; the API persists domain records in PostgreSQL. The backend also handles authentication, image storage and demo-data operations. The graph follows the documented product capabilities and repository paths; detailed wiring between unsampled feature modules is summarized at subsystem level.

Main entry points: [`client/src/lib/api.ts`](https://github.com/richyizhao/inventory-tracker-app/blob/main/client/src/lib/api.ts) (API client), [`client/src/app/routes`](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/app/routes) (App routes), [`server/src/Data/AppDbContext.cs`](https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Data/AppDbContext.cs) (Application database), [`server/src/Authentication/Endpoints`](https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Authentication/Endpoints) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["App shell<br/>[app.tsx]"]
  node_routes["App routes"]
  node_authui["Authentication UI"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_domain["Inventory operations"]
  node_catalog["Catalog management"]
  node_categories["Category management"]
  node_transactions["Stock movements"]
  node_users_roles["Users and roles"]
end

subgraph group_insights["Insights and settings"]
  node_dashboard["Dashboard"]
  node_analytics["Analytics"]
  node_settings["Demo data"]
end

subgraph group_server["ASP.NET API"]
  node_auth_api["Auth endpoints"]
  node_domain_api["Domain endpoints"]
  node_analytics_api["Analytics endpoints"]
  node_dashboard_api["Dashboard endpoint"]
  node_permissions["Access controls"]
  node_image_storage["Image storage"]
  node_jwt["JWT authentication<br/>[Jwt.cs]"]
end

subgraph group_persistence["Persistence and integrations"]
  node_database[("Application database<br/>[AppDbContext.cs]")]
  node_postgres[("PostgreSQL")]
  node_blob[("Azure Blob Storage")]
  node_local_files[("Local image files")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"offers sign-in"| node_authui
node_authui -->|"sends requests"| node_api_client
node_routes -->|"opens"| node_catalog
node_routes -->|"opens"| node_categories
node_routes -->|"opens"| node_transactions
node_routes -->|"opens"| node_users_roles
node_routes -->|"opens"| node_dashboard
node_routes -->|"opens"| node_analytics
node_routes -->|"opens"| node_settings
node_catalog -->|"sends requests"| node_api_client
node_categories -->|"sends requests"| node_api_client
node_transactions -->|"sends requests"| node_api_client
node_users_roles -->|"sends requests"| node_api_client
node_dashboard -->|"sends requests"| node_api_client
node_analytics -->|"sends requests"| node_api_client
node_settings -->|"sends requests"| node_api_client
node_api_client -->|"calls"| node_auth_api
node_api_client -->|"calls"| node_domain_api
node_api_client -->|"calls"| node_analytics_api
node_api_client -->|"calls"| node_dashboard_api
node_domain_api -->|"checks access"| node_permissions
node_domain_api -->|"reads and writes"| node_database
node_analytics_api -->|"reads"| node_database
node_dashboard_api -->|"reads"| node_database
node_auth_api -->|"reads and writes"| node_database
node_auth_api -->|"issues tokens"| node_jwt
node_image_storage -.->|"stores images"| node_blob
node_image_storage -->|"stores images"| node_local_files
node_database -->|"persists data"| node_postgres

click node_app "https://github.com/richyizhao/inventory-tracker-app/blob/main/client/src/app/app.tsx"
click node_routes "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/app/routes"
click node_authui "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/auth"
click node_api_client "https://github.com/richyizhao/inventory-tracker-app/blob/main/client/src/lib/api.ts"
click node_catalog "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/products"
click node_categories "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/categories"
click node_transactions "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/transactions"
click node_users_roles "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/users"
click node_dashboard "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/dashboard"
click node_analytics "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/analytics"
click node_settings "https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/settings"
click node_auth_api "https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Authentication/Endpoints"
click node_domain_api "https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src"
click node_analytics_api "https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Analytics/Endpoints"
click node_dashboard_api "https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Dashboard/Endpoints/GetDashboardOverview.cs"
click node_permissions "https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Common/Api/Filters"
click node_image_storage "https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Products/Services"
click node_database "https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Data/AppDbContext.cs"
click node_jwt "https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Authentication/Services/Jwt.cs"

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_routes,node_authui,node_api_client,node_user toneBlue
class node_catalog,node_categories,node_transactions,node_users_roles toneAmber
class node_dashboard,node_analytics,node_settings toneMint
class node_auth_api,node_domain_api,node_analytics_api,node_dashboard_api,node_permissions,node_image_storage,node_jwt toneRose
class node_database,node_postgres,node_blob,node_local_files toneIndigo
```

## Components

### React client

- [App shell](https://github.com/richyizhao/inventory-tracker-app/blob/main/client/src/app/app.tsx): `client/src/app/app.tsx`
- [App routes](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/app/routes): `client/src/app/routes`
- [Authentication UI](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/auth): `client/src/features/auth`
- [API client](https://github.com/richyizhao/inventory-tracker-app/blob/main/client/src/lib/api.ts): `client/src/lib/api.ts`

### Inventory operations

- [Catalog management](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/products): `client/src/features/products`
- [Category management](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/categories): `client/src/features/categories`
- [Stock movements](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/transactions): `client/src/features/transactions`
- [Users and roles](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/users): `client/src/features/users`

### Insights and settings

- [Dashboard](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/dashboard): `client/src/features/dashboard`
- [Analytics](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/analytics): `client/src/features/analytics`
- [Demo data](https://github.com/richyizhao/inventory-tracker-app/tree/main/client/src/features/settings): `client/src/features/settings`

### ASP.NET API

- [Auth endpoints](https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Authentication/Endpoints): `server/src/Authentication/Endpoints`
- [Domain endpoints](https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src): `server/src`
- [Analytics endpoints](https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Analytics/Endpoints): `server/src/Analytics/Endpoints`
- [Dashboard endpoint](https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Dashboard/Endpoints/GetDashboardOverview.cs): `server/src/Dashboard/Endpoints/GetDashboardOverview.cs`
- [Access controls](https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Common/Api/Filters): `server/src/Common/Api/Filters`
- [Image storage](https://github.com/richyizhao/inventory-tracker-app/tree/main/server/src/Products/Services): `server/src/Products/Services`
- [JWT authentication](https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Authentication/Services/Jwt.cs): `server/src/Authentication/Services/Jwt.cs`

### Persistence and integrations

- [Application database](https://github.com/richyizhao/inventory-tracker-app/blob/main/server/src/Data/AppDbContext.cs): `server/src/Data/AppDbContext.cs`
- **PostgreSQL**
- **Azure Blob Storage**
- **Local image files**

### Other components

- **User**

## Connections

- User → App shell: uses
- App shell → App routes: renders
- App routes → Authentication UI: offers sign-in
- Authentication UI → API client: sends requests
- App routes → Catalog management: opens
- App routes → Category management: opens
- App routes → Stock movements: opens
- App routes → Users and roles: opens
- App routes → Dashboard: opens
- App routes → Analytics: opens
- App routes → Demo data: opens
- Catalog management → API client: sends requests
- Category management → API client: sends requests
- Stock movements → API client: sends requests
- Users and roles → API client: sends requests
- Dashboard → API client: sends requests
- Analytics → API client: sends requests
- Demo data → API client: sends requests
- API client → Auth endpoints: calls
- API client → Domain endpoints: calls
- API client → Analytics endpoints: calls
- API client → Dashboard endpoint: calls
- Domain endpoints → Access controls: checks access
- Domain endpoints → Application database: reads and writes
- Analytics endpoints → Application database: reads
- Dashboard endpoint → Application database: reads
- Auth endpoints → Application database: reads and writes
- Auth endpoints → JWT authentication: issues tokens
- Image storage → Azure Blob Storage: stores images
- Image storage → Local image files: stores images
- Application database → PostgreSQL: persists data
