Components

Questa è la pagina principale dei componenti di ColivingLiguria. Qui definiamo tutti i componenti UI riutilizzabili del sito.

🏗️ Core Philosophy: Single Source of Truth

IMPORTANT

Tutti i componenti sono definiti QUI, una sola volta.

  • Ogni componente TSX vive in quartz/components/
  • Le altre pagine del sito importano questi componenti senza copiare codice
  • Modificando un componente qui, si aggiornano automaticamente TUTTE le pagine che lo usano
  • In questo modo evitiamo duplicazione e garantiamo consistenza visiva

TIP

Come usare i componenti:

  1. Layout Quartz: Registra il componente in quartz.layout.ts
  2. Pagine custom: Importa direttamente in pagine TSX
  3. Mai copiare: Se serve lo stesso componente altrove, importalo sempre dalla sorgente

📚 Component Areas

We categorize our components into specific functional domains:

0. Common Utilities

  • Purpose: Reusable UI elements used throughout the site.
  • Key Components:
    • ContactCTA: Standardized contact section with Email (mailto), WhatsApp, and Calendar support. Supports internationalization.
    • Translate: Bilingual text rendering.

1. Financial Register

  • Purpose: Real-time visualization of economic flows using data from our SQL database.
  • Key Components: AnimeCashflow (Income/Expense Bars), AnimeStats (Growth Metrics).

2. Candidate Register

  • Purpose: Tracking and visualizing the recruitment pipeline.
  • Key Components: AnimeCandidateViz (Pipeline Bubbles, Demographics).
  • Purpose: Providing clear, interactive status indicators for bureaucratic processes.
  • Key Components: AnimeStatusBadge (Document Status), AnimeChecklist, BureaucracyLabel.

4. Location & Maps

  • Purpose: Visualising our physical assets and surroundings.
  • Key Components: AnimeLocation (Interactive Maps).

5. Time & Events

  • Purpose: Managing calendars and temporal data.
  • Key Components: AnimeEvents (Timeline).

🛠️ Technology Stack (Installed Versions)

NOTE

Queste sono le versioni esatte installate in package.json. Usare sempre queste per la compatibilità.

🎬 Animation & Motion

LibraryVersionPurpose
Anime.js4.3.5Primary animation engine (timelines, stagger, springs)
GSAP3.14.2Advanced animation (ScrollTrigger, complex sequences)
Framer Motion12.29.2Declarative React animations
Tween.js25.0.0Tweening engine

🧱 UI Framework

LibraryVersionPurpose
Preact10.27.2Lightweight React alternative (3kb)
@preact/compat18.3.1React API compatibility layer
Chakra UI3.31.0Component library
Lucide React0.562.0Icon system
React Icons5.5.0Icon library

📊 Data Visualization

LibraryVersionPurpose
D3.js7.9.0Data-driven visualizations
Recharts3.5.1Composable chart library

🎮 3D & Interactive

LibraryVersionPurpose
Three.js0.182.03D graphics engine
@react-three/fiber9.5.0React renderer for Three.js
@react-three/drei10.7.7Useful helpers for R3F
Spline4.1.0No-code 3D scene embedding
PixiJS8.14.0Fast 2D WebGL renderer
OGL1.0.11Minimal WebGL framework

🎨 Creative Components

LibraryVersionPurpose
ReactBits1.0.3Creative animated components (Hyperspeed, Ballpit, etc.)
Matter.js0.20.02D physics engine

This document serves as the master guide for all developers and AI agents working on the ColivingLiguria platform.