# tif-trabajo-integrador-final/v1fermosa architecture

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

- Interactive diagram: https://gitdiagram.com/tif-trabajo-integrador-final/v1fermosa
- Repository: https://github.com/tif-trabajo-integrador-final/v1fermosa

## Overview

##### Project type and purpose
- This is a Laravel-based full-stack monolithic web application (“Portal Web FERMOSA”) for managing educational offerings, campuses (sedes), partner agreements (convenios) and an online pre-inscription workflow.
- It follows the classic MVC pattern:
- Models (app/Models)
- Views (resources/views)
- Controllers (app/Http/Controllers)

##### File structure
- Top-level directories:
- public/ – publicly exposed webroot (index.php, .htaccess, images)
- app/ – core PHP code (Controllers, Models, Service Providers)
- resources/ – front-end assets (CSS, JS via Vite) and Blade templates
- routes/ – route definitions (web.php, console.php)
- config/ – framework and service configurations (database, cache, mail, maps…)
- database/ – migrations, seeders and factories for schema and initial data
- bootstrap/ – framework bootstrapping code
- storage/ – generated files (logs, cache, sessions, file uploads)
- tests/ – PHPUnit feature and unit tests
- Build & deployment files:
- composer.json/lock – PHP dependencies
- package.json & vite.config.js – front-end build via npm/Vite
- .gitlab-ci.yml – CI/CD pipeline
- .env.example – environment variables template

##### README for insights
- Stack: PHP 8.1+, Laravel, MySQL/PostgreSQL, npm/Vite (CSS & JS).
- Features: migrations & seeders automate schema + initial data load; routes map to controller actions for pages and form submissions; uses external map service (config/maps.php) and mail/queue systems.
- No microservices – single codebase, single deployment unit.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Layer
    subgraph "User Layer"
        direction TB
        Browser["Browser (User)"]:::frontend
    end

    %% Web Server
    subgraph "Web Server"
        direction TB
        WebServer["Web Server (Nginx/Apache)"]:::backend
        FrontController["public/index.php"]:::backend
        click FrontController "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/public/index.php"
    end

    Browser -->|"HTTP Request"| WebServer
    WebServer -->|"Serves"| FrontController

    %% Laravel Application
    subgraph "Laravel Application"
        direction TB
        Providers["AppServiceProvider"]:::logic
        click Providers "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Providers/AppServiceProvider.php"
        Kernel["HTTP Kernel & Middleware"]:::logic
        Router["Route Definitions"]:::logic
        click Router "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/routes/web.php"
        click Router "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/routes/console.php"
        
        subgraph "Controllers"
            direction TB
            ControllerBase["Controller.php"]:::logic
            click ControllerBase "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Http/Controllers/Controller.php"
            WebController["WebController"]:::logic
            click WebController "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Http/Controllers/WebController.php"
            CarreraController["CarreraController"]:::logic
            click CarreraController "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Http/Controllers/CarreraController.php"
            ConvenioController["ConvenioController"]:::logic
            click ConvenioController "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Http/Controllers/ConvenioController.php"
            SedeController["SedeController"]:::logic
            click SedeController "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Http/Controllers/SedeController.php"
            InscripcionController["InscripcionController"]:::logic
            click InscripcionController "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Http/Controllers/InscripcionController.php"
        end

        subgraph "Models"
            direction TB
            User["User"]:::logic
            click User "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/User.php"
            Sede["Sede"]:::logic
            click Sede "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/Sede.php"
            Carrera["Carrera"]:::logic
            click Carrera "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/Carrera.php"
            PlanEstudio["PlanEstudio"]:::logic
            click PlanEstudio "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/PlanEstudio.php"
            OfertaEducativa["OfertaEducativa"]:::logic
            click OfertaEducativa "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/OfertaEducativa.php"
            ConvenioModel["Convenio"]:::logic
            click ConvenioModel "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/Convenio.php"
            SolicitudInscripcion["SolicitudInscripcion"]:::logic
            click SolicitudInscripcion "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/app/Models/SolicitudInscripcion.php"
        end

        Views["Blade Views"]:::frontend
        click Views "https://github.com/tif-trabajo-integrador-final/v1fermosa/tree/main/resources/views"
        
        subgraph "Assets"
            direction TB
            CSS["resources/css/app.css"]:::frontend
            click CSS "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/resources/css/app.css"
            JSApp["resources/js/app.js"]:::frontend
            click JSApp "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/resources/js/app.js"
            JSBootstrap["resources/js/bootstrap.js"]:::frontend
            click JSBootstrap "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/resources/js/bootstrap.js"
        end

        Config["Configuration Files"]:::logic
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/app.php"
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/database.php"
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/cache.php"
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/queue.php"
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/maps.php"
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/mail.php"
        click Config "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/config/services.php"

        Providers --> Kernel
        Kernel --> Router
        Router --> Controllers
        Controllers --> Models
        Controllers --> Views
        Views --> Browser
        Controllers -->|"Query/Write"| Models
        Models -->|"DB Interaction"| Database
        Assets --> Views
    end

    %% Infrastructure
    subgraph "Infrastructure"
        direction TB
        Database["MySQL/PostgreSQL"]:::infra
        Migrations["Migrations & Seeders"]:::infra
        click Migrations "https://github.com/tif-trabajo-integrador-final/v1fermosa/tree/main/database/migrations/"
        click Migrations "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/database/seeders/DatabaseSeeder.php"
        click Migrations "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/database/seeders/SedeSeeder.php"
        Factories["Factories"]:::infra
        click Factories "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/database/factories/UserFactory.php"
        Cache["Redis Cache"]:::infra
        Queue["Queue (Redis/DB)"]:::infra
        Storage["Storage (logs, cache, sessions, uploads)"]:::infra
        click Storage "https://github.com/tif-trabajo-integrador-final/v1fermosa/tree/main/storage/"
    end

    Models --> Database
    Models --> Cache
    Controllers --> Queue
    Controllers --> Storage

    %% External Services
    subgraph "External Services"
        direction TB
        MapsAPI["Map API"]:::external
        MailService["Mail Service (SMTP/API)"]:::external
    end

    Controllers --> MapsAPI
    Queue --> MailService

    %% CI/CD & Build
    subgraph "CI/CD & Build Pipeline"
        direction TB
        GitLabCI[".gitlab-ci.yml"]:::ci
        Composer["composer.json / composer.lock"]:::ci
        Npm["package.json / package-lock.json"]:::ci
        ViteConfig["vite.config.js"]:::ci
        click GitLabCI "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/.gitlab-ci.yml"
        click Composer "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/composer.json"
        click Composer "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/composer.lock"
        click Npm "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/package.json"
        click Npm "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/package-lock.json"
        click ViteConfig "https://github.com/tif-trabajo-integrador-final/v1fermosa/blob/main/vite.config.js"
        GitLabCI --> Composer
        GitLabCI --> Npm
        Npm --> ViteConfig
        ViteConfig --> Assets
    end

    %% Styles
    classDef frontend fill:#e2f7e1,stroke:#0f0,stroke-width:1px
    classDef backend fill:#d0e7f9,stroke:#08f,stroke-width:1px
    classDef logic fill:#cfe2ff,stroke:#06f,stroke-width:1px
    classDef infra fill:#ffe5b4,stroke:#f90,stroke-width:1px
    classDef external fill:#f0f0f0,stroke:#666,stroke-width:1px
    classDef ci fill:#f3e5f5,stroke:#a42,stroke-width:1px
```
