Architecture layers
Introduction
Every feature is built in layers, and each layer talks only to the one below it. Routes never query the database, services never answer HTTP, and repositories hold no business rules.
Route (HTTP) → Service (rules) → Repository (queries) → Model (table)
| Layer | Start from | What it does |
|---|---|---|
| Blueprints | create_blueprint |
Routes, templates and assets |
| Services | BaseService |
Business rules, no HTTP |
| Repositories | BaseRepository |
Queries, one repository per model |
| Seeders | BaseSeeder |
Sample and starting data, run by db:seed |