How abd-wazzan/laravel-api-boilerplate works
Main Components
a. Architectural Layers:
• Application Layer (src/app)
• Domain Layer (src/domain)
• Shared Layer (src/shared)
• Infrastructure Layer (represented by Laravel framework components)
b. Key Components:
• HTTP/API Interface
• Authentication (Passport)
• Database Layer
• External Services Integration
• Development Tools (Telescope, Scribe, etc.)
[Client Applications] → [API Layer] → [Application Layer] → [Domain Layer] → [Infrastructure Layer]
• ↓
• [Shared Layer]
[API Layer]
• Controllers
• Middleware
• Resources
• Routes
[Application Layer]
• Console Commands
• HTTP Handlers
• Service Providers
• Exception Handlers
[Domain Layer]
• Models
• Actions
• Events
• Listeners
• Business Logic
[Shared Layer]
• Helpers
• Traits
• Enums
Important Relationships to Highlight
• Dependency flow following DDD principles (as shown in the README's dependency illustration)
• API response flow using ApiResponseHelper
• Authentication flow with Passport
• Database interactions
• How the shared components are accessed by other layers
Implementation Details
Use these symbols:
• Rectangles for components/modules
• Diamonds for decision points (◇)
The development and testing tools integration
Remember to:
• Use consistent naming conventions
• Version information
• Document any assumptions or constraints
This structure will accurately represent the project's DDD architecture while maintaining clarity and providing valuable insight into the system's organization and flow.