FastAPI without the spaghetti: we split View and Controller strictly
At WikiMind, we introduced a rule: view.py is for routes only, and business logic lives in controller.py. That made it easier to test without an HTTP context and scaled across all 48 business modules.

In WikiMind, we introduced a simple but very helpful rule: view.py is for routes only, and all business logic belongs strictly in controller.py. No magic “we’ll just handle a little bit of it right in the route” — we’ve already been down that slippery slope 😅
What did this give us? Testability without an HTTP context. Controllers can be exercised with ordinary unit tests without spinning up a server or dragging the entire web layer along with them. When AI, microservices, and release cycles are moving at 2x speed, this kind of architectural discipline is no longer just “nice to have” — it’s a must-have.
The approach didn’t stick to a single endpoint; it scaled across all 48 backend business modules. As a result, routes read like an API map, and the logic lives where it belongs. The kind of setup where you open the code in the morning and don’t get legacy flashbacks.