No. 72Architecture8 min read2,123 words
The stack we reach for: Next.js, TypeScript and Postgres
Our default web app stack, layer by layer: Next.js, strict TypeScript, Postgres and managed infrastructure, why each earns its place, and when we deviate.
- Written by
- Lazy Devs
- Published
- Updated
- Sources
- Cited inline

Key takeaways · 05
The short version
- 01Our default for most web products is Next.js and React, strict TypeScript everywhere, one Postgres database, and managed infrastructure underneath.
- 02We choose it because it is hireable, stable and good enough at almost everything, so a new engineer is productive quickly and most problems are already solved.
- 03React Server Components let most of a page render on the server with no client JavaScript, which keeps apps fast and keeps secrets and data access on the server.
- 04A single Postgres instance can be the relational store, document store, full-text search, job queue and vector index for a long time; we add a second system only when we can name the limit Postgres hit.
- 05We deviate for named, measurable reasons: heavy data or ML work, realtime-first products, a client team already fast in another stack, or a real scale or latency limit.
On this page · 11
Our default stack for most web products is Next.js and React on the frontend, TypeScript everywhere, a single Postgres database, and boring managed infrastructure underneath. We choose it because it is hireable, stable and good enough at almost everything, which lets us spend our time on your product instead of on plumbing. We deviate from it only when a constraint we can name and measure says to.
Every agency has a default stack, whether they admit it or not. The honest ones tell you theirs and explain why, because a default refined across many projects is worth more than a fresh "best tool for the job" debate started from scratch every time. Ours is deliberately unexciting. Here is what we reach for, the reasoning behind each piece, and, more usefully, the specific moments we put the default down.
Our default stack at a glance
| Layer | Default | Why it earns its place | When we change it |
|---|---|---|---|
| Framework | Next.js (App Router) with React | One codebase for public pages and the app; server rendering built in | Internal tools with no SEO needs, content-only sites |
| Language | TypeScript, strict mode | Compiler-checked refactors and shared types across the stack | Throwaway scripts and spikes |
| Styling | Tailwind CSS | Fast to build, consistent, no stylesheet sprawl | An existing design system with its own approach |
| Validation | Zod schemas at every boundary | One schema gives runtime checks and static types | Rarely |
| Database | Postgres with a typed query layer | Relational, JSON, search, queues and vectors in one system | A named limit, measured under real load |
| Background work | A Postgres-backed queue, or a managed queue | Slow work leaves the request without new infrastructure | High-throughput event streams |
| Hosting | Managed platform, or containers on managed infrastructure | Nobody becomes a part-time server administrator | Compliance or data residency constraints |
| Delivery | One CI workflow, preview deploys, OpenTelemetry | Small surface the team can own | Larger teams with platform engineers |
None of this is chosen to win an argument online. It is chosen because the talent pool is large, almost every problem has already been solved by someone, and a new engineer can be productive in days. Novelty is a cost you pay forever.
Next.js and React: because the boring path is paved
The frontend framework war burns the most oxygen and matters the least. Any mainstream choice works. We reach for Next.js because it covers marketing pages, dashboards and SEO-sensitive content in one codebase, and because hosting it is a solved problem rather than a science project. This site runs on the same stack (how we built it), and our roundup of the best hosting for Next.js compares where to run it.
Underneath that is React itself, with the largest component ecosystem around. The date picker, the data table, the accessible dialog, the thing you would otherwise spend a week building, already exists and has been tested in production by many other teams.
The biggest change in recent years is React Server Components. In the App Router, components render on the server by default. They can read from the database directly, keep secrets on the server, and send HTML with no client JavaScript at all. Only the interactive parts, marked as client components, ship JavaScript to the browser. The Next.js guide to server and client components explains where that line goes. In practice it means faster pages and less code that can leak data, which is exactly the trade we want by default. Our speed study of the Forbes Cloud 100 homepages shows how quickly client-side JavaScript adds up when that line is drawn carelessly.
We do deviate here, predictably. If a product is a pure internal tool behind a login with no SEO needs, we will often use a plain React single-page app on Vite. Server rendering adds real complexity, and there is no reason to pay for it when nobody outside your login ever sees a page. For content-heavy sites, the answer occasionally tips toward a content-focused framework instead.
TypeScript everywhere, because future-you is the maintainer
TypeScript is non-negotiable for us, and we run it with strict mode on. The argument against it is always "it slows us down at the start", which is true and mostly irrelevant. The cost lands on day one and the payoff compounds for years: every renamed field, every refactor, every new engineer who needs the compiler to tell them what is safe to touch.
One language across frontend and backend genuinely helps small teams. We define request and response shapes once as Zod schemas, validate at runtime at every boundary (forms, API routes, webhooks, environment variables), and infer the TypeScript types from the same schema. A change in one place lights up everywhere it matters before it reaches a user. We made the longer case in is strict TypeScript worth it. The short version: yes, and projects that skip it tend to pay the difference later in production bugs.
Where we ease off: throwaway scripts, spikes and genuine prototypes meant to be deleted. Strictness is a tool for code that has to live, and not every line does.
Tailwind CSS for styling
We default to Tailwind CSS. Utility classes keep styles next to the markup they affect, which makes components self-contained and easy to delete without leaving orphaned CSS behind. Tailwind v4 moved configuration into CSS itself, with design tokens defined as theme variables, which makes it easy to share a design system between apps.
The exception is a client with an established design system built on another approach. Consistency with what exists beats our preference.
Postgres first, because one boring database does almost everything
We default to Postgres, and we mean it. The temptation on every project is to match a fashionable store to each shape of data: one for documents, one for search, one for the queue. The lazy answer is usually right: start with one Postgres instance and add a second system only when Postgres genuinely cannot do the job.
A single Postgres instance can be:
- Your relational store, with real constraints and transactions.
- Your document store, using
jsonbfor flexible fields. - Your full-text search, which is plenty for most in-app search.
- Your job queue, using
SELECT ... FOR UPDATE SKIP LOCKEDso multiple workers can claim jobs without stepping on each other. The PostgresSELECTdocumentation covers the locking clause. - Your vector index for AI features, with the pgvector extension.
That is one backup strategy, one connection pool and one thing to monitor at 3 a.m., instead of four systems that all have to be online for your app to work. The reflex to reach for a document database rarely survives the question "what do you actually gain?", which we work through in Postgres vs MongoDB.
For the query layer, we use a typed query builder or ORM so that database results come back with correct types and migrations live in version control. The specific library matters less than the habit: typed queries, reviewed migrations, and no hand-edited production schema.
Boring, reliable infrastructure underneath
Underneath all of it we run managed infrastructure: a managed host, a managed Postgres, object storage for files, a transactional email provider, and as little bespoke operations work as we can get away with. The goal is that nobody on your team has to become a part-time platform engineer to keep the lights on.
The real cost of infrastructure is rarely the hosting bill. It is the operational surface. Every extra system is another upgrade path, another security advisory to read, another failure mode and another thing a new engineer has to learn before they can ship. We treat each new piece as a standing cost on the whole team and add it only when something forces our hand.
When a client needs to self-host, for cost, compliance or data residency, we package the app in a container and follow the Next.js self-hosting guide for the details that change when you leave a managed platform, such as shared caches and encryption keys across instances.
Delivery stays equally plain: one CI workflow, preview deployments for every pull request, and deploys of the exact build that passed, as described in our guide to CI/CD that small teams actually maintain. On top of that, structured logs and OpenTelemetry traces so production problems can be explained, not guessed at.
The complexity we deliberately avoid
A senior team is defined as much by what it refuses to build as by what it ships. The things we steer away from until there is a real reason:
- Microservices on day one. A service per team makes sense at a scale most products never reach. Before that, it is usually a distributed monolith: network calls where function calls used to be, and many deploy pipelines instead of one. Start with a well-structured single codebase and split only when a clear seam and a real team boundary demand it.
- Kubernetes for forty users. A real tool for real scale problems, and dead weight on a product that does not have them. A managed host carries you a long way.
- A second database "to be safe". Every store you add is another thing to back up, secure and keep in sync. We add one only when we can name the limit Postgres hit, with a number attached.
- Heavy abstractions for flexibility you do not have yet. A generic plugin system for the one integration you actually need is a cost on every future change. We build the concrete thing first.
- Client-side state libraries by reflex. With server components and URL state, many apps need far less client state than they used to.
The thread tying these together: we add complexity in response to a measured problem, never in anticipation of an imagined one. "Our p99 latency crossed our target under load" is a reason. "It feels more scalable" is not. The same instinct applies to repositories (monorepo vs polyrepo) and to content sites, where a fast marketing site often needs no database at all.
When we deviate, and why
The default is a starting point, not a religion. The honest reasons we put it down:
- A heavy data or ML workload. Python earns its place. Doing serious data work in Node to keep one language is a false economy, and we will happily run a Python service alongside the TypeScript one.
- Realtime-first products such as collaborative editing or live multiplayer. There the sync architecture, not the framework, is the hard part, and we design around it before picking tools.
- Your team already knows something else well. A team that ships fast in Rails or Laravel will out-deliver the same team learning Next.js from scratch. If we are building alongside your people, their strengths often beat our default.
- A genuine scale or latency limit where a specialised tool (a cache, a search cluster, a column store) clearly pulls ahead. We reach for it then, with the number that justified it written down.
Every one of those is specific and measurable. None of them is a vibe. If you are making this decision for your own product rather than reading about ours, our founder-focused guide on how to choose a tech stack walks through the criteria step by step.
What this stack means for you as a client
A default stack is not just an engineering convenience. It changes what you get:
- Faster starts. We are not evaluating tools on your budget. Week one is spent on your product.
- Easier handover. Any competent React and TypeScript team can pick up the codebase, whether that is your future hires or another agency.
- Fewer surprises. We know where this stack's sharp edges are, because we have hit them before.
- Lower running costs. Fewer systems mean smaller bills and less maintenance.
- Honest exceptions. When we recommend something different, it is because your product needs it, and we will tell you why.
The short version
The stack we reach for is Next.js and React, strict TypeScript, a single Postgres instance and boring managed infrastructure, because it is hireable, stable and good enough at almost everything. We deviate when a constraint we can name and measure says to, and not a day before.
If you want a straight second opinion on a stack you are about to commit to, or you want it built properly the first time, tell us what you are working on. That is the good kind of lazy: a default sharp enough that we rarely have to reinvent it, and the judgment to know when we should.
For the wider picture of what teams actually use, see our JavaScript framework statistics, each figure linked to its source.
FAQ · 05 questions
Frequently asked questions
Why do agencies use Next.js so often?
Next.js covers public marketing pages, SEO-sensitive content and logged-in application screens in one React codebase, with server rendering, routing and data fetching built in. It is widely used, so hiring and handover are easier, and it can be hosted on managed platforms or self-hosted in containers.
Is one Postgres database enough for a production app?
For most products, yes, for a long time. Postgres handles relational data, JSON documents, full-text search and, with the pgvector extension, vector search. It can also back a simple job queue. Add a specialised system when you can point to a specific limit Postgres has hit under real load, not before.
When should you not use Next.js?
When there are no public pages and no SEO needs, such as an internal tool behind a login, a plain React single-page app is lighter. For mostly static, content-heavy sites with little interactivity, a content-focused framework can be simpler. And if a team is already fast in another mature framework, that speed is often worth more.
Do you use microservices?
Not by default. Most products are better served by a well-structured single codebase with clear internal modules and one deploy pipeline. We split out a service when there is a clear seam, such as a Python data pipeline or a separately scaled worker, or when separate teams need to deploy independently.
What hosting do you use for Next.js apps?
We prefer managed platforms for most projects, because they handle builds, preview deployments, scaling and TLS without anyone running servers. When a client needs to self-host for cost, compliance or data residency reasons, we package the app as a container and run it on managed container infrastructure.