We’ve used a simple arrangement with routes/ and middleware/ folders, which work well for learning and smaller projects. This approach keeps related functionality grouped and makes the codebase easy to navigate.
As applications grow larger and more complex, more sophisticated organisational patterns become useful:
- MVC Pattern: Models, Views, Controllers separation.
- Clean Architecture: Layers for domain, application, and infrastructure.
- Feature-based: Group by feature rather than technical layer.
These patterns help manage complexity when working with larger codebases and bigger development teams. However, covering these advanced architectural patterns is beyond the scope of the Development Platforms module.