# oddegen/smool architecture

> Architecture diagram of the GitHub repository oddegen/smool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oddegen/smool
- Repository: https://github.com/oddegen/smool

## Overview

##### Main System Components

a) User Interface Layer:
- Admin Panel (Filament-based)
- Teacher Panel
- Student Panel
- Authentication interfaces

b) Application Layer:
- Core Business Logic
- Service Modules
- Resource Management
- Event Handling

c) Data Layer:
- PostgreSQL Database
- Redis Cache
- File Storage

##### Key Architectural Elements

Frontend Components:
**[User Interface Layer]**
- Admin Dashboard
- Teacher Dashboard
- Student Dashboard
- Shared Components
- Calendar Widgets
- Notification System
- Profile Management

Core Modules:
**[Application Layer]**
- Academic Management
- Class/Section Management
- Subject Management
- Schedule Management
- User Management
- Role-based Access Control
- Profile Management
- Assessment System
- Grade Management
- Assignment Handling
- Attendance Tracking
- Communication System
- Event Management
- Notifications

##### Integration Points

Connections between:
- Authentication flows
- Database interactions
- Cache operations
- File storage operations
- Email service integration

##### Data Flow Indicators

- User request flows
- Authentication processes
- CRUD operations
- Event broadcasting
- Cache interactions

##### Infrastructure Components

Clearly mark:
- Docker containers
- Redis cache server
- PostgreSQL database
- File storage system
- Queue system for jobs

##### Security Layer

Highlight:
- Authentication middleware
- Role-based access control
- API security measures
- Session management

Remember to:
- Clear boundaries between different system components
- Scalability aspects of the architecture
- Integration points with external services
- Document the event-driven architecture patterns

This will provide a comprehensive view of the system while maintaining clarity and usefulness for technical discussions and system understanding.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI["User Interface Layer"]
        direction TB
        Admin["Admin Panel"]
        Teacher["Teacher Panel"]
        Student["Student Panel"]
        Auth["Authentication"]
        
        subgraph SharedUI["Shared Components"]
            Calendar["Calendar Widgets"]
            NotifUI["Notification UI"]
            Profile["Profile Management"]
        end
    end

    subgraph Core["Application Layer"]
        direction TB
        subgraph Academic["Academic Management"]
            Classes["Class/Section Management"]
            Subjects["Subject Management"]
            Schedule["Schedule Management"]
        end

        subgraph Assessment["Assessment System"]
            Grades["Grade Management"]
            Assignments["Assignment Handling"]
            Attendance["Attendance Tracking"]
        end

        subgraph Communication["Communication System"]
            Events["Event Management"]
            Notifications["Notifications"]
        end

        Services["Core Services"]
        Jobs["Job Processing"]
        Settings["System Settings"]
    end

    subgraph Data["Data Layer"]
        Models["Data Models"]
        DB[(PostgreSQL)]
        Redis[(Redis Cache)]
        Storage["File Storage"]
        Migrations["Database Migrations"]
    end

    %% Connections
    UI --> Core
    Core --> Data
    Communication --> Redis
    Core --> Redis
    Jobs --> Redis

    %% Click events
    click Admin "https://github.com/oddegen/SMOOL/tree/main/app/Filament/"
    click Teacher "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Teacher/"
    click Student "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Student/"
    click Auth "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Pages/Auth/"
    click Classes "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Clusters/Classes/"
    click Subjects "https://github.com/oddegen/SMOOL/blob/main/app/Filament/Resources/SubjectResource.php"
    click Schedule "https://github.com/oddegen/SMOOL/blob/main/app/Filament/Teacher/Pages/ViewSchedule.php"
    click Grades "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Teacher/Resources/GradeResource/"
    click Assignments "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Teacher/Resources/AssignmentResource/"
    click Attendance "https://github.com/oddegen/SMOOL/blob/main/app/Filament/Teacher/Pages/Attendances.php"
    click Events "https://github.com/oddegen/SMOOL/tree/main/app/Filament/Resources/EventResource/"
    click Notifications "https://github.com/oddegen/SMOOL/blob/main/app/Notifications/EventNotification.php"
    click Models "https://github.com/oddegen/SMOOL/tree/main/app/Models/"
    click Migrations "https://github.com/oddegen/SMOOL/tree/main/database/migrations/"
    click Services "https://github.com/oddegen/SMOOL/tree/main/app/Services/"
    click Jobs "https://github.com/oddegen/SMOOL/tree/main/app/Jobs/"
    click Settings "https://github.com/oddegen/SMOOL/blob/main/app/Settings/SchoolSettings.php"

    %% Styling
    classDef ui fill:#2196F3,color:white
    classDef core fill:#4CAF50,color:white
    classDef data fill:#FF9800,color:white
    classDef storage fill:#9C27B0,color:white
    classDef infrastructure fill:#757575,color:white

    class Admin,Teacher,Student,Auth,SharedUI,Calendar,NotifUI,Profile ui
    class Academic,Assessment,Communication,Services,Jobs,Settings core
    class Models,DB,Migrations data
    class Redis,Storage storage
    
    %% Legend
    subgraph Legend
        UI_L["User Interface"]:::ui
        Core_L["Core Components"]:::core
        Data_L["Data Components"]:::data
        Storage_L["Storage/Cache"]:::storage
    end
```
