Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP2universalStack: node
controllersdryarchitecturereuse
Reuse a generic controller instead of adding a redundant one
Before adding a new controller, check whether an existing generic controller/config-driven setup already provides what you need, to avoid duplicate plumbing.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | class GamesController { /* duplicates subPageController */ } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // reuse the generic subPageController + PageConfig setup |
Explanation (EN)
Objašnjenje (HR)