# abekek/numa-rdma-cse341 architecture

> Architecture diagram of the GitHub repository abekek/numa-rdma-cse341, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abekek/numa-rdma-cse341
- Repository: https://github.com/abekek/numa-rdma-cse341

## Overview

##### Main Components
a. User Interface Components:
- Property Manager Interface – handles property visits, new lease recordings (including tenant creation), and move outs.
- Tenant Interface – includes login/registration, personal data viewing/updating, lease management (for payments and tenant operations).
- NUMA Manager Interface – for property creation (with back-end PL/SQL calls to populate apartments and amenities), editing, and rent adjustments.
- Business Manager Interface – for retrieving various statistics about the overall system, apartments, and tenants.
b. Application Core/Business Logic:
- Java classes under the “alk224” package (MainMenu.java, BusMngrMenu.java, NUMAMngrMenu.java, PropMngMenu.java, TenantMenu.java) represent the core of the system logic.
- They implement the business rules and interface workflows.
c. Data Generation Component:
- The “datagen” folder contains code (DataGen.java) and scripts (run.sh, makefile) for generating random/mock data. This might be used during deployment or testing.
d. Database Interaction/Management:
- The project uses a relational database accessed via the ojdbc8.jar (the Oracle JDBC driver).
- SQL and PL/SQL scripts stored under “other/sql” and “other/plsql” handle table creation and population, as well as certain back-end procedures.
e. External Dependencies:
- The Oracle JDBC driver (ojdbc8.jar) and any encryption libraries for SHA-256 (as mentioned in the README for tenant password encryption).

##### Relationships and Interactions
- The UI components serve as the front end for different user roles. Each interface triggers underlying Java methods that enforce business rules.
- Between the business logic and the database, there is a well-defined interaction layer (using JDBC) to execute SQL/PLSQL operations such as tenant registration, lease creation, and property updates.
- The data generation component interacts primarily with the database via the provided scripts and might be executed separately to populate or refresh data.
- The PL/SQL scripts add an extra layer where stored procedures are invoked from the Java logic (especially in the NUMA Manager Interface when adding a new property).

##### Architectural Patterns
- Separation of Concerns: Splitting the project into interface modules (UI), business logic (Java classes), and data handling (database scripts and JDBC integration).
- Use of External Data Generation Tools: The datagen scripts indicate a decoupled process for managing sample/seed data.

##### Relevant Technologies, Frameworks, and Libraries
- Java/JAR execution (MainMenu.jar)
- Oracle JDBC driver (ojdbc8.jar)
- PL/SQL procedures and SQL scripts for database operations
- Shell scripting for compiling and running the program (run.sh, makefile)
- SHA-256 for encryption (used during tenant registration/login)

##### Essential Elements
- How data flows from user interaction to backend processing.
- How each module interacts with the central database.
- How the data generation module is used to seed the database.
- Optionally, include brief notation on any important design patterns (e.g., layered architecture) that are evident.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "User Interfaces"
        PM["Property Manager Interface"]:::ui
        TI["Tenant Interface"]:::ui
        NMI["NUMA Manager Interface"]:::ui
        BMI["Business Manager Interface"]:::ui
    end

    subgraph "Business Logic"
        ML["Application Core - Main Menu"]:::logic
    end

    subgraph "External Dependencies"
        JD["Oracle JDBC Driver"]:::external
    end

    subgraph "Database"
        DB["Oracle Database"]:::db
        SQL["SQL Scripts"]:::db
        PLSQL["PL/SQL Scripts"]:::db
    end

    subgraph "Data Generation"
        DG["Data Generation (DataGen)"]:::datagen
        RUN["run.sh"]:::datagen
        MF["makefile"]:::datagen
    end

    %% Connections between layers
    PM -->|"triggers"| ML
    TI -->|"triggers"| ML
    NMI -->|"triggers"| ML
    BMI -->|"triggers"| ML

    ML -->|"uses"| JD
    JD -->|"connects"| DB

    ML -->|"executes"| SQL
    ML -->|"executes"| PLSQL
    SQL -->|"sets_up"| DB
    PLSQL -->|"invokes"| DB

    DG -->|"populates"| DB
    DG -->|"runs"| RUN
    DG -->|"runs"| MF

classDef ui fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
classDef logic fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
classDef external fill:#D7BDE2,stroke:#6C3483,stroke-width:2px;
classDef db fill:#F5B7B1,stroke:#922B21,stroke-width:2px;
classDef datagen fill:#A9DFBF,stroke:#1E8449,stroke-width:2px;

click PM "https://github.com/abekek/numa-rdma-cse341/blob/main/alk224/PropMngMenu.java"
click TI "https://github.com/abekek/numa-rdma-cse341/blob/main/alk224/TenantMenu.java"
click NMI "https://github.com/abekek/numa-rdma-cse341/blob/main/alk224/NUMAMngrMenu.java"
click BMI "https://github.com/abekek/numa-rdma-cse341/blob/main/alk224/BusMngrMenu.java"
click ML "https://github.com/abekek/numa-rdma-cse341/blob/main/alk224/MainMenu.java"
click DG "https://github.com/abekek/numa-rdma-cse341/blob/main/datagen/DataGen.java"
click RUN "https://github.com/abekek/numa-rdma-cse341/blob/main/datagen/run.sh"
click MF "https://github.com/abekek/numa-rdma-cse341/tree/main/datagen/makefile"
click SQL "https://github.com/abekek/numa-rdma-cse341/blob/main/other/sql/tables.txt"
click PLSQL "https://github.com/abekek/numa-rdma-cse341/tree/main/other/plsql/"
click JD "https://github.com/abekek/numa-rdma-cse341/blob/main/ojdbc8.jar"
```
