# saimahmt03/logitrack architecture

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

- Interactive diagram: https://gitdiagram.com/saimahmt03/logitrack
- Repository: https://github.com/saimahmt03/logitrack

## Overview

LogiTrack is an ASP.NET service for inventory, order management, and user authentication. Its workflows accept API requests, delegate business operations to services, and use an EF Core context for persistent state; authentication also issues JWTs. The graph includes documented cache and hosting concerns. Source excerpts show service-to-storage behavior, but the README is empty and several runtime files were not excerpted, so uncertain routing and cache-refresh relationships are omitted.

Main entry points: [`Data/LogiTrackContext.cs`](https://github.com/saimahmt03/logitrack/blob/master/Data/LogiTrackContext.cs) (EF context), [`Program.cs`](https://github.com/saimahmt03/logitrack/blob/master/Program.cs) (Application host), [`Service/ServiceOrder.cs`](https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceOrder.cs) (Order operations), [`Service/ServiceAuth.cs`](https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceAuth.cs) (User auth)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API surface"]
  node_auth_api["Auth endpoints"]
  node_inventory_api["Inventory endpoints"]
  node_orders_api["Order endpoints<br/>[OrdeController.cs]"]
end

subgraph group_services["Business services"]
  node_auth_service["User auth<br/>[ServiceAuth.cs]"]
  node_inventory_service["Inventory operations"]
  node_order_service["Order operations<br/>[ServiceOrder.cs]"]
  node_auth_contract["Auth contract<br/>[IServiceAuth.cs]"]
  node_inventory_contract["Inventory contract"]
  node_order_contract["Order contract<br/>[IServiceOrder.cs]"]
end

subgraph group_data["Persistence and cache"]
  node_db_context[("EF context")]
  node_cache_service["Data cache"]
  node_cache_refresh["Cache refresh"]
  node_inventory_model["Inventory item<br/>[InventoryItem.cs]"]
  node_order_model["Order<br/>[Order.cs]"]
  node_ordered_item["Ordered item<br/>[OrderedItem.cs]"]
  node_user_model["User<br/>[User.cs]"]
  node_user_type["User type<br/>[UserType.cs]"]
end

subgraph group_auth["Authentication"]
  node_jwt_manager["JWT manager<br/>[JwtManager.cs]"]
  node_token_result["Token result<br/>[TokenResult.cs]"]
end

subgraph group_runtime["Runtime support"]
  node_host["Application host<br/>[Program.cs]"]
  node_result_handling["Result handling<br/>[ExceptionHelper.cs]"]
  node_logging["Request logging"]
  node_seeder["Data seeding<br/>[DataSeeder.cs]"]
end

node_client(("API client"))

node_client -.->|"sends requests"| node_auth_api
node_client -.->|"sends requests"| node_inventory_api
node_client -.->|"sends requests"| node_orders_api
node_auth_api -->|"calls"| node_auth_contract
node_inventory_api -->|"calls"| node_inventory_contract
node_orders_api -->|"calls"| node_order_contract
node_auth_service -->|"reads and writes"| node_db_context
node_auth_service -->|"requests token"| node_jwt_manager
node_jwt_manager -->|"reads user type"| node_db_context
node_jwt_manager -->|"returns token"| node_token_result
node_inventory_service -->|"reads and writes"| node_db_context
node_order_service -->|"reads and writes"| node_db_context
node_order_service -->|"creates and queries"| node_order_model
node_order_service -->|"creates"| node_ordered_item
node_db_context -->|"maps"| node_inventory_model
node_db_context -->|"maps"| node_order_model
node_db_context -->|"maps"| node_ordered_item
node_db_context -->|"maps"| node_user_model
node_db_context -->|"maps"| node_user_type
node_cache_service -->|"loads data"| node_db_context
node_cache_refresh -->|"uses contract"| node_cache_service
node_host -->|"configures"| node_db_context
node_host -->|"registers"| node_auth_service
node_host -->|"registers"| node_inventory_service
node_host -->|"registers"| node_order_service
node_host -->|"registers"| node_cache_service
node_host -->|"registers"| node_cache_refresh
node_host -->|"configures"| node_logging
node_auth_service -->|"maps exceptions"| node_result_handling
node_inventory_service -->|"maps exceptions"| node_result_handling
node_order_service -->|"maps exceptions"| node_result_handling

click node_auth_api "https://github.com/saimahmt03/logitrack/blob/master/Controller/AuthServiceController.cs"
click node_inventory_api "https://github.com/saimahmt03/logitrack/blob/master/Controller/InventoryItemController.cs"
click node_orders_api "https://github.com/saimahmt03/logitrack/blob/master/Controller/OrdeController.cs"
click node_auth_service "https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceAuth.cs"
click node_inventory_service "https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceInventoryItem.cs"
click node_order_service "https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceOrder.cs"
click node_auth_contract "https://github.com/saimahmt03/logitrack/blob/master/Service/IServiceAuth.cs"
click node_inventory_contract "https://github.com/saimahmt03/logitrack/blob/master/Service/IServiceInventoryItem.cs"
click node_order_contract "https://github.com/saimahmt03/logitrack/blob/master/Service/IServiceOrder.cs"
click node_db_context "https://github.com/saimahmt03/logitrack/blob/master/Data/LogiTrackContext.cs"
click node_cache_service "https://github.com/saimahmt03/logitrack/blob/master/Service/DataCacheService.cs"
click node_cache_refresh "https://github.com/saimahmt03/logitrack/blob/master/Extension/CacheRefreshService.cs"
click node_inventory_model "https://github.com/saimahmt03/logitrack/blob/master/Model/InventoryItem.cs"
click node_order_model "https://github.com/saimahmt03/logitrack/blob/master/Model/Order.cs"
click node_ordered_item "https://github.com/saimahmt03/logitrack/blob/master/Model/OrderedItem.cs"
click node_user_model "https://github.com/saimahmt03/logitrack/blob/master/Model/User.cs"
click node_user_type "https://github.com/saimahmt03/logitrack/blob/master/Model/UserType.cs"
click node_jwt_manager "https://github.com/saimahmt03/logitrack/blob/master/Utilities/JwtManager.cs"
click node_token_result "https://github.com/saimahmt03/logitrack/blob/master/Utilities/TokenResult.cs"
click node_host "https://github.com/saimahmt03/logitrack/blob/master/Program.cs"
click node_result_handling "https://github.com/saimahmt03/logitrack/blob/master/Common/ExceptionHelper.cs"
click node_logging "https://github.com/saimahmt03/logitrack/blob/master/Middleware/RequestLoggingMiddleware.CS"
click node_seeder "https://github.com/saimahmt03/logitrack/blob/master/Utilities/DataSeeder.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_auth_api,node_inventory_api,node_orders_api,node_client toneBlue
class node_auth_service,node_inventory_service,node_order_service,node_auth_contract,node_inventory_contract,node_order_contract toneAmber
class node_db_context,node_cache_service,node_cache_refresh,node_inventory_model,node_order_model,node_ordered_item,node_user_model,node_user_type toneMint
class node_jwt_manager,node_token_result toneRose
class node_host,node_result_handling,node_logging,node_seeder toneIndigo
```

## Components

### API surface

- [Auth endpoints](https://github.com/saimahmt03/logitrack/blob/master/Controller/AuthServiceController.cs): `Controller/AuthServiceController.cs`
- [Inventory endpoints](https://github.com/saimahmt03/logitrack/blob/master/Controller/InventoryItemController.cs): `Controller/InventoryItemController.cs`
- [Order endpoints](https://github.com/saimahmt03/logitrack/blob/master/Controller/OrdeController.cs): `Controller/OrdeController.cs`

### Business services

- [User auth](https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceAuth.cs): `Service/ServiceAuth.cs`
- [Inventory operations](https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceInventoryItem.cs): `Service/ServiceInventoryItem.cs`
- [Order operations](https://github.com/saimahmt03/logitrack/blob/master/Service/ServiceOrder.cs): `Service/ServiceOrder.cs`
- [Auth contract](https://github.com/saimahmt03/logitrack/blob/master/Service/IServiceAuth.cs): `Service/IServiceAuth.cs`
- [Inventory contract](https://github.com/saimahmt03/logitrack/blob/master/Service/IServiceInventoryItem.cs): `Service/IServiceInventoryItem.cs`
- [Order contract](https://github.com/saimahmt03/logitrack/blob/master/Service/IServiceOrder.cs): `Service/IServiceOrder.cs`

### Persistence and cache

- [EF context](https://github.com/saimahmt03/logitrack/blob/master/Data/LogiTrackContext.cs): `Data/LogiTrackContext.cs`
- [Data cache](https://github.com/saimahmt03/logitrack/blob/master/Service/DataCacheService.cs): `Service/DataCacheService.cs`
- [Cache refresh](https://github.com/saimahmt03/logitrack/blob/master/Extension/CacheRefreshService.cs): `Extension/CacheRefreshService.cs`
- [Inventory item](https://github.com/saimahmt03/logitrack/blob/master/Model/InventoryItem.cs): `Model/InventoryItem.cs`
- [Order](https://github.com/saimahmt03/logitrack/blob/master/Model/Order.cs): `Model/Order.cs`
- [Ordered item](https://github.com/saimahmt03/logitrack/blob/master/Model/OrderedItem.cs): `Model/OrderedItem.cs`
- [User](https://github.com/saimahmt03/logitrack/blob/master/Model/User.cs): `Model/User.cs`
- [User type](https://github.com/saimahmt03/logitrack/blob/master/Model/UserType.cs): `Model/UserType.cs`

### Authentication

- [JWT manager](https://github.com/saimahmt03/logitrack/blob/master/Utilities/JwtManager.cs): `Utilities/JwtManager.cs`
- [Token result](https://github.com/saimahmt03/logitrack/blob/master/Utilities/TokenResult.cs): `Utilities/TokenResult.cs`

### Runtime support

- [Application host](https://github.com/saimahmt03/logitrack/blob/master/Program.cs): `Program.cs`
- [Result handling](https://github.com/saimahmt03/logitrack/blob/master/Common/ExceptionHelper.cs): `Common/ExceptionHelper.cs`
- [Request logging](https://github.com/saimahmt03/logitrack/blob/master/Middleware/RequestLoggingMiddleware.CS): `Middleware/RequestLoggingMiddleware.CS`
- [Data seeding](https://github.com/saimahmt03/logitrack/blob/master/Utilities/DataSeeder.cs): `Utilities/DataSeeder.cs`

### Other components

- **API client**

## Connections

- API client → Auth endpoints: sends requests
- API client → Inventory endpoints: sends requests
- API client → Order endpoints: sends requests
- Auth endpoints → Auth contract: calls (evidence: `Controller/AuthServiceController.cs`)
- Inventory endpoints → Inventory contract: calls (evidence: `Controller/InventoryItemController.cs`)
- Order endpoints → Order contract: calls (evidence: `Controller/OrdeController.cs`)
- User auth → EF context: reads and writes (evidence: `Service/ServiceAuth.cs`)
- User auth → JWT manager: requests token (evidence: `Service/ServiceAuth.cs`)
- JWT manager → EF context: reads user type (evidence: `Utilities/JwtManager.cs`)
- JWT manager → Token result: returns token (evidence: `Utilities/JwtManager.cs`)
- Inventory operations → EF context: reads and writes (evidence: `Service/ServiceInventoryItem.cs`)
- Order operations → EF context: reads and writes (evidence: `Service/ServiceOrder.cs`)
- Order operations → Order: creates and queries (evidence: `Service/ServiceOrder.cs`)
- Order operations → Ordered item: creates (evidence: `Service/ServiceOrder.cs`)
- EF context → Inventory item: maps (evidence: `Data/LogiTrackContext.cs`)
- EF context → Order: maps (evidence: `Data/LogiTrackContext.cs`)
- EF context → Ordered item: maps (evidence: `Data/LogiTrackContext.cs`)
- EF context → User: maps (evidence: `Data/LogiTrackContext.cs`)
- EF context → User type: maps (evidence: `Data/LogiTrackContext.cs`)
- Data cache → EF context: loads data (evidence: `Service/DataCacheService.cs`)
- Cache refresh → Data cache: uses contract (evidence: `Extension/CacheRefreshService.cs`)
- Application host → EF context: configures (evidence: `Program.cs`)
- Application host → User auth: registers (evidence: `Program.cs`)
- Application host → Inventory operations: registers (evidence: `Program.cs`)
- Application host → Order operations: registers (evidence: `Program.cs`)
- Application host → Data cache: registers (evidence: `Program.cs`)
- Application host → Cache refresh: registers (evidence: `Program.cs`)
- Application host → Request logging: configures (evidence: `Program.cs`)
- User auth → Result handling: maps exceptions (evidence: `Service/ServiceAuth.cs`)
- Inventory operations → Result handling: maps exceptions (evidence: `Service/ServiceInventoryItem.cs`)
- Order operations → Result handling: maps exceptions (evidence: `Service/ServiceOrder.cs`)
