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).
fullstack ruleP2universalStack: universal
routingurlsfiltersdesign
Model a filter as a query parameter rather than a separate route
Use a query param for a list filter/category instead of minting distinct pages, which avoids ambiguous URLs and duplicated routing.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetext
| 1 | // separate pages per category |
| 2 | /news/finans |
| 3 | /news/teknologi |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetext
| 1 | // one page, category as a query param |
| 2 | /news?category=finans |
| 3 | /news?category=teknologi |
Explanation (EN)
Objašnjenje (HR)