-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
lpachecob edited this page Mar 24, 2026
·
4 revisions
In BOUNDLY, the framework is an implementation detail. The architecture follows Clean Architecture principles, where your business domain is the core and the infrastructure is an adapter layer.
Where your Actions live. These orchestrate the flow:
-
Actions/: Classes decorated with#[Action]. -
DTOs/: Inputs for your Actions. -
Tests/: Integration tests for specific application features.
The logic that would survive even if you change the framework:
-
Entities/: Classes decorated with#[Entity]. -
Events/: Domain events for side effects. -
ValueObjects/: Immutable data objects. -
Tests/: Pure unit tests for your business rules. (e.g.,UserApiTest.phpinDomain/Users/Tests/).
The repository includes a ready-to-use User boilerplate to demonstrate the full architectural flow:
-
Domain: A clean
Userentity withAuditableandSoftDeletetraits. -
Application: A
CreateUserAction demonstrates delegating to theDynamicRepositoryusing aUserDTO. - Infrastructure: Automations for DB synchronization are already active for these examples.
Where the technical heavy lifting - and the "basement" - live:
-
FrameworkCore/: The BOUNDLY Engine (Registries, CLI, Dynamic Repos).-
Attributes/: All framework attributes, organized by category:-
Schema/: Entity, Column, Id, PrimaryKey, ForeignKey, Index, UniqueConstraint -
Relations/: BelongsTo, HasMany, HasOne, ManyToMany, MorphMany, MorphOne, MorphTo -
Behavior/: Auditable, SoftDelete, TenantAware, Authorize, Policy, Timestampable, Blameable, Sluggable -
UseCase/: Action -
Security/: Hidden, Encrypted, Hashed -
Validation/: 40+ data validation attributes
-
-
-
LaravelEngine/: The Basement. Contains Laravel internally (config, storage, database, etc.) to keep your root clean. -
Providers/: Framework wiring.
| File | Purpose |
|---|---|
artisan |
CLI tool. Redirigido al sótano por defecto. |
bootstrap/app.php |
The Ignitor. Connects BOUNDLY's clean root with Laravel's basement. |
public/index.php |
Web entry point. Handles requests by booting the basement. |
- Screaming Architecture: When you open the project, it screams "Users", "Orders", "Products" (Domain), not "Models", "Views", "Controllers" (Framework).
- Encapsulation: The framework is hidden. If you ever need to replace Laravel, you only touch the basement.
- Purity: Zero framework dependencies in your Domain layer.
Next Step: CLI-Commands 🚀