How tunbudi06/backend-web-smk works
Main Components
• Web Server & Laravel Application Server – Represent this as the entry point for HTTP requests (routes in routes/web.php and routes/api.php).
• Presentation Layer – This includes the Blade templates in the resources/views directory. Differentiate between public-facing pages and the admin panels (again, notice directories like resources/views/admin).
• Controller Layer – Illustrate the various controllers (found under app/Http/Controllers) that handle business logic. Group them by functionality if possible (e.g., core controllers, API controllers, authentication, administration).
• Middleware – Show the authentication middleware, admin checks, and other custom middleware (e.g., app/Http/Middleware/…) that intercept requests.
• Configuration & Services – Represent the configuration files (in the config directory) and any external services such as session management, caching, mailing, or queueing.
• Assets & Public Folder – The public folder holds static assets (CSS, JS, images) and web assets for client browsers.
• External Libraries – Note the integration of tools like CKEditor (found under public/js/ckeditor), which augment editing capabilities. This can be represented as an external dependency that the front end uses.
Relationships and Interactions
• Incoming HTTP requests are handed off by the web server to the Laravel routing system (defined in routes/web.php for browser and routes/api.php for API requests).
• The routers delegate requests to appropriate controllers, which then may look up data through the models (via Eloquent ORM) and return rendered views or JSON responses.
Key Architectural Patterns
• MVC Pattern: Clearly indicate that the architecture follows the Model-View-Controller pattern with a separation of responsibilities.
• API Layer: Emphasize a distinct grouping for API controllers which serve serialized JSON responses (useful for mobile or external clients).
• Modular Routing and Middleware: Show how requests travel from the router through middleware to controllers.
• Use of Laravel’s built-in service container and dependency injection – though this can be noted as an underlying design principle rather than a visual component.
Relevant Technologies, Frameworks, and Libraries
• Laravel (PHP Framework) – Core framework illustrated as the application backbone.
• Blade – For templating (views).
• Eloquent ORM – For database interactions.
• CKEditor – A rich text editor integrated on the front end (for admin or content editing).
• Others: Mention integration of packages such as jQuery, Bootstrap (CSS/JS assets in public/css and public/js folders) and API documentation via Swagger (files in app/Http/Swagger).
Levels of Detail
• Do not shy away from granularity: indicate submodules such as the admin API endpoints separately if they represent critical functionality.
• How API endpoints (controllers under app/Http/Controllers/api) differ from the standard web controllers.