diff --git a/architecture/workspace/components-inventory.puml b/architecture/workspace/components-inventory.puml new file mode 100644 index 0000000..75feb1f --- /dev/null +++ b/architecture/workspace/components-inventory.puml @@ -0,0 +1,52 @@ +@startuml +!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml + +LAYOUT_WITH_LEGEND() + +title Inventory Application - Component Diagram + +Person(owner, "Business Owner", "Oversees inventory accuracy, stock visibility, and operational decisions") +Person(staff, "Operations Staff", "Performs inventory updates, stock checks, and adjustments") + +ContainerDb(txdb, "Transaction Database", "Database", "Stores inventory, materials, product, and transaction records") +Container(auth, "Authentication Service", "Shared Service", "Provides authentication and identity controls") +Container(datarepo, "Shared Data Repository", "Shared Service", "Provides access to shared business entities and reference data") +Container(api, "API Orchestrator", "API / Integration Service", "Coordinates internal and external integrations") +Container(notify, "Notification Service", "Shared Service", "Generates alerts and workflow notifications") + +Container_Boundary(inventory_app, "Inventory Application") { + Component(ui, "Inventory UI", "Web UI", "Provides inventory dashboards, stock lookup, adjustment forms, and reports") + Component(stock_service, "Stock Management Service", "Application Service", "Handles stock levels, stock movement, and quantity calculations") + Component(material_service, "Material Catalog Service", "Application Service", "Manages raw materials, supply metadata, and status") + Component(product_service, "Finished Goods Service", "Application Service", "Tracks finished goods inventory and sellable product records") + Component(adjustment_service, "Adjustment Service", "Application Service", "Processes stock corrections, losses, damages, and reconciliations") + Component(reporting_service, "Inventory Reporting Service", "Application Service", "Produces stock status, valuation, and exception reports") + Component(repository, "Inventory Repository", "Data Access Component", "Reads and writes inventory-related data") +} + +Rel(owner, ui, "Uses") +Rel(staff, ui, "Uses") + +Rel(ui, stock_service, "Sends requests to") +Rel(ui, material_service, "Sends requests to") +Rel(ui, product_service, "Sends requests to") +Rel(ui, adjustment_service, "Sends requests to") +Rel(ui, reporting_service, "Sends requests to") + +Rel(stock_service, repository, "Reads from and writes to") +Rel(material_service, repository, "Reads from and writes to") +Rel(product_service, repository, "Reads from and writes to") +Rel(adjustment_service, repository, "Reads from and writes to") +Rel(reporting_service, repository, "Reads from") + +Rel(repository, txdb, "Reads from and writes to") +Rel(stock_service, datarepo, "Uses shared business data from") +Rel(material_service, datarepo, "Uses shared business data from") +Rel(product_service, datarepo, "Uses shared business data from") + +Rel(ui, auth, "Authenticates through") +Rel(stock_service, api, "Publishes events through") +Rel(adjustment_service, notify, "Triggers alerts through") +Rel(reporting_service, api, "Sends reporting data through") + +@enduml \ No newline at end of file diff --git a/docs/architecture/components/inventory.md b/docs/architecture/components/inventory.md index 7ea1051..5a16223 100644 --- a/docs/architecture/components/inventory.md +++ b/docs/architecture/components/inventory.md @@ -1,3 +1,35 @@ # Inventory Components -This page describes the internal components of the inventory application. +This diagram shows the major internal components of the Inventory Application. + +## Purpose + +This view breaks the Inventory Application into its main user interface, service, reporting, adjustment, and data access responsibilities. It provides the first detailed component-level view inside a Kell Creations application container. + +## Diagram Source + +The source for this diagram is maintained as architecture code in: + +`architecture/workspace/components-inventory.puml` + +## Included Components + +- Inventory UI +- Stock Management Service +- Material Catalog Service +- Finished Goods Service +- Adjustment Service +- Inventory Reporting Service +- Inventory Repository + +## Connected Shared Services + +- Transaction Database +- Authentication Service +- Shared Data Repository +- API Orchestrator +- Notification Service + +## Notes + +This component view will later be expanded to align with the detailed design of inventory control, material tracking, stock adjustments, exception handling, and business reporting across the Kell Creations platform. \ No newline at end of file