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 ruleP0stack specificStack: node
ormtypeormsequelizemigrationsproductionsecurity
Never leave ORM auto-synchronize on for production
Set synchronize:false (TypeORM/Sequelize) and manage schema via migrations; auto-sync can drop or alter production tables. Keep DB credentials in env, not code.
PR: profico-mining-2026-06Created: Jul 26, 2026
Bad example
Old codetypescript
| 1 | TypeOrmModule.forRoot({ synchronize: true, password: "root" }) |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | TypeOrmModule.forRoot({ synchronize: false, password: process.env.DB_PASSWORD }) |
Explanation (EN)
Objašnjenje (HR)