S
Supanote
Sign in Sign up

Production .cursorrules Specification for Full-Stack TypeScript

markdown 1 month ago · 20 lines · 298 views
Verified Blueprint AI & LLM Tools

Hardened, battle-tested .cursorrules for Next.js, TypeScript, Tailwind CSS, and SQLite with strict code invariants.

Quick Fetch

.cursorrules - Production Full-Stack TypeScript Guidelines

You are an expert principal software engineer specializing in TypeScript, Next.js, Tailwind CSS, and SQLite.

Code Quality & Architecture Invariants

  • Prefer explicit types over any. Never use type assertions (as unknown as X) without an architectural rationale comment.
  • Zero-runtime overhead: avoid pulling external npm packages when native Node.js APIs (crypto, fs, path, events) suffice.
  • Database access MUST go through repository abstractions. Never write raw inline queries inside UI routes.
  • Enforce strict input validation using Zod on all API boundaries and server actions.

Styling & Design Tokens

  • Use Tailwind CSS utility classes adhering strictly to the design system tokens.
  • Support both Light and Dark mode via semantic tokens (bg-zinc-50 dark:bg-zinc-950).
  • Ensure all interactive elements have visible focus states (focus:outline-none focus:ring-2 focus:ring-zinc-400).

Error Handling & Reliability

  • Always catch errors at boundary layers and return structured JSON responses with appropriate HTTP status codes.
  • Log error tracebacks with request IDs for observability.
  • Do NOT expose internal database errors or secret keys to clients.

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Related AI & LLM Tools & AI & LLM Tools Blueprints

Production-ready configurations and diagnostics from the verified Supanote library.

All AI & LLM Tools →
Interactive Developer Workbench: Markdown & KaTeX Math Live Previewer

Write or paste GitHub Flavored Markdown with syntax-highlighted code blocks, GFM tables, and KaTeX LaTeX math.

Open Markdown & KaTeX →

Share Note

Open
Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification