# vs47096/hardware-shop-inventory-management-system architecture

> Architecture diagram of the GitHub repository vs47096/hardware-shop-inventory-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vs47096/hardware-shop-inventory-management-system
- Repository: https://github.com/vs47096/hardware-shop-inventory-management-system

## Overview

##### Project Type and Purpose
- This is a standalone Java desktop application for managing a hardware‐shop inventory, billing, supplier and customer records.
- It uses a Swing‐based GUI layer (.form and .java files), business logic in Java classes, and MySQL as the backing datastore.

##### File Structure Analysis
- Top‐level folders:
- nbproject & build.xml: NetBeans/Ant build infrastructure
- src/dbms_1: Java source code for forms and core classes
- build/classes: compiled Java bytecode
- SQL_Scripts.zip: DDL/DML scripts to create/populate MySQL schema
- Screenshots: User interface examples
- Patterns:
- Presentation layer (Swing .form + .java)
- Central application class (DBMS_1.java) likely containing entry point and controller logic
- Data access via JDBC calls embedded in each form or via shared utility class

##### README Insights
- Describes login, registration, billing, inventory update, customer/supplier listing
- Confirms Java + MySQL stack

a. Main Components
- Client Application
– Presentation Layer: Swing forms (Login, Register, Home, Billing, Inventory, CustomerList, SupplierList, Receipt)
– Business Logic Layer: Controller classes and event handlers (e.g., DBMS_1.java main, form controllers)
– Data Access Layer: JDBC utility or inline SQL calls
- MySQL Database Server
– Inventory, Billing, Customer, Supplier tables (from SQL_Scripts)
- Build & Deployment
– Ant build.xml, manifest for packaging into executable JAR
- External Resources
– SQL_Scripts.zip for initial DB setup

b. Relationships & Data Flows
- User actions on Swing forms → Business Logic Layer
- Business logic invokes Data Access Layer (JDBC) → SQL Queries → MySQL
- Query results flow back → Business Logic processes → Presentation Layer updates UI
- Ant build.xml reads source → compiles classes → packages into JAR with manifest

c. Architectural Patterns & Principles
- Layered Architecture: UI → BL → DAL → Database
- Event‐driven GUI controllers
- Centralized build orchestration with Ant (nbproject)

d. Key Technologies
- Java Swing for desktop UI
- JDBC driver for MySQL connectivity
- Ant / NetBeans project metadata for build and packaging
- MySQL Server as persistent storage

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Application"
        subgraph "Presentation Layer"
            LF["Login Form"]:::frontend
            RF["Registration Form"]:::frontend
            HD["Home Dashboard"]:::frontend
            BM["Billing Module"]:::frontend
            IM["Inventory Module"]:::frontend
            CL["Customer List"]:::frontend
            SL["Supplier List"]:::frontend
            AI["Add Items Dialog"]:::frontend
            RV["Receipt Viewer"]:::frontend
        end
        subgraph "Business Logic Layer"
            MC["Main Application Controller"]:::business
        end
        subgraph "Data Access Layer"
            DA["JDBC Utility (Embedded in Forms)"]:::data
        end
    end

    DB["MySQL Database"]:::db
    SQL["SQL_Scripts.zip"]:::resources

    NB["NetBeans Metadata"]:::build
    Ant["Ant Build Script"]:::build
    CC["Compiled Classes"]:::build
    MF["JAR Manifest"]:::build

    LF --> MC
    RF --> MC
    HD --> MC
    BM --> MC
    IM --> MC
    CL --> MC
    SL --> MC
    AI --> MC
    RV --> MC

    MC --> DA
    DA --> DB
    DB --> DA
    DA --> MC
    MC --> LF

    SQL --> DB

    NB --> Ant
    Ant --> CC
    Ant --> MF

    click LF "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Login.java"
    click RF "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Register.java"
    click HD "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Home.java"
    click BM "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Bill.java"
    click IM "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Inventory.java"
    click CL "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Custlist.java"
    click SL "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Supplist.java"
    click AI "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/ADD_items.java"
    click RV "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/Receipt.java"
    click MC "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/src/dbms_1/DBMS_1.java"
    click SQL "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/SQL_Scripts.zip"
    click Ant "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/build.xml"
    click NB "https://github.com/vs47096/hardware-shop-inventory-management-system/tree/master/DBMS_1/nbproject/"
    click CC "https://github.com/vs47096/hardware-shop-inventory-management-system/tree/master/DBMS_1/build/classes/dbms_1/"
    click MF "https://github.com/vs47096/hardware-shop-inventory-management-system/blob/master/DBMS_1/manifest.mf"

    classDef frontend fill:#D6EAF8,stroke:#3498DB,color:#1A5276
    classDef business fill:#D5F5E3,stroke:#27AE60,color:#145A32
    classDef data fill:#FCF3CF,stroke:#F1C40F,color:#7D6608
    classDef db fill:#E8DAEF,stroke:#8E44AD,color:#512E5F
    classDef build fill:#E5E8E8,stroke:#95A5A6,color:#566573
    classDef resources fill:#FDEDEC,stroke:#E74C3C,color:#78281F
```
