# danjumahh/in-store architecture

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

- Interactive diagram: https://gitdiagram.com/danjumahh/in-store
- Repository: https://github.com/danjumahh/in-store

## Overview

StoreManagement is an ASP.NET Core store-management application. Staff authenticate, maintain catalog and business records, create and manage customer orders, and review dashboard summaries; orders can also use Paystack payment handling and generate receipts. The sampled services show product and order persistence through Entity Framework, including stock movement recording. The tree also shows identity, email, and supporting CRUD services, but their detailed runtime wiring is not fully sampled, so those connections are omitted where evidence is unavailable.

Main entry points: [`StoreManagement/Data/ApplicationDbContext.cs`](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Data/ApplicationDbContext.cs) (Application database), [`StoreManagement/Controllers/OrderController.cs`](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/OrderController.cs) (Order handling), [`StoreManagement/Services/OrderService.cs`](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/OrderService.cs) (Order operations), [`StoreManagement/Services/ProductService.cs`](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/ProductService.cs) (Product operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and operations"]
  node_identity["Identity accounts"]
  node_account["Account management"]
  node_dashboard["Dashboard"]
end

subgraph group_commerce["Sales and payments"]
  node_order_controller["Order handling<br/>[OrderController.cs]"]
  node_order_service["Order operations<br/>[OrderService.cs]"]
  node_paystack_service["Paystack payments<br/>[PaystackService.cs]"]
  node_receipt_model["Receipt view model"]
end

subgraph group_catalog["Catalog and stock"]
  node_product_controller["Product management"]
  node_product_service["Product operations<br/>[ProductService.cs]"]
  node_category["Category management"]
end

subgraph group_records["Business records"]
  node_customer["Customer management"]
  node_supplier["Supplier management"]
  node_shipper["Shipper management"]
  node_staff["Staff management<br/>[StaffController.cs]"]
  node_email["Email delivery<br/>[EmailService.cs]"]
end

subgraph group_persistence["Data and domain"]
  node_order_models["Order records<br/>[Order.cs]"]
  node_order_detail["Order items<br/>[OrderDetail.cs]"]
  node_order_status["Order and payment states<br/>[OrderStatus.cs]"]
  node_product_model["Product and stock<br/>[Product.cs]"]
  node_user_model["Application identity<br/>[AppUser.cs]"]
  node_customer_model["Customer records<br/>[Customer.cs]"]
  node_staff_model["Staff records<br/>[Staff.cs]"]
  node_shipper_model["Shipper records<br/>[Shipper.cs]"]
  node_supplier_model["Supplier records<br/>[Supplier.cs]"]
  node_category_model["Category records<br/>[Category.cs]"]
  node_db[("Application database")]
end

node_staff_actor(("Store staff"))
node_paystack["Paystack"]

node_staff_actor -->|"signs in"| node_identity
node_staff_actor -.->|"manages orders"| node_order_controller
node_order_controller -->|"requests order operations"| node_order_service
node_order_controller -->|"loads payment orders"| node_db
node_order_controller -->|"verifies payment"| node_paystack_service
node_paystack_service -.->|"uses payment API"| node_paystack
node_order_service -->|"reads and writes"| node_db
node_order_service -->|"builds receipt"| node_receipt_model
node_db -->|"persists"| node_order_models
node_db -->|"persists"| node_order_detail
node_db -->|"persists"| node_product_model
node_db -->|"stores identity"| node_user_model
node_db -->|"persists"| node_customer_model
node_db -->|"persists"| node_staff_model
node_db -->|"persists"| node_shipper_model
node_db -->|"persists"| node_supplier_model
node_db -->|"persists"| node_category_model
node_product_controller -->|"requests catalog operations"| node_product_service
node_product_service -->|"reads and writes"| node_db
node_product_service -->|"records stock changes"| node_product_model
node_category -.->|"uses category service"| node_db
node_customer -->|"reads and writes"| node_db
node_staff -->|"requests credentials email"| node_email
node_staff -.->|"delegates staff operations"| node_db
node_dashboard -.->|"requests dashboard data"| node_order_service

click node_identity "https://github.com/danjumahh/in-store/tree/master/StoreManagement/Areas/Identity/Pages/Account"
click node_account "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/AccountController.cs"
click node_dashboard "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/DashboardController.cs"
click node_order_controller "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/OrderController.cs"
click node_order_service "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/OrderService.cs"
click node_paystack_service "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/PaystackService.cs"
click node_order_models "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Order.cs"
click node_order_detail "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/OrderDetail.cs"
click node_order_status "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Enums/OrderStatus.cs"
click node_receipt_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/ViewModels/ReceiptViewModel.cs"
click node_product_controller "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/ProductController.cs"
click node_product_service "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/ProductService.cs"
click node_product_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Product.cs"
click node_category "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/CategoryController.cs"
click node_customer "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/CustomerController.cs"
click node_supplier "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/SupplierController.cs"
click node_shipper "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/ShipperController.cs"
click node_staff "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/StaffController.cs"
click node_email "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/EmailService.cs"
click node_user_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/AppUser.cs"
click node_customer_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Customer.cs"
click node_staff_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Staff.cs"
click node_shipper_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Shipper.cs"
click node_supplier_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Supplier.cs"
click node_category_model "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Category.cs"
click node_db "https://github.com/danjumahh/in-store/blob/master/StoreManagement/Data/ApplicationDbContext.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_identity,node_account,node_dashboard toneBlue
class node_order_controller,node_order_service,node_paystack_service,node_receipt_model toneAmber
class node_product_controller,node_product_service,node_category toneMint
class node_customer,node_supplier,node_shipper,node_staff,node_email toneRose
class node_order_models,node_order_detail,node_order_status,node_product_model,node_user_model,node_customer_model,node_staff_model,node_shipper_model,node_supplier_model,node_category_model,node_db,node_staff_actor,node_paystack toneIndigo
```

## Components

### Access and operations

- [Identity accounts](https://github.com/danjumahh/in-store/tree/master/StoreManagement/Areas/Identity/Pages/Account): `StoreManagement/Areas/Identity/Pages/Account`
- [Account management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/AccountController.cs): `StoreManagement/Controllers/AccountController.cs`
- [Dashboard](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/DashboardController.cs): `StoreManagement/Controllers/DashboardController.cs`

### Sales and payments

- [Order handling](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/OrderController.cs): `StoreManagement/Controllers/OrderController.cs`
- [Order operations](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/OrderService.cs): `StoreManagement/Services/OrderService.cs`
- [Paystack payments](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/PaystackService.cs): `StoreManagement/Services/PaystackService.cs`
- [Receipt view model](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/ViewModels/ReceiptViewModel.cs): `StoreManagement/Models/ViewModels/ReceiptViewModel.cs`

### Catalog and stock

- [Product management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/ProductController.cs): `StoreManagement/Controllers/ProductController.cs`
- [Product operations](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/ProductService.cs): `StoreManagement/Services/ProductService.cs`
- [Category management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/CategoryController.cs): `StoreManagement/Controllers/CategoryController.cs`

### Business records

- [Customer management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/CustomerController.cs): `StoreManagement/Controllers/CustomerController.cs`
- [Supplier management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/SupplierController.cs): `StoreManagement/Controllers/SupplierController.cs`
- [Shipper management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/ShipperController.cs): `StoreManagement/Controllers/ShipperController.cs`
- [Staff management](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Controllers/StaffController.cs): `StoreManagement/Controllers/StaffController.cs`
- [Email delivery](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Services/EmailService.cs): `StoreManagement/Services/EmailService.cs`

### Data and domain

- [Order records](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Order.cs): `StoreManagement/Models/Entities/Order.cs`
- [Order items](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/OrderDetail.cs): `StoreManagement/Models/Entities/OrderDetail.cs`
- [Order and payment states](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Enums/OrderStatus.cs): `StoreManagement/Models/Enums/OrderStatus.cs`
- [Product and stock](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Product.cs): `StoreManagement/Models/Entities/Product.cs`
- [Application identity](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/AppUser.cs): `StoreManagement/Models/AppUser.cs`
- [Customer records](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Customer.cs): `StoreManagement/Models/Entities/Customer.cs`
- [Staff records](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Staff.cs): `StoreManagement/Models/Entities/Staff.cs`
- [Shipper records](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Shipper.cs): `StoreManagement/Models/Entities/Shipper.cs`
- [Supplier records](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Supplier.cs): `StoreManagement/Models/Entities/Supplier.cs`
- [Category records](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Models/Entities/Category.cs): `StoreManagement/Models/Entities/Category.cs`
- [Application database](https://github.com/danjumahh/in-store/blob/master/StoreManagement/Data/ApplicationDbContext.cs): `StoreManagement/Data/ApplicationDbContext.cs`

### Other components

- **Store staff**
- **Paystack**

## Connections

- Store staff → Identity accounts: signs in (evidence: `StoreManagement/Areas/Identity/Pages/Account/Login.cshtml.cs`)
- Store staff → Order handling: manages orders
- Order handling → Order operations: requests order operations (evidence: `StoreManagement/Controllers/OrderController.cs`)
- Order handling → Application database: loads payment orders (evidence: `StoreManagement/Controllers/OrderController.cs`)
- Order handling → Paystack payments: verifies payment (evidence: `StoreManagement/Controllers/OrderController.cs`)
- Paystack payments → Paystack: uses payment API
- Order operations → Application database: reads and writes (evidence: `StoreManagement/Services/OrderService.cs`)
- Order operations → Receipt view model: builds receipt (evidence: `StoreManagement/Services/OrderService.cs`)
- Application database → Order records: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Order items: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Product and stock: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Application identity: stores identity (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Customer records: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Staff records: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Shipper records: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Supplier records: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Application database → Category records: persists (evidence: `StoreManagement/Data/ApplicationDbContext.cs`)
- Product management → Product operations: requests catalog operations (evidence: `StoreManagement/Controllers/ProductController.cs`)
- Product operations → Application database: reads and writes (evidence: `StoreManagement/Services/ProductService.cs`)
- Product operations → Product and stock: records stock changes (evidence: `StoreManagement/Services/ProductService.cs`)
- Category management → Application database: uses category service
- Customer management → Application database: reads and writes (evidence: `StoreManagement/Controllers/CustomerController.cs`)
- Staff management → Email delivery: requests credentials email (evidence: `StoreManagement/Controllers/StaffController.cs`)
- Staff management → Application database: delegates staff operations
- Dashboard → Order operations: requests dashboard data
