# faizanzaheergit/scrapmanagementsystem architecture

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

- Interactive diagram: https://gitdiagram.com/faizanzaheergit/scrapmanagementsystem
- Repository: https://github.com/faizanzaheergit/scrapmanagementsystem

## Overview

##### Main Components

A. Presentation Layer (UI Components):
- User Interface Forms (group these into functional modules):
- Authentication Module (adminLogin, userLogin, userSignUp)
- Management Panels (AdminPanel, UserPanel)
- Inventory Management (AddItem, AddCarPart)
- Material Management Forms (wood, plastic, cardboard, CarParts, waste)
- Stakeholder Management (DriverDetails, SupplierDetails, customer)

B. Business Logic Layer:
- Core Business Components:
- Inventory Management Service
- User Management Service
- Order Processing Service
- Material Classification Service

C. Data Access Layer:
- Database Components:
- SQL Server Database
- Data Access Objects/Repositories

**[Top Tier - Presentation Layer]**
- Show all UI forms grouped by functionality
- ↓ (User Interactions)
**[Middle Tier - Business Logic]**
- Show core services and business rules
- ↓ (Data Operations)
**[Bottom Tier - Data Layer]**
- Show database and data access components

##### Key Relationships to Highlight

- Authentication Flow:
- User/Admin Login → Authentication Service → Database
- Inventory Management Flow:
- /Edit Forms → Inventory Service → Database
- Material Processing Flow:
- Material Forms → Material Service → Inventory Service → Database

##### Additional Elements

- Annotations for critical processes
- System boundaries and security zones

##### Database interactions and data flow

Remember to maintain clarity while showing the relationship between all components, especially focusing on how the different material types (wood, plastic, car parts, etc.) are managed within the system.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef ui fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef service fill:#90EE90,stroke:#333,stroke-width:2px
    classDef data fill:#FFE5B4,stroke:#333,stroke-width:2px
    classDef security fill:#FFB6C1,stroke:#333,stroke-width:2px

    %% Main Application Entry
    Program["Program Entry"]:::ui
    click Program "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/Program.cs"

    %% Authentication Layer
    subgraph Authentication
        AdminLogin["Admin Login"]:::security
        UserLogin["User Login"]:::security
        UserSignUp["User Registration"]:::security
        ChangePinA["Admin PIN Change"]:::security
        ChangePinU["User PIN Change"]:::security
    end
    click AdminLogin "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/adminLogin.cs"
    click UserLogin "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/userLogin.cs"
    click UserSignUp "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/userSignUp.cs"
    click ChangePinA "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/ChangePinA.cs"
    click ChangePinU "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/ChangePinU.cs"

    %% Management Panels
    subgraph Panels
        AdminPanel["Admin Panel"]:::ui
        UserPanel["User Panel"]:::ui
    end
    click AdminPanel "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/AdminPanel.cs"
    click UserPanel "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/UserPanel.cs"

    %% Inventory Management
    subgraph Inventory
        AddItem["Add Item"]:::ui
        AddCarPart["Add Car Part"]:::ui
        Search["Search"]:::ui
    end
    click AddItem "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/AddItem.cs"
    click AddCarPart "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/AddCarPart.cs"
    click Search "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/search.cs"

    %% Material Management
    subgraph Materials
        Wood["Wood Management"]:::ui
        Plastic["Plastic Management"]:::ui
        Cardboard["Cardboard Management"]:::ui
        CarParts["Car Parts"]:::ui
        Waste["Waste Management"]:::ui
    end
    click Wood "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/wood.cs"
    click Plastic "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/plastic.cs"
    click Cardboard "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/cardboard.cs"
    click CarParts "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/CarParts.cs"
    click Waste "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/waste.cs"

    %% Stakeholder Management
    subgraph Stakeholders
        Driver["Driver Details"]:::ui
        Supplier["Supplier Details"]:::ui
        Customer["Customer Management"]:::ui
    end
    click Driver "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/DriverDetails.cs"
    click Supplier "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/SupplierDetails.cs"
    click Customer "https://github.com/FaizanZaheerGit/ScrapManagementSystem/blob/main/Scrape Manage System/customer.cs"

    %% Business Logic Layer
    subgraph BusinessLogic
        InventoryService["Inventory Management Service"]:::service
        UserService["User Management Service"]:::service
        MaterialService["Material Classification Service"]:::service
        OrderService["Order Processing Service"]:::service
    end

    %% Data Layer
    subgraph DataAccess
        Database[(SQL Server Database)]:::data
        DataAccessObjects["Data Access Objects"]:::data
    end

    %% Relationships
    Program --> Authentication
    Authentication --> Panels
    AdminPanel --> |Admin Access| Inventory
    AdminPanel --> |Admin Access| Materials
    AdminPanel --> |Admin Access| Stakeholders
    UserPanel --> |User Access| Inventory
    UserPanel --> |User Access| Materials
    UserPanel --> |User Access| Stakeholders
    
    Inventory --> BusinessLogic
    Materials --> BusinessLogic
    Stakeholders --> BusinessLogic
    BusinessLogic --> DataAccess

    %% Legend
    subgraph Legend
        UI["UI Components"]:::ui
        Service["Services"]:::service
        Data["Data Components"]:::data
        SecurityComp["Security Components"]:::security
    end
```
