How alexis-gss/memoria works
Main Components
• Frontend (Client Side):
• Back-office (BO) and front-office (FO) user interfaces.
• Blade templates found in resources/views.
• Vue.js components and TypeScript assets in resources/ts.
• SASS stylesheets in resources/sass.
• Backend (Server Side):
• Laravel application structure in the app directory (Controllers, Models, Middleware, Jobs, Services).
• Console commands (app/Console) and artisan commands.
• APIs and web routes segregated in routes/web-bo.php and routes/web-fo.php.
• Database:
• Database migrations, seeders, and factories in the database folder, representing the models (Game, Folder, Picture, Tag, User, etc.).
• External Dependencies/Integrations:
• Third-party libraries (Vue.js, Bootstrap, SASS, etc.) indicated in package.json and composer.json.
• GitHub Actions and workflow files in .github/workflows for CI/CD.
• Configuration files for environment variables, caching, logging, etc. (config folder, .env.example).
• Additional Components:
• Mail functionality with Mails subdirectory.
• Queueing and job processing (app/Jobs) for background processing (e.g., DeleteUnassociatedPictures).
• Custom helpers and traits in app/Lib and app/Traits.
• Testing suites found in tests.
Relationships and Interactions
• The Client (browser) interacts with the system through HTTP requests directed at the Laravel application.
• Routing splits requests into either the front-office routes (public pages) or the back-office routes (authenticated administration).
• Controllers handle the business logic by interacting with Models. For example, controllers in app/Http/Controllers manage CRUD operations for games, folders, pictures, etc.
• Middleware (found in app/Http/Middleware) handles cross-cutting concerns (authentication, CSRF protection, localization, etc.).
• Blade templates render the UI, with Vue.js components enhancing interactivity in parts of both BO and FO.
• The Database, represented by migrations, seeders, and models, stores all domain data.
• Background tasks (jobs, mail sending) interact asynchronously with the main flow.
• External integrations such as GitHub workflows and testing scripts ensure quality and continuous delivery.
Architectural Patterns and Design Principles
• MVC Pattern is prevalent: Models, Views (Blade templates plus frontend assets), and Controllers reside in separate directories.
• Layered architecture separating concerns: HTTP layer (routes, controllers, middleware), business logic layer (models, services, custom helpers), and data layer (database migrations/seeds).
• Modular organization for back-office (admin functions) and front-office (public view), clearly segregated through naming conventions and routes.
• Usage of external libraries and frameworks (Vue.js, Bootstrap, SASS, Laravel) is integral to how presentation and processing are handled.
• Background Processing for tasks (jobs) and proper dependency injection via Laravel service providers (in the Providers folder).
Relevant Technologies & Frameworks
• Laravel (PHP framework) forms the backbone for the business logic and RESTful routing.
• Vue.js enhances UI responsiveness and component-based design on the client-side.
• TypeScript is used in frontend scripting to ensure type safety.
• SASS and Bootstrap provide styling and responsive layout.
• MySQL (or another RDBMS) is implied as the database engine given Laravel’s standard configuration.
• GitHub Actions and other CI/CD integrations support automated testing and deployment.
• PHPUnit and other tools (PHPStan, PHPCS) support a robust testing and quality assurance pipeline.