Skip to content

Instantly share code, notes, and snippets.

@wurin7i
Created November 21, 2025 14:11
Show Gist options
  • Select an option

  • Save wurin7i/a52e4f67688826e5b11e5322788b1ca3 to your computer and use it in GitHub Desktop.

Select an option

Save wurin7i/a52e4f67688826e5b11e5322788b1ca3 to your computer and use it in GitHub Desktop.
Laravel Clean Architecture
project-root/
├── app/
│ ├── Core/ # Business Logic Layer (UI-Agnostic)
│ │ ├── Contracts/ # Service Contracts & Interfaces
│ │ ├── Services/ # Business Logic Services
│ │ ├── Data/ # Data Transfer Objects
│ │ ├── Validators/ # Business Rule Validation
│ │ ├── Exceptions/ # Core Business Exceptions
│ │ ├── Events/ # Domain Events
│ │ └── Authorization/ # Core authorization logic
│ │ ├── Policies/ # Business-level policies
│ │ └── Rules/ # Reusable authorization rules
│ │
│ ├── Models/ # Laravel Eloquent Models (Data Layer)
│ │
│ ├── Presentation/ # UI Layer (Framework-specific)
│ │ ├── Filament/ # Current Filament UI
│ │ │ ├── Resources/
│ │ │ ├── Pages/
│ │ │ └── Widgets/
│ │ │
│ │ ├── Api/ # Future API Controllers
│ │ │ ├── Controllers/
│ │ │ └── Requests/
│ │ │
│ │ └── Web/ # Future Web Controllers
│ │ └── Controllers/
│ │
│ ├── Infrastructure/
│ │ ├── Authorization/ # Framework adapters
│ │ │ ├── LaravelPolicyAdapter.php # Adapter untuk Laravel Policy
│ │ │ └── Gates/ # Laravel-specific gates
│ │ │ └── AdminGate.php
│ │ │
│ │ └── Adapters/ # UI-specific adapters
│ │
│ └── Providers/
├── modules/
│ ├── Module1/
│ └── ModuleN/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment