netgescon-day0/docs/00-MASTER-DOCS-UNIFICATI/02-ARCHITETTURA-SISTEMA
2026-03-10 21:00:01 +00:00
..
README.md chore: NetGescon day-0 baseline 2026-03-10 2026-03-10 21:00:01 +00:00
TECHNICAL_SPECS.md chore: NetGescon day-0 baseline 2026-03-10 2026-03-10 21:00:01 +00:00

🏛️ ARCHITETTURA SISTEMA - NetGescon

Database, Modelli Laravel e Strutture

📋 CONTENUTI CATEGORIA:

🗄️ DATABASE E RELAZIONI

  • Modelli Laravel: Stabile, TabellaMillesimale, VoceSpesa
  • Relazioni: hasMany con eager loading corretto
  • Migrazioni: Colonne ordinamento, chiavi esterne
  • Strutture: MySQL ottimizzato per performance

📊 TECHNICAL_SPECS.md - DOCUMENTO MASTER

  • Architettura completa sistema
  • Specifiche tecniche dettagliate
  • Performance requirements
  • Stack tecnologico unificato

🔧 CONTROLLER E ROUTING

  • StabileController: Eager loading corretto
  • Routing: Sistema modulare
  • Middleware: Autenticazione e permessi
  • API: Endpoint REST pianificati

🚧 MIGRATIONS E STRUTTURE

  • Schema database completo
  • Seeder per dati di test
  • Colonne ordinamento
  • Indici performance

🎯 STACK TECNOLOGICO

AMBIENTE PRODUZIONE:

  • Framework: Laravel 10.x
  • Database: MySQL 8.0
  • PHP: 8.3.6
  • Web Server: Apache2 + SSL
  • Frontend: Tailwind CSS + Vite
  • Node.js: Per build assets

🏗️ ARCHITETTURA:

// Relazioni Corrette (FUNZIONANTE)
public function tabelleMillesimali() {
    return $this->hasMany(TabellaMillesimale::class, 'stabile_id', 'id')
           ->orderBy('ordinamento')->orderBy('nome_tabella');
}

// Controller con Eager Loading  
$stabile->load([
    'tabelleMillesimali',
    'vociSpesa', 
    'unitaImmobiliari',
    'palazzine',
    'amministratore'
]);

📊 PERFORMANCE METRICS

Database Records (Stabile ID: 1):

  • Tabelle Millesimali: 24 records
  • Voci di Spesa: 30 records
  • Unità Immobiliari: 50+ records
  • Query Time: < 100ms

Load Performance:

  • Page Load: < 500ms
  • Database: Ottimizzato con indici
  • Memory: Efficient eager loading

🔗 FILE PRINCIPALI

Modelli:

  • /var/www/netgescon/app/Models/Stabile.php
  • /var/www/netgescon/app/Models/TabellaMillesimale.php
  • /var/www/netgescon/app/Models/VoceSpesa.php

Controller:

  • /var/www/netgescon/app/Http/Controllers/Admin/StabileController.php

Migrations:

  • /var/www/netgescon/database/migrations/

📅 ULTIMO AGGIORNAMENTO: 28 Luglio 2025
🎯 STATUS: ARCHITETTURA STABILE