I’ve been starting on a refactoring of Tanzawa to help improve maintainability.

I’m taking a layered approach where each package is broken down into a data layer (models) at the bottom, queries (data access) above that,Β  application (business logic) above that and finally your views at the top.

The idea being that the top layers can go down the stack, but upper layers can’t go up. I’m not sure if I’m going to enforce it via linting, but I probably will, eventually.

We’ve been using a similar structure at work and once you get used to it, it’s quick to find the code you’re looking for and keeps things tidy. And linting helps enforce it when we forget or want to be lazy. πŸ˜€