Skip to content

Instantly share code, notes, and snippets.

@ibrunotome
Last active August 25, 2023 23:25
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save ibrunotome/2f7fdfefa96c8f323bc9fb91a22864e0 to your computer and use it in GitHub Desktop.
Save ibrunotome/2f7fdfefa96c8f323bc9fb91a22864e0 to your computer and use it in GitHub Desktop.
A Domain Driven Design (DDD) approach to the Laravel Framework
/app
├── /Application
|  ├── /Exceptions
|  ├── /Middlewares
|  ├── /Providers
|  ├── /Requests
├── /Domain
|  ├── /MyDomainA
|  |   ├── /Contracts
|  |   ├── /Entities
|  |   ├── /Repositories
|  |   ├── /Services
|  ├── /MyDomainB
|  |   ├── /Contracts
|  |   ├── /Entities
|  |   ├── /Jobs
|  |   ├── /Listeners
|  |   ├── /Repositories
|  |   ├── /Services
|  ├── .
|  ├── .
|  ├── .
├── /Infrastructure
|  ├── /Contracts
|  |   ├── BaseRepository.php
|  ├── /Jobs
|  |   ├── Job.php (Abstract)
|  ├── /Listeners
|  |   ├── Listener.php (Abstract)
|  ├── /Repositories
|  |   ├── EloquentRepository.php (Abstract)
|  ├── /Scopes
├── /Interfaces
|  ├── /Console
|  |   ├── Kernel.php
|  ├── /Http
|  |   ├── /Controllers
|  |   ├── /Providers
|  |   |   ├── RouteServiceProvider.php
|  |   ├── /Resources
|  |   ├── Kernel.php
/bootstrap
/config
/database
/docker
/public
/resources
/storage
/tests
/vendor
(Other files like .env, artisan, composer.json, etc.)
@mavazca
Copy link

mavazca commented Feb 25, 2021

How do you separate the WEB and API part of this DDD structure?

@joshbarrosweb
Copy link

Can't see any DTOs (Data Transfer Objects)

@geniussquad
Copy link

can't see any UseCases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment