# abirhasankhan/capstone-management-webapp architecture

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

- Interactive diagram: https://gitdiagram.com/abirhasankhan/capstone-management-webapp
- Repository: https://github.com/abirhasankhan/capstone-management-webapp

## Overview

##### Main Components
- Frontend Components:
- Two primary view directories under “www”: one for Faculty (www/facultyView) and one for Students (www/studentView). These handle the presentation pages such as login, registration, profile, grading, and project status.
- Assets and resources: CSS files (located in www/css) for styling, JS files (in www/js) for interactive functionality, and static images for screenshots and design reference.
- Composer-related files in www (composer.json and composer.lock) hint at dependency management for PHP packages.

- Backend Components:
- The server directory (www/server) contains configuration files (e.g., config.php) that likely handle database connections and global settings.
- PHP scripts spread across the facultyView and studentView directories that implement business logic for user authentication, registration, grading, and viva management.

- Database:
- The capstonedatabase.sql file indicates the usage of a MySQL database for storing user data, project details, grading records, and scheduling information.

- External Services & Dependencies:
- The project uses PHPMailer for email verification.
- Bootstrap is used on the frontend for responsive design.

##### Understand the Relationships and Interactions
- The Frontend (client-side) interacts with the Backend PHP scripts through direct form submissions and page requests. Each view (facultyView/studentView) presents specific UI components that trigger server-side actions.
- The Backend (PHP scripts) processes these requests, performs business logic (e.g., registration, grade submission, login verification) and communicates with the MySQL database for data persistence.
- Email verification via PHPMailer is triggered during user registration, adding an external service dependency.
- The Admin interface (implied through the README) also plays a role, though not clearly separated in the file tree; it likely resides within some of these PHP pages that admin users can access.

##### Architectural Patterns and Design Principles
- The project is structured in a modular way, separating frontend views (by user role) from server-side configurations and business logic.
- Although not explicitly MVC, the directory separation (views in facultyView and studentView, server config separate) approximates a separation of concerns.
- The usage of Composer for dependency management and clear separation of static assets (css, js, images) marks adherence to modern web development design principles.

- Client (Browser) Layers: Student Interface and Faculty/Administrator Interface.
- Web Server Components: PHP Backend (segregated into role-specific controllers for login, registration, grading, etc.) and server configuration.
- Database Server: MySQL Database, with connections indicated by PHP scripts.
- External Email Service: PHPMailer (or a mail server) used for sending verification emails.
- Dependency/Package Manager: Composer managing third-party libraries.
- The client sends HTTP requests to the PHP scripts.
- PHP scripts interact with the MySQL database.
- PHPMailer is invoked for verification emails.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend (Client)"
        stu("Student Interface"):::frontend
        fac("Faculty/Administrator Interface"):::frontend
    end

    %% Static Assets
    subgraph "Static Assets"
        css("CSS Assets"):::assets
        js("JS Assets"):::assets
        images("Image Assets"):::assets
    end

    %% Dependency Management
    subgraph "Dependency Management"
        compJson("Composer.json"):::dependency
        compLock("Composer.lock"):::dependency
    end

    %% Backend Layer
    subgraph "Backend (PHP Web Server)"
        backend("PHP Backend"):::backend
        config("Server Configuration"):::backend
    end

    %% Database and External Services
    db("MySQL Database"):::database
    mail("PHPMailer Integration"):::external

    %% Data Flow: Frontend to Backend
    stu -->|"HTTP_Request"| backend
    fac -->|"HTTP_Request"| backend

    %% Assets providing static resources to Frontend
    css -->|"Provides_styling"| stu
    js -->|"Provides_functionality"| stu
    images -->|"Provides_visuals"| stu

    css -->|"Provides_styling"| fac
    js -->|"Provides_functionality"| fac
    images -->|"Provides_visuals"| fac

    %% Dependencies used by Backend
    compJson -->|"Dependency"| backend
    compLock -->|"Dependency"| backend

    %% Backend uses its configuration file
    config -->|"Loads_configuration"| backend

    %% Backend interactions with Database and External Service
    backend -->|"DB_Query"| db
    backend -->|"Email_Verification"| mail

    %% Click Events
    click stu "https://github.com/abirhasankhan/capstone-management-webapp/tree/main/www/studentView"
    click fac "https://github.com/abirhasankhan/capstone-management-webapp/tree/main/www/facultyView"
    click css "https://github.com/abirhasankhan/capstone-management-webapp/tree/main/www/css"
    click js "https://github.com/abirhasankhan/capstone-management-webapp/tree/main/www/js"
    click images "https://github.com/abirhasankhan/capstone-management-webapp/tree/main/images"
    click compJson "https://github.com/abirhasankhan/capstone-management-webapp/blob/main/www/composer.json"
    click compLock "https://github.com/abirhasankhan/capstone-management-webapp/blob/main/www/composer.lock"
    click config "https://github.com/abirhasankhan/capstone-management-webapp/blob/main/www/server/config.php"
    click db "https://github.com/abirhasankhan/capstone-management-webapp/blob/main/capstonedatabase.sql"

    %% Styles
    classDef frontend fill:#A3E4D7,stroke:#1ABC9C,stroke-width:2px;
    classDef backend fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef assets fill:#FADBD8,stroke:#CD6155,stroke-width:2px;
    classDef dependency fill:#AED6F1,stroke:#3498DB,stroke-width:2px;
    classDef database fill:#F5B7B1,stroke:#E74C3C,stroke-width:2px;
    classDef external fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
```
