How cockpit-hq/cockpit works
Main System Components
a) Frontend Layer:
• Web Interface (modules/App/assets)
• Vue.js Components (modules/*/assets/vue-components)
• Admin Interface (modules/*/admin.php)
b) Application Layer:
• Core Framework (lib/Lime)
• Module System
• App Module (core functionality)
• Content Module (content management)
• Assets Module (media handling)
• System Module (system management)
• Finder Module (file management)
• Updater Module (system updates)
c) Storage Layer:
• Database Abstraction (lib/MongoHybrid)
• MongoDB Support
• SQLite Support (MongoLite)
• File Storage (storage/)
• Cache
• Uploads
• Temporary Files
• Logs
d) Integration Layer:
• REST API (modules/*/api.php)
• GraphQL API (modules/App/GraphQL)
• CLI Interface (modules/*/cli.php)
Component Relationships
• HTTP/HTTPS requests from clients to the application
• Database interactions between application and storage layers
• API endpoints connecting to the application core
• File system operations between application and storage
• Module interactions through the core framework
Architectural Patterns to Highlight
Patterns:
• MVC Architecture (Controller/View/Helper pattern in modules)
• Module-based Architecture (independent modules with their own assets/controllers)
• Hybrid Database Architecture (MongoDB/SQLite abstraction)
• REST/GraphQL API Architecture
Implementation Details
Technical specifications:
• PHP 8.2+ requirement
• Database options (SQLite/MongoDB)
• Required extensions (GD, PDO)
• Docker support
• Web server requirements (mod_rewrite, mod_versions)