Introduce Deptrac for lightweight architecture enforcement #15

Closed
opened 2026-06-10 00:11:42 +02:00 by myrmidex · 0 comments
Owner

Set up Deptrac as an architectural linter to enforce dependency boundaries between layers, and run it in CI.

Scope

Keep it light. This is not a full DDD layering exercise; Rater is a small app and heavyweight domain separation would be over-engineering. Define a modest set of rules matching the current structure and tighten over time:

Layers

Controller, Presenter, Entity, Repository, Service (adjust to actual namespaces).
Sensible starting rules, e.g.: Controllers may depend on Services, Repositories, Presenters, Entities; Presenters may depend on Entities (not vice versa); Entities depend on nothing in the app's other layers; Repositories depend on Entities.
Fail CI on boundary violations.

Secondary goal

intentional: defining the rules is a deliberate skill exercise in articulating the app's architecture and thinking in dependencies — not just tooling. Start permissive, observe what it flags, tighten as understanding grows.

Set up Deptrac as an architectural linter to enforce dependency boundaries between layers, and run it in CI. ### Scope Keep it light. This is not a full DDD layering exercise; Rater is a small app and heavyweight domain separation would be over-engineering. Define a modest set of rules matching the current structure and tighten over time: ### Layers Controller, Presenter, Entity, Repository, Service (adjust to actual namespaces). Sensible starting rules, e.g.: Controllers may depend on Services, Repositories, Presenters, Entities; Presenters may depend on Entities (not vice versa); Entities depend on nothing in the app's other layers; Repositories depend on Entities. Fail CI on boundary violations. ### Secondary goal intentional: defining the rules is a deliberate skill exercise in articulating the app's architecture and thinking in dependencies — not just tooling. Start permissive, observe what it flags, tighten as understanding grows.
myrmidex added the
enhancement
ci-cd
labels 2026-06-10 00:12:33 +02:00
myrmidex self-assigned this 2026-06-10 18:09:59 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/rater#15
No description provided.