# sanjoy-kundu/education_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/sanjoy-kundu/education_management_system
- Repository: https://github.com/sanjoy-kundu/education_management_system

## Overview

##### Main System Components

a) Client Layer
- Frontend components (resources/views)
- Both authentication and main application views
- Component-based architecture using Blade

b) Application Layer
- Controllers (app/Http/Controllers)
- Middleware (app/Http/Middleware)
- Models (app/Models)

c) Database Layer
- Database tables from migrations
- Relationships between models

##### Architectural Pattern Representation

**[Client Tier]**
- ↑↓
**[Application Tier]**
- ↑↓
**[Data Tier]**

##### Detailed Component Breakdown

- Blue: Frontend components
- Green: Controllers
- Yellow: Models
- Red: Database tables
- Purple: Middleware
- Gray: Service providers

##### Specific Components

Frontend Layer:
- Login Component
- Dashboard Component
- Class Management Components
- Subject Management Components
- Exam Schedule Components
- Navigation Components

Controller Layer:
- UserController
- DashboardController
- StudentClassController
- SubjectController
- SubSubjectController
- ExamScheduleController

Model Layer:
- User
- StudentClass
- Subject
- SubSubject
- ExamSchedule

Database Layer:
- users
- student_classes
- subjects
- sub_subjects
- exam_schedules

##### Additional Elements

Supporting components:
- Authentication flow
- Middleware stack
- Service providers
- Static assets (public/assets)

**[Client Browser]**
- ↓
**[Frontend Components]**
- ↓
**[Middleware Layer]**
- ↓
**[Controllers]**
- ↓
**[Models]**
- ↓
**[Database]**

##### Technical Details

- Laravel version
- Database type
- Authentication mechanism
- Key dependencies
- Asset compilation flow (Vite)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    Client(("Web Browser"))

    %% Frontend Layer
    subgraph Frontend
        Login["Login Component"]:::frontend
        Dashboard["Dashboard Component"]:::frontend
        
        subgraph ClassManagement["Class Management"]
            ClassComp["Class Component"]:::frontend
            ClassCreate["Class Create"]:::frontend
            ClassEdit["Class Edit"]:::frontend
        end
        
        subgraph SubjectManagement["Subject Management"]
            SubjectComp["Subject Component"]:::frontend
            SubjectCreate["Subject Create"]:::frontend
            SubjectEdit["Subject Edit"]:::frontend
        end
        
        subgraph ExamManagement["Exam Management"]
            ExamComp["Exam Schedule Component"]:::frontend
            ExamCreate["Exam Schedule Create"]:::frontend
            ExamEdit["Exam Schedule Edit"]:::frontend
        end
        
        Navigation["Navigation Components"]:::frontend
    end

    %% Middleware Layer
    subgraph Middleware
        Auth["Authentication"]:::middleware
        CSRF["CSRF Protection"]:::middleware
        Session["Session"]:::middleware
    end

    %% Controller Layer
    subgraph Controllers
        UserCtrl["UserController"]:::controller
        DashboardCtrl["DashboardController"]:::controller
        ClassCtrl["StudentClassController"]:::controller
        SubjectCtrl["SubjectController"]:::controller
        SubSubjectCtrl["SubSubjectController"]:::controller
        ExamCtrl["ExamScheduleController"]:::controller
    end

    %% Model Layer
    subgraph Models
        UserModel["User"]:::model
        ClassModel["StudentClass"]:::model
        SubjectModel["Subject"]:::model
        SubSubjectModel["SubSubject"]:::model
        ExamModel["ExamSchedule"]:::model
    end

    %% Database Layer
    subgraph Database
        UsersDB[(Users)]:::database
        ClassesDB[(Student Classes)]:::database
        SubjectsDB[(Subjects)]:::database
        SubSubjectsDB[(Sub Subjects)]:::database
        ExamSchedulesDB[(Exam Schedules)]:::database
    end

    %% Relationships
    Client --> Login
    Client --> Dashboard
    Client --> ClassManagement
    Client --> SubjectManagement
    Client --> ExamManagement
    Client --> Navigation

    Login --> Auth
    Dashboard --> Auth
    ClassManagement --> Auth
    SubjectManagement --> Auth
    ExamManagement --> Auth

    Auth --> UserCtrl
    Auth --> DashboardCtrl
    Auth --> ClassCtrl
    Auth --> SubjectCtrl
    Auth --> SubSubjectCtrl
    Auth --> ExamCtrl

    UserCtrl --> UserModel
    DashboardCtrl --> UserModel
    ClassCtrl --> ClassModel
    SubjectCtrl --> SubjectModel
    SubSubjectCtrl --> SubSubjectModel
    ExamCtrl --> ExamModel

    UserModel --> UsersDB
    ClassModel --> ClassesDB
    SubjectModel --> SubjectsDB
    SubSubjectModel --> SubSubjectsDB
    ExamModel --> ExamSchedulesDB

    %% Click Events
    click Login "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/login/loginComponent.blade.php"
    click Dashboard "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/mainComponent.blade.php"
    click ClassComp "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/classComponent.blade.php"
    click ClassCreate "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/classCreateComponent.blade.php"
    click ClassEdit "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/classEditComponent.blade.php"
    click SubjectComp "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/subject/subjectComponent.blade.php"
    click SubjectCreate "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/subject/subjectCreateComponent.blade.php"
    click SubjectEdit "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/subject/subjectEditComponent.blade.php"
    click ExamComp "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/examShedules/examSheduleComponent.blade.php"
    click ExamCreate "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/examShedules/examSheduleCreateComponent.blade.php"
    click ExamEdit "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/examShedules/examSheduleEditComponent.blade.php"
    click Navigation "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/resources/views/components/auth/navbarComponent.blade.php"
    click UserCtrl "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Http/Controllers/UserController.php"
    click DashboardCtrl "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Http/Controllers/DashboardController.php"
    click ClassCtrl "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Http/Controllers/StudentClassController.php"
    click SubjectCtrl "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Http/Controllers/SubjectController.php"
    click SubSubjectCtrl "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Http/Controllers/SubSubjectController.php"
    click ExamCtrl "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Http/Controllers/ExamScheduleController.php"
    click UserModel "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Models/User.php"
    click ClassModel "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Models/StudentClass.php"
    click SubjectModel "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Models/Subject.php"
    click SubSubjectModel "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Models/SubSubject.php"
    click ExamModel "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/app/Models/ExamSchedule.php"
    click UsersDB "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/database/migrations/2014_10_12_000000_create_users_table.php"
    click ClassesDB "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/database/migrations/2024_12_31_185113_create_student_classes_table.php"
    click SubjectsDB "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/database/migrations/2025_01_02_110128_create_subjects_table.php"
    click ExamSchedulesDB "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/database/migrations/2025_01_03_114841_create_exam_schedules_table.php"
    click SubSubjectsDB "https://github.com/Sanjoy-Kundu/Education_Management_System/blob/main/database/migrations/2025_01_04_171536_create_sub_subjects_table.php"

    %% Styles
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef controller fill:#2ecc71,stroke:#27ae60,color:white
    classDef model fill:#f1c40f,stroke:#f39c12,color:black
    classDef database fill:#e74c3c,stroke:#c0392b,color:white
    classDef middleware fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        Frontend_["Frontend"]:::frontend
        Controller_["Controller"]:::controller
        Model_["Model"]:::model
        Database_["Database"]:::database
        Middleware_["Middleware"]:::middleware
    end
```
