Back to articles
The .cursorrules file I wish I had when building my SaaS

The .cursorrules file I wish I had when building my SaaS

via Dev.tomohamedp09

I've been using Cursor to build a Node.js + TypeScript SaaS, and it's genuinely impressive — until it isn't. The frustrations were always the same: Silent catch blocks with no logging any types slipping through everywhere Inconsistent API responses (sometimes data, sometimes result ) Prisma queries without proper error handling Hardcoded secrets instead of environment variables I kept correcting the same mistakes over and over. So I did what any developer would do — I wrote rules. What is .cursorrules? A .cursorrules file sits in your project root and tells Cursor how to behave in YOUR codebase. Think of it as a style guide that the AI actually reads and follows. The difference is dramatic. Without rules: typescript // Cursor generates this try { const user = await db.user.findFirst({ where: { id } }); return user; } catch (e) { // silent catch — the bug graveyard } 👉 Available here: https://mohamedp2.gumroad.com/l/ruxmq Drop it in your project root and Cursor starts following your con

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles