Back to Blog

The Stack That Made Me Productive

September 14, 20253 min read
Next.jsNestJSPostgreSQLFull Stack
The Stack That Made Me Productive

The Stack That Made Me Productive

Every developer has that moment when a stack just clicks. For me, it was the combination of Next.js on the frontend, NestJS on the backend, and PostgreSQL as the database. Not because these are the trendiest tools, but because they removed friction from my workflow in ways I did not expect.

Why Next.js

I have tried Create React App, Vite with React, Remix, and plain React with custom setups. Next.js won because it handles the decisions I do not want to make: routing, code splitting, image optimization, and server-side rendering.

The App Router with React Server Components changed how I think about data fetching. Instead of useEffect chains and loading states everywhere, I fetch data on the server and stream it to the client. The result is faster pages and simpler component logic.

The deployment story seals the deal. Whether I deploy to Vercel or self-host with Docker, the build output is predictable and the performance is consistent.

Why NestJS

Express is fine for small APIs, but NestJS gives me structure that scales. The module system, dependency injection, and decorators feel natural if you have worked with Angular or Spring Boot.

What I appreciate most is the opinionated structure. When I open a NestJS project after six months, I know exactly where to find the service logic, the validation pipes, the guards, and the interceptors. That predictability is worth more than any micro-optimization.

Prisma as the ORM layer ties everything together. The type safety between the database schema and the application code catches entire classes of bugs at compile time.

Why PostgreSQL

I have used MongoDB, MySQL, and SQLite for various projects. PostgreSQL became my default because it handles both structured and semi-structured data well. JSON columns for flexible data, full-text search for content, and rock-solid ACID transactions for critical operations.

The ecosystem is mature. pgAdmin for visual inspection, pg_stat_statements for query profiling, and logical replication when I need read replicas. Every problem I have encountered has a well-documented solution.

How They Work Together

The beauty of this stack is the TypeScript thread that runs through it. The Prisma schema generates types that NestJS services consume, and those same types flow into Next.js components via the API layer. A schema change propagates type errors across the entire stack instantly.

My typical development loop:

  1. Define the data model in Prisma schema.
  2. Generate the migration and the client.
  3. Build the NestJS endpoint with validation and guards.
  4. Consume the API in Next.js with proper error boundaries.

Each step builds on the previous one, and TypeScript ensures they stay in sync.

The Bottom Line

Productivity is not about the fastest framework. It is about the stack that lets you focus on the problem instead of the tooling. This combination does that for me, and I ship faster because of it.

Enjoyed this post?

I'm always happy to connect and discuss ideas.