Skip to content

πŸ›Έ πŸ”ƒ A pre-configured Laravel 11.x template crafted to facilitate the development of web applications following Domain-Driven Design (DDD) principles.

License

Notifications You must be signed in to change notification settings

oskhar/domain-driven-laravel

Repository files navigation

Domain-Driven Laravel πŸ›Έ πŸ”ƒ

MIT License

A robust, scalable, and flexible architecture for developing RESTful APIs with Laravel using Domain-Driven Design (DDD) principles.

πŸ“˜ Article

Introduction

Laravel is an excellent framework for building Powerfull Apps, offering a rich set of features and a clean syntax. However, as projects grow in complexity, it's easy for the codebase to become unmanageable. The absence of a clear architectural pattern can lead to a mix of responsibilities, making the code harder to maintain and scale.

This repository presents a way to structure Laravel projects using Domain-Driven Design (DDD) principles, allowing for better organization, scalability, and separation of concerns. The approach showcased here is inspired by best practices and aims to solve real-world challenges in a practical and maintainable way.

The goal is to provide a solid foundation for building Laravel applications that are.

  • 🧩 Easy to Understand. A well-organized codebase with clear boundaries.
  • πŸ› οΈ Maintainable. Follow DDD principles to keep concerns separated.
  • πŸ“ˆ Scalable. Designed to grow with your application's needs.
  • πŸ”’ Secure. Focused on applying security best practices.
  • πŸ”₯ Performant. Built with performance considerations from the ground up.

Important

This template is designed with flexibility and scalability in mind, but it's essential to understand that every project is unique. Before adopting this template, consider the specific requirements of your project. You may need to modify certain aspects to fit your needs. This template serves as a solid starting point, but it's not a one-size-fits-all solution.

Who is This Template For?

This template is ideal for Laravel developers who are building complex applications and require a robust, maintainable, and scalable solution. By adopting Domain-Driven Design (DDD) principles, this template ensures your code remains organized and easy to manage as your application grows.

Key Features:

  • Domain-Driven Design (DDD) Principles. Ensures maintainable and scalable code, making it easier to manage and grow your application.
  • Clean Architecture. Provides a clear separation of concerns with distinct layers for infrastructure, domain, and application logic.
  • Pre-configured Commands. Includes commands for generating middleware and service classes within the Infrastructure layer, streamlining development processes.
  • Customizable Stubs. Predefined stubs allow you to easily generate custom classes, adapting the template to your specific needs.
  • Extensible Structure. Supports the growth and complexity of your application, ensuring long-term maintainability.

Feel free to explore the repository and the provided documentation to get the most out of this template.

Table Of Contents

Managing API Documentation

When using this project, you have flexibility in how you manage your API documentation. If you prefer, you can delete the docs folder entirely. Although API documentation files exist there, you’ll find that the public folder also contains API documentation, which is automatically served at http://localhost:8000 when you run your Laravel application.

This means you can focus solely on updating the public/openapi.yml file for your API documentation. Alternatively, if you prefer working within the docs folder, you can maintain your OpenAPI documentation in docs/openapi-view/public/openapi.yml. The choice is yours, allowing you to manage your API documentation in the way that best suits your workflow.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.For further questions, issues, or discussions, please open an issue on GitHub or contact the project maintainers.

We appreciate your contributions and look forward to seeing how you can help enhance Domain-Driven Laravel! email: muhamadoskhar@gmail.com

Releases

No releases published

Packages

No packages published

Languages