Production guidelines for Next.js App Router, Server Actions, Prisma connection pooling, PgBouncer/Neon tuning, and Zod schema validation.
Production conventions for building high-scale full-stack applications with Next.js 15 App Router, Prisma ORM, and PostgreSQL.
This exact architecture is deployed in production by top open-source platforms including Cal.com, Documenso, Papermark, Typebot, Formbricks, and Umami.
globalThis singleton client prevents Lambda / HMR connection pool leakage.DATABASE_URL (pooled port 6543) from DIRECT_URL (migration port 5432) ensures atomic DDL schema updates.Yes — AGENTS.md is the open, cross-tool standard read by Cursor, Claude Code, Windsurf, and 30+ other agents. A dedicated .mdc file is also included for Cursor's native .cursor/rules format.
Next.js hot module reloading re-executes module code on every save in development, and without caching the client on globalThis, each reload would instantiate a new PrismaClient and open a fresh connection pool. Left unchecked this exhausts the database's max_connections within a few dozen saves during a normal dev session.
db push directly syncs your schema to the database with no migration history, no rollback path, and no review artifact — it's designed for rapid prototyping, not production changes. migrate deploy applies pre-generated, reviewable SQL migration files in order, giving you an auditable history and the ability to roll back a specific change.
Production guidelines for Django 5 enterprise applications, PostgreSQL connection pooling, Redis caching, and Celery async workers.
Production guidelines for FastAPI, Pydantic v2 validation, Async SQLAlchemy 2.0 (asyncpg), Alembic migrations, and PostgreSQL/Redis.
Production guidelines for Laravel 11 monoliths, Livewire reactive components, Eloquent ORM query discipline, and queued job workers.
Enterprise backend architecture guidelines for NestJS modular design, PostgreSQL connection pooling, Redis BullMQ background jobs, and DTO validation.