Nuxt + PostgreSQL
Nuxt, the full-stack Vue framework, with PostgreSQL behind its Nitro server routes: SSR pages and API endpoints in one TypeScript project.
- Nuxt
- Vue.js
- PostgreSQL
- Node.js
- TypeScript
- Learning curve
- Moderate
- Status
- Actively developed
- Reviewed
- November 2026
- Best for
- Vue teams that need SSR or prerendering for SEO
- Content sites and storefronts with a relational catalog
- Full-stack apps that keep pages and API routes in one repository
- Projects that may deploy to Node servers, serverless or edge platforms via Nitro presets
- Not ideal for
- Realtime multiplayer or WebSocket-heavy app
Overview
Nuxt adds file-based routing, server-side rendering and a Nitro server to Vue, with API endpoints living in server/api next to the pages. PostgreSQL sits behind those server routes, usually through Drizzle, Prisma or postgres.js, while pages load data with useFetch or useAsyncData. It is the default choice for Vue teams that need SEO-friendly pages and their own backend in one codebase.
What's inside
Vue's templates and Composition API are approachable. The learning effort is in Nuxt's conventions (SSR data fetching, auto-imports, Nitro server routes) and in choosing and wiring the database layer yourself.
Nuxt
Frontend
Builds the interface people see and use
Learning: Moderate
Status: Active
Vue.js
Frontend
Builds the interface people see and use
Learning: Easy
Status: Active
PostgreSQL
Database
Stores and queries the data
Learning: Moderate
Status: Active
Node.js
Runtime
Runs the code on the server or device
Learning: Easy
Status: Active
TypeScript
Language
The language the code is written in
Learning: Moderate
Status: Active
How it works
On the first request Nitro renders the Vue page on the server and calls its own server/api handlers in-process; those handlers query PostgreSQL, and the result is serialized into the page payload so the browser hydrates without refetching.
- 1.
Frontend to frontend
Nuxt matches the URL to a page in the pages directory and starts server-rendering the Vue component tree with its layouts.
- 2.
Frontend to runtime
useFetch('/api/orders') in the page calls the matching server/api handler directly during SSR, without an extra HTTP round-trip, inside the Nitro server on Node.js.
- 3.
Runtime to database
The h3 event handler validates input (for example readValidatedBody with Zod) and queries PostgreSQL through a pooled client or ORM shared from server/utils.
- 4.
Database to frontend
Results are serialized into the Nuxt payload alongside the HTML; the browser hydrates from that payload, and later client-side navigations call the same /api route over HTTP.
Strengths and drawbacks
Strengths
Server routes next to pages
Files in server/api become endpoints, and useFetch and $fetch infer response types from them, so frontend and backend share types without a separate API project or code generation.
Deploy-anywhere Nitro output
Nitro presets build the same app for a Node server, Vercel, Netlify, Cloudflare and other targets, so changing hosts is mostly a build setting rather than a rewrite.
Per-route rendering rules
routeRules let one app prerender marketing pages, cache catalog pages with stale-while-revalidate, and server-render account pages, without splitting into separate projects.
Conventions that remove boilerplate
File-based routing, auto-imported components and composables, and official modules such as Nuxt Image and Nuxt Content cover common needs with little setup.
Drawbacks
No built-in data layer
Nuxt ships no ORM, migrations or connection handling. Teams choose Drizzle, Prisma or a raw driver and must share one pool themselves, especially on serverless presets where each instance opens its own PostgreSQL connections.
Auto-imports at scale
Auto-imported composables and components make it harder to see where code comes from in large projects, and naming collisions or implicit dependencies surface during refactors. Some teams disable parts of auto-import.
Hydration and payload pitfalls
Values that differ between server and client (dates, random IDs, browser-only APIs) cause hydration mismatches, and large useFetch results bloat the serialized payload unless trimmed with pick or transform.
Major-version migrations
Nuxt 2 to 3 was effectively a rewrite, and Nuxt 4 changed the default directory layout and some data-fetching defaults. Module compatibility needs checking before each upgrade.
Scores
Editorial ratings out of 10, comparable across every stack in the guide. They are judgement, not benchmarks. How we score
- Speed of building
- 8.4 out of 10, catalog average 7.7
- Ease of learning
- 7.7 out of 10, catalog average 7.2
- Scalability
- 7.2 out of 10, catalog average 7.6
- Performance
- 7.6 out of 10, catalog average 7.5
- Maintainability
- 7.0 out of 10, catalog average 7.2
- Ecosystem
- 7.0 out of 10, catalog average 8.2
- Flexibility
- 7.8 out of 10, catalog average 7.4
How quickly a team ships features
Higher means easier to pick up
How far it grows before a redesign
Speed of the running application
How well the codebase ages
Libraries, hosting, docs and hiring
How many kinds of product it suits
How it scales
Nitro servers are stateless and scale horizontally; PostgreSQL connection management and SSR CPU cost are the usual limits, eased by per-route caching.
- Starting outMVP and first users
- nuxt build with the node-server preset on one VPS or container, or a Vercel/Netlify deployment, with a managed PostgreSQL instance.
- GrowingReal traffic, a few engineers
- Several Nitro instances behind a load balancer, PgBouncer or a provider pooler, and routeRules prerendering or SWR-caching read-heavy pages.
- LargeHeavy traffic or data
- Redis-backed Nitro storage for caching and sessions, PostgreSQL read replicas for catalog queries, and background jobs in a separate worker process.
- EnterpriseMany teams and regions
- Nuxt as the web tier in front of dedicated domain services, multi-region CDN caching, and PostgreSQL scaled with replicas or partitioning.
Where it fits
Common projects, from best fit to worst.
E-commerce storefront
Server-rendered product pages cached with routeRules, backed by relational catalog and order tables in PostgreSQL.
Great fit
Content site with a member area
Nuxt Content or a headless CMS for public pages, plus server routes and PostgreSQL for accounts, forms and saved data.
Good fit
Realtime multiplayer or WebSocket-heavy app
Nitro has experimental WebSocket support, but long-lived connections and fan-out are easier to operate in a dedicated realtime service.
Workable
Alternatives
Similar stacks, and when you would choose them instead.
- Next.js + PostgreSQL
The React counterpart, with a larger ecosystem and hiring pool and React Server Components instead of Vue SSR.
CompareNuxt + PostgreSQL with Next.js + PostgreSQL - SvelteKit + PostgreSQL
A similar full-stack shape with smaller client bundles and built-in form actions, if the team prefers Svelte.
CompareNuxt + PostgreSQL with SvelteKit + PostgreSQL - Laravel + PostgreSQL
Laravel with Inertia and Vue gives Vue pages on a batteries-included backend with ORM, queues, auth and migrations already decided.
CompareNuxt + PostgreSQL with Laravel + PostgreSQL - Vue + Vite + TypeScript
A client-only Vue SPA against an existing API is simpler when every page sits behind a login and SEO does not matter.
CompareNuxt + PostgreSQL with Vue + Vite + TypeScript
Sources
Reviewed on November 19, 2026 against the documentation below. Found something out of date? Suggest a correction. Read our methodology.
- Nuxt documentation
Official Nuxt docs for Vue full-stack apps.
- Nuxt database / server utilities
Server directory pattern commonly backed by Postgres in production Nuxt apps.
- Vue.js guide
Official Vue documentation.
Related stacks
Stacks that share technologies with Nuxt + PostgreSQL.
Next.js + Prisma + PostgreSQL
Next.js with Prisma ORM against PostgreSQL, a dominant TypeScript full-stack recipe for typed database access.
- Next.js
- Prisma
- PostgreSQL
- +2
Learning: Moderate
Next.js + Drizzle + PostgreSQL
Next.js with Drizzle ORM and PostgreSQL, a SQL-shaped, TypeScript-first data layer with inferred types, no code-generation step and a small runtime.
- Next.js
- Drizzle
- PostgreSQL
- +2
Learning: Moderate
T3 Stack (Next.js + tRPC + Prisma + PostgreSQL)
Focused, full-stack Next.js recipe emphasizing end-to-end type safety with tRPC, Prisma ORM, and PostgreSQL.
- Next.js
- tRPC
- Prisma
- +4
Learning: Moderate