# hannerb/plataforma-vivu-laravel architecture

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

- Interactive diagram: https://gitdiagram.com/hannerb/plataforma-vivu-laravel
- Repository: https://github.com/hannerb/plataforma-vivu-laravel

## Overview

##### Main Architectural Components

a) Client Layer
- Web Browser Interface
- Public Assets (CSS, JS, Images, Videos)
- Frontend Views (Blade Templates)

b) Application Layer
- Authentication & Authorization
- Controllers Layer
- Business Logic Layer
- Request Handling & Validation
- Service Providers

c) Data Layer
- Models
- Database
- File Storage
- Cache

##### Key Relationships to Highlight

a) User Flow Relationships:
- Authentication flows
- Course management flows
- Municipality assignment flows
- File handling flows

b) Data Flow Relationships:
- Model relationships (User → Courses → Enrollments)
- File storage interactions
- Cache interactions

##### Specific Components

a) Core Modules:
- User Management System
- Course Management System
- Municipality Management
- POA (Plan Operativo Anual) System
- Certification System
- File Management System
- Dashboard System

b) Supporting Services:
- Authentication Service
- Authorization/Role Management
- Session Management
- Cache Service
- Storage Service

##### Detailed Component Breakdown

For each major component, show:

a) Controllers Layer:
- Auth Controllers
- Resource Controllers
- API Controllers

b) Model Layer:
- User-related Models
- Course-related Models
- Municipality Models
- File Models

c) Middleware Layer:
- Authentication
- Role Checking
- CSRF Protection
- Request Validation

##### Technical Specifications

Technical annotations for:

- Laravel Framework 10.x
- PHP 8.x
- MySQL/PostgreSQL Database
- Frontend Stack (Bootstrap 4)
- Cache System
- Session Management

##### Integration Points

Integration points for:

- File Storage System
- Authentication System
- External APIs (if any)
- Broadcasting System

**[Client Layer]**
- ↓
**[Web Middleware]**
- ↓
**[Application Layer]**
- [Auth Module]
- [Course Management]
- [Municipality Management]
- [File Management]
- [Dashboard]
- ↓
**[Service Layer]**
- ↓
**[Data Access Layer]**
- [Models]
- [Database]
- [File Storage]

Remember to:
- Use consistent styling
- Brief descriptions for complex interactions
- Primary data flows
- Security boundaries

This structure will provide a clear visualization of the application's architecture while maintaining the necessary level of detail for a principal software engineer to understand the system's complete workflow and component interactions.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
        Assets["Public Assets"]
        Views["Frontend Views"]
    end

    subgraph AppLayer["Application Layer"]
        direction TB
        subgraph Auth["Authentication System"]
            AuthC["Auth Controllers"]:::auth
            AuthM["Auth Middleware"]:::auth
            AuthV["Auth Views"]:::auth
        end

        subgraph Core["Core Systems"]
            direction TB
            UserMgmt["User Management"]:::core
            CourseMgmt["Course Management"]:::core
            MuniMgmt["Municipality Management"]:::core
            POA["POA System"]:::core
            Cert["Certification System"]:::core
            FileMgmt["File Management"]:::core
            Dashboard["Dashboard System"]:::core
        end

        subgraph Services["Service Layer"]
            SessionMgmt["Session Management"]:::service
            CacheService["Cache Service"]:::service
            StorageService["Storage Service"]:::service
        end
    end

    subgraph DataLayer["Data Layer"]
        Models["Models"]:::data
        DB[(Database)]:::data
        FileStore["File Storage"]:::data
        Cache[(Cache)]:::data
    end

    Browser --> AuthC
    AuthC --> AuthM
    AuthM --> Core
    Core --> Services
    Services --> DataLayer
    
    %% Click events for components
    click AuthC "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/tree/master/app/Http/Controllers/Auth"
    click AuthM "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Middleware/Authenticate.php"
    click AuthV "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/tree/master/resources/views/auth"
    click UserMgmt "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/UserController.php"
    click CourseMgmt "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/CursoController.php"
    click MuniMgmt "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/AlianzaMunicipioController.php"
    click POA "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/PoaController.php"
    click Cert "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/CertificacionController.php"
    click FileMgmt "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/FileController.php"
    click Dashboard "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/blob/master/app/Http/Controllers/DashboardController.php"
    click Models "https://github.com/HannerB/PLATAFORMA-VIVU-LARAVEL/tree/master/app/Models"

    %% Styling
    classDef auth fill:#FFA500,stroke:#333,stroke-width:2px
    classDef core fill:#4169E1,stroke:#333,stroke-width:2px
    classDef service fill:#9370DB,stroke:#333,stroke-width:2px
    classDef data fill:#32CD32,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        AuthL["Authentication Components"]:::auth
        CoreL["Core Components"]:::core
        ServiceL["Service Components"]:::service
        DataL["Data Components"]:::data
    end
```
