# zimalshahriar/sipi-cst-portal architecture

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

- Interactive diagram: https://gitdiagram.com/zimalshahriar/sipi-cst-portal
- Repository: https://github.com/zimalshahriar/sipi-cst-portal

## Overview

##### Main Components

a) User Interface Layer:
- Separate portals for Admin, Teacher, and Student
- Common authentication interface
- Shared assets (Bootstrap, CSS, JS)

b) Application Layer:
- User Management Module
- Announcement System
- Class Schedule Management
- Subject Management
- Grade Management
- Attendance System

c) Data Layer:
- MySQL Database
- File Storage (for uploads)

**[Client Layer]**
- Admin Portal
- Teacher Portal
- Student Portal

- ▼
**[Application Layer]**
- Authentication & Authorization
- Core Modules
- User Management
- Announcement System
- Class Schedule Management
- Subject Management
- Grade Management
- Attendance System
- Shared Services
- File Handling
- Session Management

- ▼
**[Data Layer]**
- MySQL Database
- File Storage

##### Technical Details

- PHP backend framework structure
- Bootstrap 5.3 UI framework
- Database schema relationships
- File upload paths and storage structure

##### Implementation Notes

- Use standardized UML notation where applicable
- Notes for critical security implementations
- Scalability points

##### Key Workflows to Highlight

a) User Management:
**Admin → User Management Module → Database**

b) Announcement Flow:
**Teacher/Admin → Announcement System → All Users**

c) Grade Management:
**Teacher → Grade Module → Student Portal → Database**

##### Security Layer Representation

- Authentication boundaries
- Session management
- Data encryption points

##### Additional Elements

- System boundaries
- External integration points
- Backup/recovery paths
- Error handling flows

This system design should effectively communicate the architecture of the SIPI-CST-Portal while highlighting its modular nature and the interaction between different user roles and system components.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef database fill:#e74c3c,stroke:#c0392b,color:white
    classDef shared fill:#f1c40f,stroke:#f39c12,color:black
    classDef security fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Client Layer
    subgraph ClientLayer["Client Layer"]
        AdminPortal["Admin Portal"]:::frontend
        TeacherPortal["Teacher Portal"]:::frontend
        StudentPortal["Student Portal"]:::frontend
    end

    %% Application Layer
    subgraph AppLayer["Application Layer"]
        %% Auth
        Auth["Authentication & Authorization"]:::security

        %% Core Modules
        subgraph CoreModules["Core Modules"]
            UserMgmt["User Management"]:::backend
            AnnounceSys["Announcement System"]:::backend
            ScheduleMgmt["Class Schedule Management"]:::backend
            SubjectMgmt["Subject Management"]:::backend
            GradeMgmt["Grade Management"]:::backend
            AttendanceSys["Attendance System"]:::backend
        end

        %% Shared Services
        subgraph SharedServices["Shared Services"]
            FileHandler["File Handling"]:::shared
            SessionMgmt["Session Management"]:::shared
        end
    end

    %% Data Layer
    subgraph DataLayer["Data Layer"]
        DB[(MySQL Database)]:::database
        FileStorage[("File Storage")]:::database
    end

    %% Connections
    AdminPortal --> Auth
    TeacherPortal --> Auth
    StudentPortal --> Auth

    Auth --> CoreModules
    Auth --> SharedServices

    UserMgmt --> DB
    AnnounceSys --> DB
    ScheduleMgmt --> DB
    SubjectMgmt --> DB
    GradeMgmt --> DB
    AttendanceSys --> DB

    FileHandler --> FileStorage
    SessionMgmt --> DB

    %% Click Events
    click AdminPortal "https://github.com/zimalshahriar/SIPI-CST-Portal/tree/master/admin/dist/pages/"
    click TeacherPortal "https://github.com/zimalshahriar/SIPI-CST-Portal/tree/master/teacher/dist/pages/"
    click StudentPortal "https://github.com/zimalshahriar/SIPI-CST-Portal/tree/master/student/dist/pages/"
    click UserMgmt "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/admin/dist/pages/manage_user.php"
    click AnnounceSys "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/teacher/dist/pages/manage_announcements.php"
    click ScheduleMgmt "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/teacher/dist/pages/class_schedule_management.php"
    click SubjectMgmt "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/admin/dist/pages/subject_management.php"
    click GradeMgmt "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/teacher/dist/pages/grade_report.php"
    click AttendanceSys "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/teacher/dist/pages/attendance.php"
    click DB "https://github.com/zimalshahriar/SIPI-CST-Portal/blob/master/Data Base/sipi_cst_portal.sql"
    click FileStorage "https://github.com/zimalshahriar/SIPI-CST-Portal/tree/master/uploads/"

    %% Legend
    subgraph Legend["Legend"]
        L1["Frontend Components"]:::frontend
        L2["Backend Modules"]:::backend
        L3["Database Components"]:::database
        L4["Shared Services"]:::shared
        L5["Security Components"]:::security
    end
```
