# cepdnaclk/e19-co227-engineering-education-unit architecture

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

- Interactive diagram: https://gitdiagram.com/cepdnaclk/e19-co227-engineering-education-unit
- Repository: https://github.com/cepdnaclk/e19-co227-engineering-education-unit

## Overview

##### Project type and purpose
- This is a full-stack web application (“Engineering Education Unit”) consisting of:
– A React-based SPA in Application/FrontEnd/navbar
– A Java Spring Boot backend in Application/BackEnd/General_Elective_Subjects
– A MySQL schema (eeu.sql) under Application/Database
- Purpose: allow Admin, Lecturers and Students to browse courses, book rooms, view staff details, manage resources, and secure operations via JWT.

##### File structure
- Top-level “Application” folder separates FrontEnd, BackEnd, and Database artifacts.
- BackEnd is a monolith using Spring Boot’s standard package layering:
– auth (AuthenticationController, JWT filter, services)
– Config (CORS, security, beans)
– Controller (REST endpoints: GES, Staff, File upload, Seminar)
– Service (+Impl) (business logic)
– Repository (Spring Data JPA interfaces)
– Model (JPA entities: User, Role, GES, Staff, Token, etc.)
– resources (application.properties, static JSON/text)
- FrontEnd is a React project with:
– src/Pages (per-feature page components)
– src/components (UI pieces: Navbar, AppBar, Footer, Search, ImageSlider)
– RoutesConfig for client-side routing
- Database: single SQL file to instantiate MySQL schema.

##### README for additional insights
- Technology stack: React + Bootstrap, Java/Spring, Spring Security with JWT, MySQL.
- Roles: Admin (content management, override bookings, upload videos), Users (booking, browse resources).

##### Key details not to omit
– AuthenticationController and JwtAuthenticationFilter as the security gateway
– Repositories connecting to MySQL (show table/entity examples)
– File upload/download path
– CORS configuration enabling UI↔API cross-origin calls
– Any external dependencies (e.g., SMTP if email verification is later added)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        Browser((Web Browser))
        React["React SPA"]:::ui
        RoutesConfig["RoutesConfig"]:::ui
        Navbar["Navbar Component"]:::ui
        AppBar["App Bar Component"]:::ui
        Footer["Footer Component"]:::ui
        Search["Search Bar Component"]:::ui
        Slider["Image Slider Component"]:::ui
        Pages["Page Components"]:::ui
        CDN[(CDN / Static Host)]:::ui
    end

    %% Backend Layer
    subgraph "API & Services Layer"
        API["Spring Boot API"]:::backend
        SecConfig["Security Configuration"]:::security
        Cors["CORS Configuration"]:::backend
        JwtFilter["JWT Authentication Filter"]:::security
        JwtService["JWT Service"]:::security
        AuthCtrl["Authentication Controller"]:::backend
        AuthService["Authentication Service"]:::backend
        Controllers["REST Controllers"]:::backend
        Services["Business Services"]:::backend
        Repos["JPA Repositories"]:::backend
        Models["JPA Entity Models"]:::backend
        FileStore["File Storage (local)"]:::datastore
        Props["Application Properties"]:::backend
    end

    %% Data Layer
    subgraph "Data Layer"
        DB[(MySQL Database)]:::datastore
    end

    %% Connections
    Browser --> React
    React --> RoutesConfig
    React --> Navbar
    React --> AppBar
    React --> Footer
    React --> Search
    React --> Slider
    React --> Pages
    React --> API
    React --> CDN
    CDN --> Browser

    API --> SecConfig
    API --> Cors
    API --> JwtFilter
    JwtFilter --> JwtService
    API --> AuthCtrl
    AuthCtrl --> AuthService
    API --> Controllers
    Controllers --> Services
    Services --> Repos
    Repos --> Models
    Repos --> DB
    Controllers --> FileStore
    API --> Props

    %% Click Events
    click React "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/tree/main/Application/FrontEnd/navbar/src"
    click RoutesConfig "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/FrontEnd/navbar/src/components/menu/RoutesConfig.js"
    click Navbar "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/FrontEnd/navbar/src/components/menu/Navbarmenu.js"
    click AppBar "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/FrontEnd/navbar/src/components/Appbar/Appbar.js"
    click Footer "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/FrontEnd/navbar/src/components/Footer/Footer.jsx"
    click Search "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/FrontEnd/navbar/src/components/Search/Searchbar.js"
    click Slider "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/FrontEnd/navbar/src/components/ImageSlider/ImageSlider.js"
    click Pages "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/tree/main/Application/FrontEnd/navbar/src/Pages"
    click API "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/GeneralElectiveSubjectsApplication.java"
    click SecConfig "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Config/SecurityConfiguration.java"
    click Cors "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Config/CorsConfig.java"
    click JwtFilter "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Config/JwtAthenticationFilter.java"
    click JwtService "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Config/JwtService.java"
    click AuthCtrl "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/auth/AuthenticationController.java"
    click AuthService "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/auth/AuthenticationService.java"
    click Controllers "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/tree/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Controller"
    click Services "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/tree/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Service"
    click Repos "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/tree/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Repository"
    click Models "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/tree/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/Model"
    click FileStore "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/java/com/GES/General_Elective_Subjects/files/hello.txt"
    click Props "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/BackEnd/General_Elective_Subjects/General_Elective_Subjects/src/main/resources/application.properties"
    click DB "https://github.com/cepdnaclk/e19-co227-engineering-education-unit/blob/main/Application/Database/eeu.sql"

    %% Styles
    classDef ui fill:#D0E6FA,stroke:#0366d6,color:#0366d6
    classDef backend fill:#D0FAD0,stroke:#28a745,color:#28a745
    classDef datastore fill:#FAD8A6,stroke:#d46b08,color:#d46b08
    classDef security fill:#FAD0D0,stroke:#d73a49,color:#d73a49
```
