Introduce Deptrac for lightweight architecture enforcement #15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.