avosalmon/modular-monolith-laravel
소개
Sample application for Laracon Online 2022.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalModular Monolith Laravel
The sample e-commerce application for Laracon Online Winter 2022.
System requirements
Docker is installed on your machine.
Setup local environment
Copy example env file
cp .env.example .env
Start docker compose
docker compose up -d
Install composer dependencies
docker compose exec app composer install
Generate app key and places inside the .env file
docker compose exec app php artisan key:generate
Run DB migration
docker compose exec app php artisan migrate:fresh --seed
Now you can access the app via http://localhost.
To stop Docker containers
docker compose down
Laravel Sail command (optional)
This repository uses Laravel Sail for the local docker environment. You can use the sail command by configuring a bash alias below.
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
The sail command is an shortcut for docker compose exec app php which runs a given command within the docker container. The docker compose commands in the previous section can be shortened like this.
sail composer install
sail artisan key:generate
sail artisan migrate:fresh --seed
Testing
This repository uses Pest for writing tests. Pest is a testing framework with a simpler syntax like Jest and better reporting. Since it's powered by PHPUnit, it supports all the PHPUnit syntaxes as well.
Running tests
sail test
Filtering tests
sail test --filter OrderControllerTest
Display code coverage
sail test --coverage --min=80
Static code analysis to enforce domain boundaries
Deptrac is a static code analysis tool for PHP that helps you define architectual layers over classes and rules on which layer can access which layer.
You can run deptrac with the command below.
sail exec app ./vendor/bin/deptrac
You can also visualize the dependency graph by exporting the analysis result as an image.
sail exec app ./vendor/bin/deptrac --formatter=graphviz-image --output="./deptrac.png"
관련 프로젝트 살펴보기
불러오는 중…