# tamekhanh/atlas-business architecture

> Architecture diagram of the GitHub repository tamekhanh/atlas-business, 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/tamekhanh/atlas-business
- Repository: https://github.com/tamekhanh/atlas-business

## Overview

Atlas is a multi-tier ERP web app: authenticated staff manage catalog and parties, create purchasing and sales orders, handle bills and warehouse stock, and maintain HR and settings. The graph emphasizes the documented product areas and sampled controller-to-service/repository interactions; unsampled areas are represented at their exact enclosing directories, with uncertain wiring omitted.

Main entry points: [`Atlas.Web/Program.cs`](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Program.cs) (Web host), [`Atlas.Infrastructure/Repositories`](https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Infrastructure/Repositories) (Domain repositories), [`Atlas.Web/Areas/Sale/Controllers/SaleOrderController.cs`](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Sale/Controllers/SaleOrderController.cs) (Sales and billing), [`Atlas.Web/Areas/Products/Controllers/ProductController.cs`](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Products/Controllers/ProductController.cs) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_host["Web host<br/>[Program.cs]"]
  node_login["Login and access<br/>[LoginController.cs]"]
  node_catalog_ui["Product catalog"]
  node_attributes_ui["Variant attributes"]
  node_party_ui["Customer suppliers<br/>[PartyController.cs]"]
  node_purchase_ui["Purchasing"]
  node_sales_ui["Sales and billing"]
  node_warehouse_ui["Warehouse stock"]
  node_hrm_ui["HR management<br/>[HRMController.cs]"]
  node_other_areas["Categories, settings, logs<br/>[Areas]"]
end

subgraph group_business["Business services"]
  node_product_service["Product service<br/>[ProductService.cs]"]
  node_attribute_service["Attribute service"]
  node_party_service["Party service<br/>[PartyService.cs]"]
  node_purchase_service["Purchase orders"]
  node_sales_service["Sales orders"]
  node_report_service["Sales reports"]
  node_employee_service["Employee service<br/>[EmployeeService.cs]"]
  node_doc_number["Document numbering"]
end

subgraph group_data["Domain and persistence"]
  node_core["Domain contracts<br/>[Entities]"]
  node_repositories["Domain repositories<br/>[Repositories]"]
  node_db[("ERP database<br/>[AtlasDBContext.cs]")]
end

subgraph group_runtime["Identity and files"]
  node_auth_service["Authentication service<br/>[AuthService.cs]"]
  node_auth_repository["Authentication repository<br/>[AuthRepository.cs]"]
  node_logs["Activity logs<br/>[LogService.cs]"]
  node_storage["Local file storage"]
  node_sql_server[("SQL Server")]
  node_disk[("File system")]
end

node_staff(("Staff user"))

node_staff -->|"uses"| node_host
node_host -->|"routes"| node_login
node_login -->|"authenticates"| node_auth_service
node_auth_service -->|"queries account"| node_auth_repository
node_auth_repository -->|"reads and writes"| node_db
node_auth_service -->|"records login"| node_logs
node_login -->|"issues cookie"| node_host
node_host -->|"revalidates identity"| node_auth_repository
node_host -->|"routes requests"| node_catalog_ui
node_catalog_ui -->|"manages products"| node_product_service
node_product_service -->|"uses repositories"| node_repositories
node_catalog_ui -->|"saves images"| node_storage
node_catalog_ui -->|"stores image records"| node_repositories
node_catalog_ui -->|"records changes"| node_logs
node_host -->|"routes requests"| node_attributes_ui
node_attributes_ui -->|"manages attributes"| node_attribute_service
node_attribute_service -->|"uses repositories"| node_repositories
node_host -->|"routes requests"| node_party_ui
node_party_ui -->|"reads and writes parties"| node_repositories
node_host -->|"routes requests"| node_purchase_ui
node_purchase_ui -->|"manages orders"| node_purchase_service
node_purchase_ui -->|"requests number"| node_doc_number
node_purchase_ui -->|"saves bills"| node_storage
node_purchase_ui -->|"stores bill records"| node_repositories
node_purchase_service -->|"uses repositories"| node_repositories
node_host -->|"routes requests"| node_sales_ui
node_sales_ui -->|"manages orders"| node_sales_service
node_sales_ui -->|"requests number"| node_doc_number
node_sales_ui -->|"reads bills"| node_repositories
node_sales_ui -->|"builds PDF"| node_report_service
node_sales_ui -->|"records printing"| node_logs
node_sales_service -->|"uses repositories"| node_repositories
node_report_service -->|"loads report data"| node_repositories
node_host -->|"routes requests"| node_warehouse_ui
node_warehouse_ui -->|"reads and writes stock"| node_repositories
node_warehouse_ui -->|"loads managers"| node_employee_service
node_host -->|"routes requests"| node_hrm_ui
node_hrm_ui -->|"manages employees"| node_employee_service
node_employee_service -->|"uses repositories"| node_repositories
node_host -->|"routes requests"| node_other_areas
node_repositories -->|"queries and persists"| node_db
node_db -->|"stores ERP data"| node_sql_server
node_storage -->|"reads and writes files"| node_disk
node_core -.->|"defines contracts"| node_repositories

