# sieusao5010/coursemanager architecture

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

- Interactive diagram: https://gitdiagram.com/sieusao5010/coursemanager
- Repository: https://github.com/sieusao5010/coursemanager

## Overview

##### Project type and purpose
- This is a desktop, full-stack Java application using JavaFX for the GUI, a classic three-layer architecture (Presentation → Business → Data Access), and SQL Server as the backend database.
- Purpose: Manage courses, assignments, students, teachers, and results via a local JavaFX UI that interacts with a SQL Server database through JDBC.

##### File structure
- src/QuanLiKhoaHoc/GUI → JavaFX FXML views, controllers, CSS (Presentation layer, MVC style)
- src/QuanLiKhoaHoc/BUS → Business logic services for each module (CourseManage, StudentManage, etc.)
- src/QuanLiKhoaHoc/DAL → Data access classes wrapping JDBC calls (ConnectDB, *DAL.java)
- src/QuanLiKhoaHoc/DTO → Plain DTO/POJO classes modeling domain entities
- External libs & config: javafx-sdk-19/, sqljdbc_11.2 (Microsoft JDBC driver), README describes VM-options for JavaFX modules and SQL import

##### README for extra insights
- Steps: import SQL schema/query into SQL Server, configure VM options for JavaFX modules, then launch MainStartApp

##### Detailed capture of essential elements
- Notes on the SQL import step and the ConnectDB class establishing the JDBC connection

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Presentation Layer"
        direction TB
        MainStartApp["MainStartApp"]:::presentation
        Controllers["FXML Views & Controllers"]:::presentation
    end

    subgraph "Business Layer"
        direction TB
        BUS["Business Services (CourseManageBUS,\nStudentBUS, TeacherBus,\nAssignmentBUS, ResultBUS)"]:::business
    end

    subgraph "Data Access Layer"
        direction TB
        DAL["Data Access Objects (CourseManageDAL,\nStudentManageDAL, TeacherManageDAL,\nAssignmentDAL, ResultDAL)"]:::data
        ConnectDB["ConnectDB"]:::data
    end

    subgraph "Domain Model (DTOs)"
        direction TB
        DTO["DTO/POJO Classes"]:::shared
    end

    DB["SQL Server Database"]:::db
    SQLScript["SQLQuery1.sql"]:::external

    JavaFXSDK["JavaFX SDK"]:::external
    JDBCDriver["SQL JDBC Driver"]:::external

    MainStartApp --> Controllers
    Controllers --> BUS
    BUS --> DTO
    BUS --> DAL
    DAL --> DTO
    DAL --> DB
    ConnectDB --> DB
    SQLScript --> DB
    JavaFXSDK --> MainStartApp
    JDBCDriver --> DAL

    click MainStartApp "https://github.com/sieusao5010/coursemanager/blob/master/src/QuanLiKhoaHoc/GUI/Main/MainStartApp.java"
    click Controllers "https://github.com/sieusao5010/coursemanager/tree/master/src/QuanLiKhoaHoc/GUI"
    click BUS "https://github.com/sieusao5010/coursemanager/tree/master/src/QuanLiKhoaHoc/BUS"
    click DAL "https://github.com/sieusao5010/coursemanager/tree/master/src/QuanLiKhoaHoc/DAL"
    click ConnectDB "https://github.com/sieusao5010/coursemanager/blob/master/src/QuanLiKhoaHoc/DAL/ConnectDB.java"
    click DTO "https://github.com/sieusao5010/coursemanager/tree/master/src/QuanLiKhoaHoc/DTO"
    click SQLScript "https://github.com/sieusao5010/coursemanager/blob/master/SQLQuery1.sql"
    click JavaFXSDK "https://github.com/sieusao5010/coursemanager/tree/master/javafx-sdk-19/lib"
    click JDBCDriver "https://github.com/sieusao5010/coursemanager/blob/master/sqljdbc_11.2/enu/mssql-jdbc-11.2.0.jre11.jar"

    classDef presentation fill:#aedff7,stroke:#333,stroke-width:1px;
    classDef business fill:#c7f7ae,stroke:#333,stroke-width:1px;
    classDef data fill:#ffd7a8,stroke:#333,stroke-width:1px;
    classDef db fill:#d3d3d3,stroke:#333,stroke-width:1px;
    classDef external fill:#eaeaea,stroke:#333,stroke-width:1px;
    classDef shared fill:#ffffff,stroke:#333,stroke-width:1px;
```
