# albertocard/date-booking architecture

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

- Interactive diagram: https://gitdiagram.com/albertocard/date-booking
- Repository: https://github.com/albertocard/date-booking

## Overview

##### Project type and purpose
- Date-Booking is a full-stack web application combining a Laravel (PHP) backend and a Vue.js SPA frontend.
- It provides appointment and ticket reservation functionality (healthcare, entertainment) with QR-code generation for validation.

##### File structure
- Top-level Laravel directories:
- app/ (Controllers, Models, Providers)
- config/, database/ (migrations, seeders, factories), routes/ (web.php, api.php)
- public/ (entry point index.php, assets)
- resources/js/ (Vue components, router.js, bootstrap.js, firebase.js) and resources/views/ (Blade templates)
- Build tools & scripts: composer.json, package.json, vite.config.js, artisan, npm scripts
- Deployment files: .env.example, .gitignore, phpunit.xml

##### README for additional insights
- Confirms Laravel 12.8.1 + Vue 3.5.13 stack
- SPA served via a Vue dev server in development or as a compiled bundle served by Laravel/public
- Uses Vue Router for client-side routing, Firebase (likely for real-time or QR code storage), and standard Laravel queues/mail cache/session

## Diagram (Mermaid)

```mermaid
graph TB

    subgraph "Frontend Layer"
        Browser["User Browser"]:::frontend
        Blade["SPA Blade Template"]:::frontend
        SPA["Vue SPA Entry Point"]:::frontend
        Components["Vue SPA Components"]:::frontend
        Router["Vue Router Configuration"]:::frontend
        BootstrapJS["Frontend Initialization"]:::frontend
        FirebaseSDK["Firebase SDK Integration"]:::frontend

        Browser -->|HTTP/HTTPS| Blade
        Blade --> SPA
        SPA --> Components
        SPA --> Router
        SPA --> BootstrapJS
        SPA --> FirebaseSDK
    end

    subgraph "Build & Dev Tools"
        Node["Node.js / npm"]:::frontend
        Vite["Vite Configuration"]:::frontend
        PackageJSON["package.json / npm Scripts"]:::frontend

        Node --> Vite
        Node --> PackageJSON
        Vite --> SPA
    end

    subgraph "Backend Layer"
        WebServer["Web Server / PHP-FPM"]:::backend
        API_Routes["Laravel API Routes"]:::backend
        Web_Routes["Laravel Web Routes"]:::backend
        Controllers["HTTP Controllers"]:::backend
        Models["Eloquent Models"]:::backend
        QueueWorker["Queue Worker"]:::backend
        ConfigQueue["Queue Configuration"]:::backend
        ConfigMail["Mail Configuration"]:::backend

        WebServer --> API_Routes
        WebServer --> Web_Routes
        API_Routes --> Controllers
        Web_Routes --> Controllers
        Controllers --> Models
        WebServer --> QueueWorker
        Controllers -->|dispatch jobs| QueueWorker
        QueueWorker --> ConfigQueue
        QueueWorker --> ConfigMail
    end

    subgraph "Data Stores"
        MySQL["MySQL Database"]:::datastore
        Migrations["Database Migrations"]:::datastore
        Factories["Model Factories"]:::datastore
        Seeders["Database Seeders"]:::datastore
        DBConfig["Database Configuration"]:::datastore
        Storage["Filesystem Storage"]:::datastore

        Controllers --> MySQL
        Controllers --> Storage
        MySQL --> Migrations
        MySQL --> Factories
        MySQL --> Seeders
        MySQL --> DBConfig
    end

    subgraph "Environment & Testing"
        Env[".env.example (Environment)"]:::backend
        Tests["Test Suite"]:::backend

        Env --> WebServer
        Env --> Node
        Tests --> Controllers
    end

    subgraph "External Services"
        SMTP["SMTP / Mail Provider"]:::external
        Payment["Payment Gateway"]:::external
        FirebaseService["Firebase Service"]:::external

        QueueWorker --> SMTP
        Controllers --> Payment
        BootstrapJS --> FirebaseService
        QueueWorker --> FirebaseService
    end

    click Components "https://github.com/albertocard/date-booking/tree/master/DateBooking/resources/js/Components/"
    click SPA "https://github.com/albertocard/date-booking/blob/master/DateBooking/resources/js/app.js"
    click Router "https://github.com/albertocard/date-booking/blob/master/DateBooking/resources/js/router.js"
    click BootstrapJS "https://github.com/albertocard/date-booking/blob/master/DateBooking/resources/js/bootstrap.js"
    click FirebaseSDK "https://github.com/albertocard/date-booking/blob/master/DateBooking/resources/js/firebase.js"
    click Blade "https://github.com/albertocard/date-booking/blob/master/DateBooking/resources/views/vue.blade.php"
    click Vite "https://github.com/albertocard/date-booking/blob/master/DateBooking/vite.config.js"
    click PackageJSON "https://github.com/albertocard/date-booking/blob/master/DateBooking/package.json"
    click API_Routes "https://github.com/albertocard/date-booking/blob/master/DateBooking/routes/api.php"
    click Web_Routes "https://github.com/albertocard/date-booking/blob/master/DateBooking/routes/web.php"
    click Controllers "https://github.com/albertocard/date-booking/tree/master/DateBooking/app/Http/Controllers/"
    click Models "https://github.com/albertocard/date-booking/tree/master/DateBooking/app/Models/"
    click ConfigQueue "https://github.com/albertocard/date-booking/blob/master/DateBooking/config/queue.php"
    click ConfigMail "https://github.com/albertocard/date-booking/blob/master/DateBooking/config/mail.php"
    click Migrations "https://github.com/albertocard/date-booking/tree/master/DateBooking/database/migrations/"
    click Factories "https://github.com/albertocard/date-booking/tree/master/DateBooking/database/factories/"
    click Seeders "https://github.com/albertocard/date-booking/tree/master/DateBooking/database/seeders/"
    click DBConfig "https://github.com/albertocard/date-booking/blob/master/DateBooking/config/database.php"
    click Storage "https://github.com/albertocard/date-booking/tree/master/DateBooking/storage/app/"
    click Env "https://github.com/albertocard/date-booking/blob/master/DateBooking/.env.example"
    click Tests "https://github.com/albertocard/date-booking/tree/master/DateBooking/tests/"

    classDef frontend fill:#D0E8FF,stroke:#000;
    classDef backend fill:#D0FFD8,stroke:#000;
    classDef datastore fill:#FFE4B2,stroke:#000;
    classDef external fill:#E0E0E0,stroke:#000;
```
