# pablodeleon092/plandecarrera architecture

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

- Interactive diagram: https://gitdiagram.com/pablodeleon092/plandecarrera
- Repository: https://github.com/pablodeleon092/plandecarrera

## Overview

##### Project type and purpose
- This is a full-stack web application built on Laravel (PHP) with Inertia.js and React for the frontend.
- Purpose: manage academic entities (Carreras, Materias, Comisiones, Docentes, Usuarios) via CRUD interfaces, authentication/authorization, and background tasks (queues, jobs).

##### File structure
- Top-level:
- Dockerfile, docker-compose.yml, nginx config → containerized deployment
- public/index.php → entrypoint
- app/Http/Controllers, Models, Policies → MVC backend
- resources/js/{Components,Pages,Layouts} → React/Inertia UI
- routes/web.php, routes/auth.php → HTTP routing
- database/migrations & seeders → schema + initial data
- config/, bootstrap/, storage/, tests/ → config, bootstrap, persistence, testing
- Architectural patterns:
- MVC on server side (Controllers ↔ Models ↔ Views via Inertia)
- Component-based reusable React UI
- Inertia bridges server and client without an API layer
- Queues for background jobs (config/queue.php)

##### README

- On the left, “Client (Browser / Inertia + React)” with UI components.
- In the middle, “Server (Nginx → PHP-FPM / Laravel)” with layers: Routing → Controllers → Models → DB.
- On the right, “Persistence & Services” (Database, Redis, File Storage, Mail).
- API boundaries: even though Inertia isn’t a JSON API, illustrate prop-based data flow.
- If Dockerized, show “Docker Compose” umbrella containing App and DB containers.

