How celaraze/chemex works
Main Components
• Client / Frontend:
• Represents web browsers and potentially mobile clients.
• Covers static assets and interactive pages located in the public and resources/views directories.
• Web Server / Infrastructure:
• Shows the server environment (e.g., Nginx and Docker containers as indicated by the docker folder and public/.htaccess/nginx.htaccess files).
• Laravel Application Core:
• Routing: Representations for routes defined in routes/web.php, routes/api.php, etc.
• Controllers:
· Standard application controllers (app/Http/Controllers) that handle general asset management features.
· Administrative controllers (app/Admin/Controllers) to manage ICT asset administration tasks.
• Business / Service Layer:
· Services found in app/Services (e.g., DeviceService, NotificationService, LDAPService) to encapsulate business logic.
• Models & Repositories:
· Domain models in app/Models (representing data entities such as DeviceRecord, User, etc.).
· Repositories in app/Admin/Repositories which abstract data access and persistence logic.
• Additional Architectural Layers:
· Console commands (app/Console/Commands) for scheduled or manual tasks.
· Jobs (app/Jobs) for background processing (e.g., asynchronous import tasks).
· Observers (app/Observers) and Notifications (app/Notifications) for reactive features.
· Middleware (app/Http/Middleware) for request filtering and authentication.
• Data Persistence:
• A MySQL database, as referenced in the README (MySQL 5.7+), which is accessed via Laravel’s Eloquent ORM and migration scripts (database/migrations, factories, seeders).
• External Services and Integrations:
• LDAP integration (config/ldap and app/Services/LDAPService).
• Third-party tools and packages, such as JetBrains for development and integration of Dcat Admin features.
Relationships and Data Flow
• From Client browsers to the Web Server.
• From the Web Server to the Laravel routing layer.
• From the controllers to the service layer (business logic) and then to the repositories, which interface with the database.
• Interactions for both the standard web interface and the administrative dashboard separately, if desired, to make clear the separation of concerns.
Important Architectural Patterns and Design Principles
• MVC Pattern:
– Clearly delineate Views (resources/views), Controllers (app/Http/Controllers and app/Admin/Controllers), and Models (app/Models).
• Service and Repository Layers:
– Emphasize that business logic resides in app/Services and data abstraction occurs through repositories.
• Asynchronous Processing:
– Highlight background jobs (app/Jobs) that drive tasks like import operations.
• Extensibility:
– Note the custom extensions (app/Admin/Extensions and app/Admin/Forms), custom actions (app/Admin/Actions), and observers provided to support modular functionality.
Technologies and Frameworks
• Laravel (PHP framework) as the backbone.
• Dcat Admin as the admin dashboard platform.
• Docker for containerized deployment (docker/Dockerfile, docker-compose.yml).
• Frontend dependencies managed via npm (package.json, webpack.mix.js) for asset compilation.
• MySQL for the database.
• Client (Browser) → Web Server (Docker/Nginx) → Laravel Application (Routing)
• Drill down into the Laravel Application:
• Split it into two main vertical slices:
· Standard Application (asset management functions): Controllers, Services, Models, Repositories.
· Admin/Management Module: Admin controllers, Admin forms & actions, Metrics, and Extensions.
• Flow from application logic to the MySQL database.
• A section for CLI interactions (Console commands) and asynchronous jobs.