# isavb03/university_result_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/isavb03/university_result_management_system
- Repository: https://github.com/isavb03/university_result_management_system

## Overview

##### Project Type and Purpose
- This is a full-stack Java web application (“University_Result_Management_System”) built with JSP/Servlets and backed by a MySQL database.
- It provides a web interface for administrators and students to login, add/view results, and manages persistence via JDBC.

##### File Structure Analysis
- src/main/java/project/ConnectionProvider.java → Business/data‐access layer (JDBC connection helper).
- src/main/webapp/ → Presentation layer
- JSPs (addNewStudent.jsp, adminHome.jsp, studentHome.jsp, etc.)
- HTML assets (adminLogin.html, index.html, header.html)
- Static resources: /assets/css, /assets/js, /assets/fonts, /images
- WEB-INF/web.xml and WEB-INF/lib/mysql-connector-java.jar → Deployment descriptors & libraries

##### README Insights
- Confirms use of Java servlets/JSP and MySQL.

a. Presentation Layer
- Web Browser (Client)
- JSP/HTML pages and static assets served by the web container (Tomcat/Jetty)
b. Business Logic Layer
- JSP pages with embedded servlet logic (e.g. adminLoginAction.jsp)
- Servlet container
- ConnectionProvider.java for managing DB connections
c. Data Layer
- MySQL Database
- JDBC Connector (mysql-connector-java-5.1.48.jar)

##### Relationships and Data Flows
- User → HTTP request → JSP/Servlet (Presentation → Business)
- JSP/Servlet → uses ConnectionProvider via JDBC (Business → Data)
- MySQL → returns resultset → ConnectionProvider → JSP for rendering (Data → Business → Presentation)

##### Architectural Patterns and Principles
- Three-Tier Architecture (Presentation, Business, Data)
- Separation of concerns:
- Presentation: JSP + static resources
- Business: minimal Java code (ConnectionProvider + JSP logic)
- Data: MySQL accessed via JDBC
- MVC influence: JSPs act as both View and Controller; ConnectionProvider as Model/data-access.

##### Technologies and Frameworks
- Java Servlet container (e.g., Apache Tomcat)
- JSP (JavaServer Pages)
- JDBC with MySQL Connector/J
- MySQL RDBMS
- Frontend: HTML5, CSS3, JavaScript

## Diagram (Mermaid)

```mermaid
graph TD
    %% Client
    Browser["Web Browser"]:::external

    %% Web Container
    subgraph "Web Container / Application Server"
        direction TB

        subgraph "Presentation Layer"
            direction TB
            addNewStudent["addNewStudent.jsp"]:::presentation
            adminHome["adminHome.jsp"]:::presentation
            studentHome["studentHome.jsp"]:::presentation
            adminLoginAction["adminLoginAction.jsp"]:::presentation
            insertNewResult["insertNewResult.jsp"]:::presentation

            subgraph "Static HTML Pages"
                direction TB
                adminLoginHtml["adminLogin.html"]:::presentation
                indexHtml["index.html"]:::presentation
                headerHtml["header.html"]:::presentation
                errorAdminLogin["errorAdminLogin.html"]:::presentation
                errorDgiOneView["errorDgiOneView.html"]:::presentation
                dgiOneView["dgiOneView.html"]:::presentation
            end

            subgraph "Static Assets"
                direction TB
                cssMain["main.css"]:::presentation
                cssStyle["style.css"]:::presentation
                jsMain["main.js"]:::presentation
                jsUtil["util.js"]:::presentation
                fonts["Fonts"]:::presentation
                images["Images"]:::presentation
            end
        end

        subgraph "Business Logic Layer"
            direction TB
            connProvider["ConnectionProvider.java"]:::business
        end
    end

    subgraph "Data Layer"
        direction TB
        MySQL["MySQL Database"]:::data
        JDBC["JDBC Connector"]:::data
    end

    %% Relationships
    Browser -->|"HTTP Request/Response"| addNewStudent
    addNewStudent -->|"uses JDBC"| connProvider
    adminHome -->|"uses JDBC"| connProvider
    studentHome -->|"uses JDBC"| connProvider
    adminLoginAction -->|"uses JDBC"| connProvider
    insertNewResult -->|"uses JDBC"| connProvider

    connProvider -->|"JDBC Query/ResultSet"| MySQL
    MySQL -->|"ResultSet"| connProvider

    %% Click Events
    click addNewStudent "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/addNewStudent.jsp"
    click adminHome "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/adminHome.jsp"
    click studentHome "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/studentHome.jsp"
    click adminLoginAction "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/adminLoginAction.jsp"
    click insertNewResult "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/insertNewResult.jsp"
    click adminLoginHtml "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/adminLogin.html"
    click indexHtml "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/index.html"
    click headerHtml "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/header.html"
    click errorAdminLogin "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/errorAdminLogin.html"
    click errorDgiOneView "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/errorDgiOneView.html"
    click dgiOneView "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/dgiOneView.html"
    click cssMain "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/assets/css/main.css"
    click cssStyle "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/style.css"
    click jsMain "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/assets/js/main.js"
    click jsUtil "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/assets/js/util.js"
    click fonts "https://github.com/isavb03/university_result_management_system/tree/main/src/main/webapp/assets/fonts/"
    click images "https://github.com/isavb03/university_result_management_system/tree/main/src/main/webapp/images/"
    click connProvider "https://github.com/isavb03/university_result_management_system/blob/main/src/main/java/project/ConnectionProvider.java"
    click JDBC "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/WEB-INF/lib/mysql-connector-java-5.1.48-bin.jar"
    click MySQL "https://github.com/isavb03/university_result_management_system/blob/main/src/main/webapp/WEB-INF/web.xml"

    %% Styles
    classDef external fill:#f9f,stroke:#333,stroke-width:1px
    classDef presentation fill:#bbdefb,stroke:#0d47a1,stroke-width:1px
    classDef business fill:#c8e6c9,stroke:#1b5e20,stroke-width:1px
    classDef data fill:#ffe0b2,stroke:#e65100,stroke-width:1px
```