##### Elements
– Clear component labels (e.g., “Inertia.js Adapter,” “Eloquent Models,” “Queue Worker”)
- Green for backend services
- Orange for data stores
- Gray for infrastructure (Docker, Nginx)

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Docker Compose"
        Dockerfile["Dockerfile"]:::infra
        DockerCompose["Docker Compose"]:::infra
        Nginx["Nginx Reverse Proxy"]:::infra
        AppContainer["App Container (PHP-FPM)"]:::infra
        DBContainer["DB Container (MySQL)"]:::infra
    end

    Dockerfile --> DockerCompose
    DockerCompose --> Nginx
    Nginx --> AppContainer
    DockerCompose --> DBContainer

    subgraph "Backend Application"
        Router["HTTP Routing"]:::backend
        Controllers["Controllers"]:::backend
        AuthControllers["Auth Controllers"]:::backend
        Middleware["Middleware & Inertia Adapter"]:::backend
        Requests["Form Requests (Validation)"]:::backend
        Models["Eloquent Models"]:::backend
        Policies["Policies"]:::backend
        ServiceProviders["Service Providers"]:::backend
        QueueCfg["Queue Config"]:::backend
        CacheCfg["Cache Config"]:::backend
        MailCfg["Mail Config"]:::backend
        FilesystemCfg["Filesystem Config"]:::backend
    end

    AppContainer --> Router
    Router --> Controllers
    Controllers --> AuthControllers
    Controllers --> Requests
    Controllers --> Middleware
    Controllers --> Models
    Controllers --> Policies
    Controllers --> ServiceProviders
    Controllers --> QueueCfg
    Controllers --> CacheCfg
    Controllers --> MailCfg
    Controllers --> FilesystemCfg
    Models --> DBContainer

    subgraph "Frontend Application"
        InertiaBoot["Inertia Bootstrap"]:::frontend
        ReactEntry["React Entrypoint"]:::frontend
        Components["React Components"]:::frontend
        Pages["Page-Level Views"]:::frontend
        Layouts["Layouts"]:::frontend
    end

    Middleware --> InertiaBoot
    InertiaBoot --> ReactEntry
    ReactEntry --> Components
    ReactEntry --> Pages
    ReactEntry --> Layouts

    subgraph "Persistence & External Services"
        DBConfig["Database Config"]:::datastore
        Migrations["DB Migrations"]:::datastore
        Seeders["DB Seeders"]:::datastore
        PATMigration["Personal Access Tokens Migration"]:::datastore
        Redis["Redis (Cache/Queue)"]:::datastore
        Storage["File Storage"]:::datastore
        MailService["Mail Service"]:::datastore
    end

    DBConfig --> DBContainer
    DBContainer --> Migrations
    DBContainer --> Seeders
    DBContainer --> PATMigration
    QueueCfg --> Redis
    CacheCfg --> Redis
    FilesystemCfg --> Storage
    MailCfg --> MailService

    click Dockerfile "https://github.com/pablodeleon092/plandecarrera/tree/main/Dockerfile"
    click DockerCompose "https://github.com/pablodeleon092/plandecarrera/blob/main/docker-compose.yml"
    click Nginx "https://github.com/pablodeleon092/plandecarrera/blob/main/nginx/default.conf"
    click Router "https://github.com/pablodeleon092/plandecarrera/blob/main/routes/web.php"
    click AuthControllers "https://github.com/pablodeleon092/plandecarrera/tree/main/app/Http/Controllers/Auth"
    click Controllers "https://github.com/pablodeleon092/plandecarrera/tree/main/app/Http/Controllers"
    click Requests "https://github.com/pablodeleon092/plandecarrera/tree/main/app/Http/Requests"
    click Middleware "https://github.com/pablodeleon092/plandecarrera/blob/main/app/Http/Middleware/HandleInertiaRequests.php"
    click Models "https://github.com/pablodeleon092/plandecarrera/tree/main/app/Models"
    click Policies "https://github.com/pablodeleon092/plandecarrera/blob/main/app/Policies/UserPolicy.php"
    click ServiceProviders "https://github.com/pablodeleon092/plandecarrera/blob/main/app/Providers/AppServiceProvider.php"
    click QueueCfg "https://github.com/pablodeleon092/plandecarrera/blob/main/config/queue.php"
    click CacheCfg "https://github.com/pablodeleon092/plandecarrera/blob/main/config/cache.php"
    click MailCfg "https://github.com/pablodeleon092/plandecarrera/blob/main/config/mail.php"
    click FilesystemCfg "https://github.com/pablodeleon092/plandecarrera/blob/main/config/filesystems.php"
    click InertiaBoot "https://github.com/pablodeleon092/plandecarrera/blob/main/resources/js/bootstrap.js"
    click ReactEntry "https://github.com/pablodeleon092/plandecarrera/blob/main/resources/js/app.jsx"
    click Components "https://github.com/pablodeleon092/plandecarrera/tree/main/resources/js/Components"
    click Pages "https://github.com/pablodeleon092/plandecarrera/tree/main/resources/js/Pages"
    click Layouts "https://github.com/pablodeleon092/plandecarrera/tree/main/resources/js/Layouts"
    click DBConfig "https://github.com/pablodeleon092/plandecarrera/blob/main/config/database.php"
    click Migrations "https://github.com/pablodeleon092/plandecarrera/tree/main/database/migrations"
    click Seeders "https://github.com/pablodeleon092/plandecarrera/tree/main/database/seeders"
    click PATMigration "https://github.com/pablodeleon092/plandecarrera/blob/main/database/migrations/2025_10_08_151543_create_personal_access_tokens_table.php"
    click Storage "https://github.com/pablodeleon092/plandecarrera/tree/main/storage/app"
    click MailService "https://github.com/pablodeleon092/plandecarrera/blob/main/config/services.php"

    classDef infra fill:#ddd,stroke:#888,stroke-width:1px;
    classDef backend fill:#cfc,stroke:#080,stroke-width:1px;
    classDef frontend fill:#ccf,stroke:#00f,stroke-width:1px;
    classDef datastore fill:#fc9,stroke:#f60,stroke-width:1px;
```
