The DDD architecture was implemented based on the article written by Brent on October 17, 2019 - Domain-oriented Laravel . The following patterns were also used: repository pattern, actions and use cases, data transfer objects. Based on the LaraFood course project - EspecializaTi Academy.
- Laravel
- Laravel Sail
- PHP Mess Detector
- PHP Copy/Paste Detector
- Sentry
- Data transfer objects
- AdminLTE
- Pest
- L5-Swagger
- activitylog
src
└ Application
└ Domains
├── Domain
│ └── Actions
│ └── UseCases
│ └── DTOs
│ └── Contracts
│ └── Enums
│ └── Exceptions
└ Infrastructure
│ └── Persistence
└ Interfaces
│ └── Console
│ └── Http
- Clone the project
git clone https://github.com/luiz-moura/larafood.git
- Create .env
cp .env.example .env
- Start the server in background
docker-compose up -d
- Create aliases for sail bash path
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
- Generate key
sail artisan key:generate
- Install composer dependencies
sail composer install
- Install NPM dependencies
sail npm install && sail npm run dev
- Create tables and fill populate with fictitious data
sail artisan migrate:fresh --seed
- Project listen in port http://localhost:80
- User admin: [email protected], password: 12345678
Stop the server
sail stop
All commands sail
sail help
sail test
To run this project, you will need to add the following environment variables to your .env file
DB_USERNAME
DB_PASSWORD
SENTRY_LARAVEL_DSN