# ikerbuded/appcites-projectedwes architecture

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

- Interactive diagram: https://gitdiagram.com/ikerbuded/appcites-projectedwes
- Repository: https://github.com/ikerbuded/appcites-projectedwes

## Overview

##### Project type and purpose
- This is a monolithic, full-stack Laravel web application.
- From the directory names (BuscarParellaController, CitaController, MissatgeController, Preferencia, Foto, User) and views (buscarparella, cita, missatge, usuari), it’s clearly a dating/messaging platform: users register, set preferences, browse matches, exchange messages, schedule dates, upload photos.

##### File structure
- app/Http/Controllers → HTTP layer (MVC controllers handling web requests).
- app/Models → Eloquent ORM domain models (User, Cita (date), Missatge (message), Preferencia, Foto, Interaccio).
- resources/views → Blade templates forming the UI.
- resources/js & resources/css with vite.config.js → front-end asset pipeline.
- routes/web.php & routes/auth.php → routing definitions.
- config/ & bootstrap/ → framework and environment configuration.
- database/migrations & seeders → relational schema migrations and seed data.
- storage/app/public & storage/app/private → file storage (user photos, private assets).
- tests/ → feature and unit tests drive quality.

##### README
- Laravel’s routing, service container, middleware.
- Eloquent ORM.
- Blade templating.
- Vite for asset bundling.
- Migrations for schema.

##### Detail
- Custom modules: BuscarParella (matching engine), Cita (dating scheduler), Interaccio (interactions tracking).
- Don’t omit the asset build step (Vite) or storage symlink (public/storage).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Browser"]:::frontend

    subgraph "HTTP Layer"
        WebServer["Web Server\n(public/index.php)"]:::backend
    end
    click WebServer "https://github.com/ikerbuded/appcites-projectedwes/blob/main/public/index.php"

    Browser -->|HTTP GET/POST| WebServer
    WebServer -->|HTTP Request| LaravelKernel["Laravel Kernel\n(bootstrap/app.php)"]:::backend
    click LaravelKernel "https://github.com/ikerbuded/appcites-projectedwes/blob/main/bootstrap/app.php"

    subgraph "Routing & Middleware"
        Router["Router\n(routes/web.php)\n(routes/auth.php)"]:::backend
    end
    click Router "https://github.com/ikerbuded/appcites-projectedwes/blob/main/routes/web.php"
    click Router "https://github.com/ikerbuded/appcites-projectedwes/blob/main/routes/auth.php"

    LaravelKernel --> Router

    subgraph "Controllers (MVC)"
        BPC["BuscarParellaController"]:::backend
        CC["CitaController"]:::backend
        MC["MissatgeController"]:::backend
        PrC["PrefereciaController"]:::backend
        FC["FotoController"]:::backend
        UC["UsuariController"]:::backend
        AuthC["Auth Controllers"]:::backend
    end
    click BPC "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Http/Controllers/BuscarParellaController.php"
    click CC "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Http/Controllers/CitaController.php"
    click MC "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Http/Controllers/MissatgeController.php"
    click PrC "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Http/Controllers/PrefereciaController.php"
    click FC "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Http/Controllers/FotoController.php"
    click UC "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Http/Controllers/UsuariController.php"
    click AuthC "https://github.com/ikerbuded/appcites-projectedwes/tree/main/app/Http/Controllers/Auth/"

    Router --> BPC
    Router --> CC
    Router --> MC
    Router --> PrC
    Router --> FC
    Router --> UC
    Router --> AuthC

    subgraph "Service Layer"
        SL["AppServiceProvider"]:::backend
    end
    click SL "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Providers/AppServiceProvider.php"

    BPC --> SL
    CC --> SL
    MC --> SL
    PrC --> SL
    FC --> SL
    UC --> SL
    AuthC --> SL

    subgraph "Models & ORM"
        UserM["User"]:::backend
        CitaM["Cita"]:::backend
        MissM["Missatge"]:::backend
        PrefM["Preferencia"]:::backend
        FotoM["Foto"]:::backend
        InterM["Interaccio"]:::backend
    end
    click UserM "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Models/User.php"
    click CitaM "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Models/Cita.php"
    click MissM "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Models/Missatge.php"
    click PrefM "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Models/Preferencia.php"
    click FotoM "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Models/Foto.php"
    click InterM "https://github.com/ikerbuded/appcites-projectedwes/blob/main/app/Models/Interaccio.php"

    SL --> UserM
    SL --> CitaM
    SL --> MissM
    SL --> PrefM
    SL --> FotoM
    SL --> InterM

    BPC --> UserM
    CC --> CitaM
    MC --> MissM
    PrC --> PrefM
    FC --> FotoM
    UC --> UserM

    subgraph "Data Stores"
        DB["Database\n(MySQL/PostgreSQL)"]:::data
        StoragePublic["Public Storage\n(storage/app/public/)"]:::data
        StoragePrivate["Private Storage\n(storage/app/private/)"]:::data
        Cache["Redis/Cache"]:::data
        QueueDB["Queue DB\ntable jobs / failed_jobs"]:::data
    end
    click DB "https://github.com/ikerbuded/appcites-projectedwes/blob/main/database/migrations/2025_04_23_153347_create_preferencies_table.php"
    click DB "https://github.com/ikerbuded/appcites-projectedwes/blob/main/database/migrations/2025_04_23_154819_create_missatges_table.php"
    click DB "https://github.com/ikerbuded/appcites-projectedwes/blob/main/database/migrations/2025_04_23_154851_create_cites_table.php"
    click DB "https://github.com/ikerbuded/appcites-projectedwes/blob/main/database/migrations/2025_04_24_150704_create_fotos_table.php"
    click DB "https://github.com/ikerbuded/appcites-projectedwes/blob/main/database/migrations/2025_05_08_143855_create_interaccions_table.php"
    click DB "https://github.com/ikerbuded/appcites-projectedwes/blob/main/database/seeders/DatabaseSeeder.php"

    UserM -->|SQL Query| DB
    CitaM -->|SQL Query| DB
    MissM -->|SQL Query| DB
    PrefM -->|SQL Query| DB
    FotoM -->|SQL Query| DB
    InterM -->|SQL Query| DB

    BPC -->|Store Photo| StoragePublic
    FC -->|Access Files| StoragePrivate

    subgraph "Assets & Views"
        Views["Blade Views\n(resources/views/)"]:::frontend
        JS["JS/CSS Source\n(resources/js & resources/css)"]:::frontend
        Vite["Vite Config\n(vite.config.js)"]:::frontend
        CompiledAssets["Public Assets\n(public/css, public/img/)"]:::frontend
    end
    click Views "https://github.com/ikerbuded/appcites-projectedwes/blob/main/resources/views/buscarparella/index.blade.php"
    click Views "https://github.com/ikerbuded/appcites-projectedwes/blob/main/resources/views/cita/index.blade.php"
    click Views "https://github.com/ikerbuded/appcites-projectedwes/blob/main/resources/views/missatge/index.blade.php"
    click Views "https://github.com/ikerbuded/appcites-projectedwes/blob/main/resources/views/usuari/perfil.blade.php"
    click JS "https://github.com/ikerbuded/appcites-projectedwes/blob/main/resources/js/app.js"
    click JS "https://github.com/ikerbuded/appcites-projectedwes/blob/main/resources/css/app.css"
    click Vite "https://github.com/ikerbuded/appcites-projectedwes/blob/main/vite.config.js"

    CC -->|Render| Views
    JS -->|Bundle| CompiledAssets
    Vite -->|Config| CompiledAssets
    CompiledAssets --> Browser
    Views --> Browser

    subgraph "External Services"
        Mail["Mail Service\n(SMTP/Mailgun)"]:::external
    end
    click Mail "https://github.com/ikerbuded/appcites-projectedwes/blob/main/config/mail.php"

    MC -->|Send Email| Mail
    UC -->|Send Email| Mail

    QueueWorker["Queue Worker"]:::backend
    click QueueWorker "https://github.com/ikerbuded/appcites-projectedwes/blob/main/config/queue.php"
    QueueWorker --> QueueDB
    QueueWorker --> Mail

    classDef frontend fill:#e0ffe0,stroke:#009900;
    classDef backend fill:#e0f0ff,stroke:#0066cc;
    classDef data fill:#fff4e6,stroke:#ff9900;
    classDef external fill:#f0f0f0,stroke:#666666;
```
