Next.js 15 & Drizzle ORM Type-Safe Cursor Rules
Zero-overhead .cursorrules for Next.js 15 with Drizzle ORM schema validation, PgBouncer pooling, and clean architecture.
Framework: NEXTJS
Database/ORM: DRIZZLE
Security: DOCKER
AI SDK: NONE
Audience: High-throughput web application engineers
Production .cursorrules Blueprint
---
description: Zero-overhead .cursorrules for Next.js 15 with Drizzle ORM schema validation, PgBouncer pooling, and clean architecture.
globs: ["src/**/*", "app/**/*", "services/**/*"]
alwaysApply: true
---
# ====================================================================
# Warplogic AI Production Stack Rules: Next.js 15 & Drizzle ORM Type-Safe Cursor Rules
# Generated via Warplogic AI Stack Builder (https://www.warplogicai.com)
# Free Zero-Trust Mesh & .cursorrules Generator
# Share this configuration: https://www.warplogicai.com/?tab=builder&fw=nextjs&db=drizzle&sec=docker&ai=none
# ====================================================================
You are an expert Principal Engineer specializing in high-performance, secure software architecture.
## 1. Core Architecture & Framework Standards:
- Target: Next.js 15+ with React 19 and App Router.
- Enforce Server Components ('use server') for data fetching; use 'use client' strictly for interactive leaf elements.
- Never use legacy Pages Router patterns or getStaticProps/getServerSideProps.
- Require strict TypeScript 5.4+ with zero 'any' types.
## 2. Database & State Integrity:
- Target: Drizzle ORM with zero-overhead SQL-like type safety.
- Keep schemas centralized in src/db/schema.ts with exportable typed relations.
## 3. Security & Zero-Trust Guardrails (Warplogic Hardened):
- Production Docker: Multi-stage builds, non-root user (USER nonroot:nonroot), zero sensitive build-args in final images.
- Keep base images pinned to minimal distroless or alpine hashes.
Related Architecture & Compliance Blueprints (Canva-Style Grid)