RyosukeSakakibara718 / project-balancer_doc

Document of project management tool that allows managers to track member work hours and calculate/forecast gross profit based on the tracked data. This app helps in efficient resource allocation and profitability analysis.
0 stars 0 forks source link

ディレクトリ構成設計 - バックエンド #6

Closed yokohama-TN closed 4 months ago

yokohama-TN commented 4 months ago
laravel/app/
├─┬ Exceptions/  #共通の例外処理
│ └── Handler.php
├─┬ Http/
│ ├─┬ Requests/
│ │ ├─┬ User/
│ │ │ ├── StoreRequest.php
│ │ │ └── UpdateRequest.php
│ ├─┬ Resources/
│ │ ├── UserResource.php
│ ├─┬ Controllers/
│ │ ├── UserController.php
│ │ └── Controller.php
│ └── Middleware/
├─┬ Models
│ ├── User.php
├── Providers/
└─┬ UseCases/
  ├─┬ User/  #ドメインのビジネスロジック
  │ ├── StoreAction.php
  │ └── UpdateAction.php
  └─┬ Exceptions/  #そのドメインのみの例外処理
    └── PostLimitExceededException.php

laravel/tests
├── Feature/  #Controllerのテスト
│   ├── Http/
│   │   ├── Controllers/ #Controllerと同様のディレクトリ分け
│   │   ├── Middleware/
│   │   └── Routes/
│   ├── Console/
│   └── useCase/
├── Unit/ #単体テスト
│   ├── Models/ #modelと同様のディレクトリ分け
│   ├── useCase/ #useCaseと同様のディレクトリ分け
│   └── Helpers/
└── Integration/ #結合テスト
    ├── Database/
    ├── API/
    └── External/
yokohama-TN commented 4 months ago

ディレクトリ構成参考URL: https://zenn.dev/mpyw/articles/ce7d09eb6d8117