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).
frontend ruleP1stack specificStack: Next.js
routingnextjsconsistencylinks
Keep route folder names and the links pointing to them in sync
When you rename a route, update both the directory name and every link/href that targets it so navigation does not 404.
PR: hegnar-bellsheep-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetsx
| 1 | // folder: app/all-items/page.tsx |
| 2 | <a href="/all-item">All items</a> // mismatched, 404 |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | // folder: app/all-items/page.tsx |
| 2 | <Link href="/all-items">All items</Link> |
Explanation (EN)
Objašnjenje (HR)