click node_host "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Program.cs"
click node_login "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Account/Controllers/LoginController.cs"
click node_catalog_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Products/Controllers/ProductController.cs"
click node_attributes_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Attributes/Controllers/AttributeController.cs"
click node_party_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Party/Controllers/PartyController.cs"
click node_purchase_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Purchase/Controllers/PurchaseOrderController.cs"
click node_sales_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Sale/Controllers/SaleOrderController.cs"
click node_warehouse_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Warehouse/Controllers/WarehouseController.cs"
click node_hrm_ui "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/HRM/Controllers/HRMController.cs"
click node_other_areas "https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Web/Areas"
click node_product_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/ProductService.cs"
click node_attribute_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Attributes/AttributeService.cs"
click node_party_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Party/PartyService.cs"
click node_purchase_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Purchase/PurchaseOrderService.cs"
click node_sales_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Sale/SaleOrderServide.cs"
click node_report_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Report/SalesOrderReportService.cs"
click node_employee_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/EmployeeService.cs"
click node_doc_number "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/DocumentNumber/DocumentNumberService.cs"
click node_core "https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Core/Entities"
click node_repositories "https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Infrastructure/Repositories"
click node_db "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Infrastructure/Data/AtlasDBContext.cs"
click node_auth_service "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Auth/AuthService.cs"
click node_auth_repository "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Infrastructure/Repositories/AuthRepository.cs"
click node_logs "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/LogService/LogService.cs"
click node_storage "https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Infrastructure/Provider/LocalStorageProvider.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_host,node_login,node_catalog_ui,node_attributes_ui,node_party_ui,node_purchase_ui,node_sales_ui,node_warehouse_ui,node_hrm_ui,node_other_areas,node_staff toneBlue
class node_product_service,node_attribute_service,node_party_service,node_purchase_service,node_sales_service,node_report_service,node_employee_service,node_doc_number toneAmber
class node_core,node_repositories,node_db toneMint
class node_auth_service,node_auth_repository,node_logs,node_storage,node_sql_server,node_disk toneRose
```

## Components

### Web workflows

- [Web host](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Program.cs): `Atlas.Web/Program.cs`
- [Login and access](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Account/Controllers/LoginController.cs): `Atlas.Web/Areas/Account/Controllers/LoginController.cs`
- [Product catalog](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Products/Controllers/ProductController.cs): `Atlas.Web/Areas/Products/Controllers/ProductController.cs`
- [Variant attributes](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Attributes/Controllers/AttributeController.cs): `Atlas.Web/Areas/Attributes/Controllers/AttributeController.cs`
- [Customer suppliers](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Party/Controllers/PartyController.cs): `Atlas.Web/Areas/Party/Controllers/PartyController.cs`
- [Purchasing](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Purchase/Controllers/PurchaseOrderController.cs): `Atlas.Web/Areas/Purchase/Controllers/PurchaseOrderController.cs`
- [Sales and billing](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Sale/Controllers/SaleOrderController.cs): `Atlas.Web/Areas/Sale/Controllers/SaleOrderController.cs`
- [Warehouse stock](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/Warehouse/Controllers/WarehouseController.cs): `Atlas.Web/Areas/Warehouse/Controllers/WarehouseController.cs`
- [HR management](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Web/Areas/HRM/Controllers/HRMController.cs): `Atlas.Web/Areas/HRM/Controllers/HRMController.cs`
- [Categories, settings, logs](https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Web/Areas): `Atlas.Web/Areas`

### Business services

- [Product service](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/ProductService.cs): `Atlas.Services/ProductService.cs`
- [Attribute service](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Attributes/AttributeService.cs): `Atlas.Services/Attributes/AttributeService.cs`
- [Party service](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Party/PartyService.cs): `Atlas.Services/Party/PartyService.cs`
- [Purchase orders](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Purchase/PurchaseOrderService.cs): `Atlas.Services/Purchase/PurchaseOrderService.cs`
- [Sales orders](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Sale/SaleOrderServide.cs): `Atlas.Services/Sale/SaleOrderServide.cs`
- [Sales reports](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Report/SalesOrderReportService.cs): `Atlas.Services/Report/SalesOrderReportService.cs`
- [Employee service](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/EmployeeService.cs): `Atlas.Services/EmployeeService.cs`
- [Document numbering](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/DocumentNumber/DocumentNumberService.cs): `Atlas.Services/DocumentNumber/DocumentNumberService.cs`

### Domain and persistence

- [Domain contracts](https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Core/Entities): `Atlas.Core/Entities`
- [Domain repositories](https://github.com/tamekhanh/atlas-business/tree/master/Atlas.Infrastructure/Repositories): `Atlas.Infrastructure/Repositories`
- [ERP database](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Infrastructure/Data/AtlasDBContext.cs): `Atlas.Infrastructure/Data/AtlasDBContext.cs`

### Identity and files

- [Authentication service](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/Auth/AuthService.cs): `Atlas.Services/Auth/AuthService.cs`
- [Authentication repository](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Infrastructure/Repositories/AuthRepository.cs): `Atlas.Infrastructure/Repositories/AuthRepository.cs`
- [Activity logs](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Services/LogService/LogService.cs): `Atlas.Services/LogService/LogService.cs`
- [Local file storage](https://github.com/tamekhanh/atlas-business/blob/master/Atlas.Infrastructure/Provider/LocalStorageProvider.cs): `Atlas.Infrastructure/Provider/LocalStorageProvider.cs`
- **SQL Server**
- **File system**

### Other components

- **Staff user**

## Connections

- Staff user → Web host: uses
- Web host → Login and access: routes
- Login and access → Authentication service: authenticates
- Authentication service → Authentication repository: queries account
- Authentication repository → ERP database: reads and writes
- Authentication service → Activity logs: records login
- Login and access → Web host: issues cookie
- Web host → Authentication repository: revalidates identity
- Web host → Product catalog: routes requests
- Product catalog → Product service: manages products
- Product service → Domain repositories: uses repositories
- Product catalog → Local file storage: saves images
- Product catalog → Domain repositories: stores image records
- Product catalog → Activity logs: records changes
- Web host → Variant attributes: routes requests
- Variant attributes → Attribute service: manages attributes
- Attribute service → Domain repositories: uses repositories
- Web host → Customer suppliers: routes requests
- Customer suppliers → Domain repositories: reads and writes parties
- Web host → Purchasing: routes requests
- Purchasing → Purchase orders: manages orders
- Purchasing → Document numbering: requests number
- Purchasing → Local file storage: saves bills
- Purchasing → Domain repositories: stores bill records
- Purchase orders → Domain repositories: uses repositories
- Web host → Sales and billing: routes requests
- Sales and billing → Sales orders: manages orders
- Sales and billing → Document numbering: requests number
- Sales and billing → Domain repositories: reads bills
- Sales and billing → Sales reports: builds PDF
- Sales and billing → Activity logs: records printing
- Sales orders → Domain repositories: uses repositories
- Sales reports → Domain repositories: loads report data
- Web host → Warehouse stock: routes requests
- Warehouse stock → Domain repositories: reads and writes stock
- Warehouse stock → Employee service: loads managers
- Web host → HR management: routes requests
- HR management → Employee service: manages employees
- Employee service → Domain repositories: uses repositories
- Web host → Categories, settings, logs: routes requests
- Domain repositories → ERP database: queries and persists
- ERP database → SQL Server: stores ERP data
- Local file storage → File system: reads and writes files
- Domain contracts → Domain repositories: defines contracts
