feat: Implement comprehensive architectural guidelines and clean code standards

- Establish feature-based architecture with clear separation between Logic, Data, and Shared layers
- Define directory structure conventions for controllers, entities, DTOs, managers, mappers, models, processors, providers, repositories, and services
- Implement Symfony 7.4+ compliance with proper Request handling (UI layer only)
- Enforce PHP 8+ attributes usage instead of annotations
- Set up proper DTO usage in UseCases with immutable properties
- Configure repository pattern with interfaces in Logic layer and implementations in Data layer
- Implement strict separation of concerns with UI layer handling Request objects exclusively
- Define clear naming conventions (PascalCase for feature names)
- Add shared components directory for reusable elements across features
- Establish HTTP status code constants usage instead of magic numbers
- Configure proper file placement for controllers in UI/Frontend, UI/Api, and UI/CLI subdirectories
- Enforce modern PHP practices with explicit return types and strict typing

This commit lays the foundation for a maintainable, scalable Symfony 7.4+ application following clean architecture principles and modern coding standards.
This commit is contained in:
2026-06-02 22:05:40 +02:00
commit 788ddcd0b5
55 changed files with 1551 additions and 0 deletions
@@ -0,0 +1,8 @@
---
globs: src/Logic/**/UseCase/*.php, src/Logic/**/DTO/*.php
description: Enforces the use of DTOs for UseCase entry points to maintain clean
architecture, immutability, and type safety.
alwaysApply: true
---
UseCase methods must accept DTOs (Data Transfer Objects) for input parameters instead of raw arrays or Request objects. DTOs must be located in the /src/Logic/[FeatureName]/DTO directory and should be immutable (readonly properties). This ensures decoupling between the Logic and UI layers. Simple primitive inputs (like a single ID) may be passed directly, but complex data structures require DTOs.