# yarnisar54321/isad_project architecture

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

- Interactive diagram: https://gitdiagram.com/yarnisar54321/isad_project
- Repository: https://github.com/yarnisar54321/isad_project

## Overview

Step 1: Identify the Project Type and Purpose
- “ManageProductList” is a NetBeans-based Java Swing desktop application (an “ASMS” per README) whose primary goal is to let users log in, view and modify a product list, and save changes to local files.

Step 2: Analyze the File Structure
- src/javaapplication21
- Main.java – application entry point, wires up UI & controller
- ManageProductListBoundary.java – main Swing window presenting the product list and action buttons
- Login.java – authentication dialog
- ControlStock.java – business logic (CRUD operations plus file I/O)
- RoundedButton.java – custom JButton subclass for styled controls
- product_list.txt & product_data.dat – flat‐file data stores
- nbproject/, build.xml, out/, build/ – NetBeans project metadata and build outputs

Step 3: Inspect README for Additional Clues
- README simply labels the project “ASMS” (Academic Software Management System). No further architectural guidance is provided, so we infer a single-tier desktop MVC style.

Step 4: Define Main Components and Their Roles
a. Presentation Layer (UI)
– ManageProductListBoundary (main window)
– Login (security gate)
– RoundedButton (UI widget extension)
b. Controller / Business Logic
– ControlStock (handles add/edit/delete/search, encapsulates file I/O)
c. Application Bootstrap
– Main (instantiates ControlStock and UI, injects dependencies)
d. Data Persistence
– product_list.txt & product_data.dat (local flat-file storage)

##### Create three horizontal tiers
- Top (UI) – blue rectangles
- Middle (Business Logic) – green rectangle
##### Components
– Blue Rectangle: ManageProductListBoundary
– Blue Rectangle: Login
– Blue Rectangle: RoundedButton
– Green Rectangle: ControlStock
– Light-blue Rectangle: Main (entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Application Bootstrap"
        Main["Main (Entry Point)"]:::entry
    end

    subgraph "Presentation Layer"
        MPLB["ManageProductListBoundary"]:::presentation
        Login["Login"]:::presentation
        RoundedButton["RoundedButton"]:::presentation
    end

    subgraph "Business Logic"
        ControlStock["ControlStock"]:::business
    end

    subgraph "Data Persistence"
        PLF["product_list.txt"]:::data
        PDT["product_data.dat"]:::data
    end

    Main -->|"initialize UI & inject ControlStock"| MPLB
    Main -->|"initialize ControlStock"| ControlStock
    Login -->|"authenticate(user,pass)"| ControlStock
    MPLB -->|"addProduct(...)/deleteProduct(...)"| ControlStock
    ControlStock -->|"read/write"| PLF
    ControlStock -->|"read/write"| PDT
    ControlStock -->|"return List<Product>/status"| MPLB

    click MPLB "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/src/javaapplication21/ManageProductListBoundary.java"
    click Login "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/src/javaapplication21/Login.java"
    click RoundedButton "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/src/javaapplication21/RoundedButton.java"
    click ControlStock "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/src/javaapplication21/ControlStock.java"
    click Main "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/src/javaapplication21/Main.java"
    click PLF "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/product_list.txt"
    click PDT "https://github.com/yarnisar54321/isad_project/blob/main/ManageProductList/product_data.dat"

    classDef presentation fill:#D6E9FE,stroke:#1E73BE,color:#000;
    classDef business fill:#DFF0D8,stroke:#3C763D,color:#000;
    classDef data fill:#FDF5E6,stroke:#E6A23C,color:#000;
    classDef entry fill:#D9EDF7,stroke:#31708F,color:#000;
```
