# omda777/sales-order-application architecture

> Architecture diagram of the GitHub repository omda777/sales-order-application, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omda777/sales-order-application
- Repository: https://github.com/omda777/sales-order-application

## Overview

##### Project type and purpose
- This is a console-based C# Sales Order Management System.
- Its purpose is to simulate a retail sales workflow for OOP demonstration: managing customers, products, orders, and payments.
- It’s not a web or microservice app—its architecture is a single executable with logical modules.

##### File structure
- Top-level solution file: **Sales Order Application.sln**.
- Four main class-library folders (each with its own .csproj):
- **Customers** (CustomerSystem namespace)
- **Products** (Products namespace)
- **Order** (OrderSystem namespace)
- **Payment** (PaymentSystem namespace)
- Console entry project: **Sales Order Application** folder with Program.cs.
- Supporting folder **Photo** (holds UML.png).
- No external DB: each module holds in-memory lists and CRUD methods.

##### README for additional insights
- Confirms namespaces and key classes (Person, Customer, Product, Stock, Order, OrderItem, Payment, Transaction).
- Features: data entry (CRUD), sales process, print operations.

##### Details without over-segmenting
- Four modules plus the Program entry point.
- Data flows (e.g., “CreateOrder → OrderManager.Add()” or “ProcessPayment → TransactionManager.Add()”).
- Avoid showing every class file; instead group them by module (e.g., list Person & Customer under CustomerSystem).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Solution File
    Solution["Sales Order Application.sln"]:::external
    click Solution "https://github.com/omda777/sales-order-application/blob/main/Sales Order Application.sln"

    %% UI Layer
    subgraph "UI Layer"
        UI["Console UI\n(Program.cs)"]:::ui
    end
    click UI "https://github.com/omda777/sales-order-application/blob/main/Sales Order Application/Program.cs"

    %% CustomerSystem Module
    subgraph "CustomerSystem Module"
        CS_proj["CustomerSystem.csproj"]:::module
        Person["Person"]:::entity
        Customer["Customer"]:::entity
        CustomerManager["Customers"]:::manager
    end
    click CS_proj "https://github.com/omda777/sales-order-application/blob/main/Customers/CustomerSystem.csproj"
    click Person "https://github.com/omda777/sales-order-application/blob/main/Customers/Person.cs"
    click Customer "https://github.com/omda777/sales-order-application/blob/main/Customers/Customer.cs"
    click CustomerManager "https://github.com/omda777/sales-order-application/blob/main/Customers/Customers.cs"

    %% Products Module
    subgraph "Products Module"
        P_proj["Products.csproj"]:::module
        Product["Product"]:::entity
        Stock["Stock"]:::entity
    end
    click P_proj "https://github.com/omda777/sales-order-application/blob/main/Products/Products.csproj"
    click Product "https://github.com/omda777/sales-order-application/blob/main/Products/Product.cs"
    click Stock "https://github.com/omda777/sales-order-application/blob/main/Products/Stock.cs"

    %% OrderSystem Module
    subgraph "OrderSystem Module"
        O_proj["OrderSystem.csproj"]:::module
        Order["Order"]:::entity
        OrderItem["OrderItem"]:::entity
    end
    click O_proj "https://github.com/omda777/sales-order-application/blob/main/Order/OrderSystem.csproj"
    click Order "https://github.com/omda777/sales-order-application/blob/main/Order/Order.cs"
    click OrderItem "https://github.com/omda777/sales-order-application/blob/main/Order/OrderItem.cs"

    %% PaymentSystem Module
    subgraph "PaymentSystem Module"
        Pay_proj["PaymentSystem.csproj"]:::module
        Payment["Payment"]:::entity
        Transaction["Transaction"]:::entity
    end
    click Pay_proj "https://github.com/omda777/sales-order-application/blob/main/Payment/PaymentSystem.csproj"
    click Payment "https://github.com/omda777/sales-order-application/blob/main/Payment/Payment.cs"
    click Transaction "https://github.com/omda777/sales-order-application/blob/main/Payment/Transaction.cs"

    %% Relationships
    UI -->|calls| CustomerManager
    UI -->|calls| P_proj
    UI -->|calls| O_proj
    UI -->|calls| Pay_proj

    O_proj -->|uses| CustomerManager
    O_proj -->|uses| Stock

    Pay_proj -->|linksTo| O_proj

    %% Styles
    classDef ui fill:#fdf6e3,stroke:#b58900,color:#b58900;
    classDef module fill:#eee8d5,stroke:#657b83,color:#657b83;
    classDef entity fill:#f0fff4,stroke:#2aa198,color:#2aa198;
    classDef manager fill:#fff0f0,stroke:#dc322f,color:#dc322f;
    classDef external fill:#ebdbb2,stroke:#3c3836,color:#3c3836;
```
