--- description: Livewire components, Alpine.js patterns, Tailwind CSS, and enhanced form components globs: app/Livewire/**/*.php, resources/views/**/*.blade.php, resources/js/**/*.js, resources/css/**/*.css alwaysApply: false --- # Coolify Frontend Architecture & Patterns ## Frontend Philosophy Coolify uses a **server-side first** approach with minimal JavaScript, leveraging Livewire for reactivity and Alpine.js for lightweight client-side interactions. ## Core Frontend Stack ### Livewire 3.5+ (Primary Framework) - **Server-side rendering** with reactive components - **Real-time updates** without page refreshes - **State management** handled on the server - **WebSocket integration** for live updates ### Alpine.js (Client-Side Interactivity) - **Lightweight JavaScript** for DOM manipulation - **Declarative directives** in HTML - **Component-like behavior** without build steps - **Perfect companion** to Livewire ### Tailwind CSS 4.1+ (Styling) - **Utility-first** CSS framework - **Custom design system** for deployment platform - **Responsive design** built-in - **Dark mode support** ## Livewire Component Structure ### Location: [app/Livewire/](mdc:app/Livewire) #### Core Application Components - **[Dashboard.php](mdc:app/Livewire/Dashboard.php)** - Main dashboard interface - **[ActivityMonitor.php](mdc:app/Livewire/ActivityMonitor.php)** - Real-time activity tracking - **[MonacoEditor.php](mdc:app/Livewire/MonacoEditor.php)** - Code editor component #### Server Management - **Server/** directory - Server configuration and monitoring - Real-time server status updates - SSH connection management - Resource monitoring #### Project & Application Management - **Project/** directory - Project organization - Application deployment interfaces - Environment variable management - Service configuration #### Settings & Configuration - **Settings/** directory - System configuration - **[SettingsEmail.php](mdc:app/Livewire/SettingsEmail.php)** - Email notification setup - **[SettingsOauth.php](mdc:app/Livewire/SettingsOauth.php)** - OAuth provider configuration - **[SettingsBackup.php](mdc:app/Livewire/SettingsBackup.php)** - Backup configuration #### User & Team Management - **Team/** directory - Team collaboration features - **Profile/** directory - User profile management - **Security/** directory - Security settings ## Blade Template Organization ### Location: [resources/views/](mdc:resources/views) #### Layout Structure - **layouts/** - Base layout templates - **components/** - Reusable UI components - **livewire/** - Livewire component views #### Feature-Specific Views - **server/** - Server management interfaces - **auth/** - Authentication pages - **emails/** - Email templates - **errors/** - Error pages ## Interactive Components ### Monaco Editor Integration - **Code editing** for configuration files - **Syntax highlighting** for multiple languages - **Live validation** and error detection - **Integration** with deployment process ### Terminal Emulation (XTerm.js) - **Real-time terminal** access to servers - **WebSocket-based** communication - **Multi-session** support - **Secure connection** through SSH ### Real-Time Updates - **WebSocket connections** via Laravel Echo - **Live deployment logs** streaming - **Server monitoring** with live metrics - **Activity notifications** in real-time ## Alpine.js Patterns ### Common Directives Used ```html