---
title: Choosing a stack
summary: How to pick tools that solve your problem, and why "boring" is usually right when agents write the code.
section: stacks
phase: plan
order: 1
last_reviewed: 2026-11-20
---

# Choosing a stack

A stack is the set of tools that make up your app: language, framework, database, hosting and services. With agents writing the code, the best stack is usually the **most popular, well-documented** one, because that's what models know best.

## You'll be able to
- Evaluate a stack against your actual constraints
- Understand why popularity matters more than it used to
- Tell an agent your stack precisely, with versions

## The mental model
Start from the problem and the constraints, not the tools:
1. **What are you building?** (content site, SaaS, real-time app, API, mobile, AI feature)
2. **What are the constraints?** (budget, team skills, scale, compliance, timeline)
3. **What's the most boring stack that satisfies them?**

## Key concepts
- **Training-data advantage:** Models write better React/Next.js/Postgres/Python than they write niche frameworks, because they've seen far more examples. Newer versions may postdate a model's training, so give the agent the docs (via MCP doc servers, `llms.txt`, or pasted links).
- **Full-stack frameworks:** Next.js, Nuxt, SvelteKit, Remix/React Router, Rails, Django, Laravel, Phoenix. One codebase covers UI, server and routing.
- **Backend-as-a-Service (BaaS):** Supabase, Firebase, Convex, Appwrite. Database, auth, storage and real-time in one service. Very fast to start with, but you're tied to the vendor.
- **Managed services:** Use them for anything that isn't your core product: auth, email (Resend, Postmark), payments (Stripe), storage (S3/R2), search.
- **Lock-in:** How hard it would be to leave. Portable choices (Postgres, Docker, open standards) keep your options open.
- **Version pinning:** Always tell the agent the major versions you're on (for example "Next.js 15 App Router", "Tailwind v4"). APIs change between majors.

> **Note:** `llms.txt` is an open **proposal**, not a formal standard. Its site (llmstxt.org, modified August 2026) describes a Markdown file at `/llms.txt` that gives agents an overview of a site and links to detailed pages, and it suggests serving clean Markdown versions of pages by adding `.md` to the address. Many documentation sites publish one, but check whether the docs for your stack do before you rely on it. This site publishes `/llms.txt` and `.md` versions of every page.

> **Note:** "Choose Boring Technology" (Dan McKinley, 2015) frames the cost of novelty as a small budget of "innovation tokens" (he says a company gets about three, as an approximation). Each new technology you adopt spends one, and each brings failure modes nobody on the team understands yet. He is explicit that boring isn't the same as good, and that adopting something new is fine when it earns it.

## Decisions you make (not the agent)
| Decision | Sensible default | Choose otherwise when… |
|---|---|---|
| Language | TypeScript end-to-end | ML/data-heavy → Python backend |
| Framework | Next.js | Content-heavy → Astro; preference → SvelteKit/Rails/Django |
| Database | Postgres | See [Databases](/docs/data/databases.md) |
| Auth/email/payments | Buy (managed services) | Strict cost/compliance |
| New/niche tech | Avoid unless it's the point | It's a learning project, or it solves a real constraint |

### Not sure? Answer a few questions

```decision
title: Pick your stack defaults
Q: What does the backend mostly do? | Language
- Typical web app logic -> TypeScript end to end | One language across the whole app.
- Machine learning or heavy data processing -> A Python backend | Use it where the ML and data tooling lives.
Q: What are you building? | Framework
- An app with logins and dynamic pages -> Next.js | The sensible default.
- A content-heavy site such as docs, a blog or marketing pages -> Astro | Built for content.
- I already know and prefer another framework -> SvelteKit, Rails or Django | Preference is a valid reason when you know the tool.
Q: Should you build or buy auth, email and payments? | Auth/email/payments
- Standard needs, and I want to ship -> Buy managed services | Don't hand-roll security and billing.
- Strict cost or compliance constraints -> Build or self-host | The case where managed services stop fitting.
Q: Are you tempted by a new or niche technology? | New/niche tech
- Only because it looks interesting -> Avoid it for this project | New tech costs you time and agent accuracy.
- It's a learning project, or it solves a real constraint -> Use it deliberately | Those are the reasons the table accepts.
```

## What good output looks like

- One recommendation per role (language, framework, database, hosting, auth, email, payments), each with a single alternative and when to pick it
- Exact major versions, so the agent and you agree on the APIs
- Mostly well-known tools, with any new or niche technology called out and justified
- Fewer services than you expected, and the lock-in of each one stated
- Questions about constraints it doesn't know, instead of assumptions

## Red flags
- The agent mixing major versions (Pages Router patterns in an App Router app, Tailwind v3 config in v4)
- Five services where one would do
- A stack chosen because it's trending rather than because it fits
- **Common agent mistakes:** proposing several new technologies at once for a small project; leaving out versions; choosing a backend-as-a-service without saying you'd be tied to the vendor; adding a message queue, a cache and a search service before there is any load; recommending a stack because it is popular in general, not because it fits your constraints

## Worked example

**Task:** Pick a stack for a booking app for three stylists, built by one developer who knows TypeScript.

You prompt: *"What stack should I use for a booking app?"* The agent recommends a microservices architecture, GraphQL, a document database, a message queue, a newer UI framework you haven't used and a container orchestrator. It sounds impressive and none of it is pinned to a version.

**What a good result contains:** a boring, well-documented stack that one person can run: Next.js and Postgres, managed auth, Stripe, and a platform host. Each role has one alternative and the lock-in is stated. Anything new is called out and justified.

**The wrong turn:** every new technology is something you have to learn, operate and debug, and the agent knows less about the newer ones. Dan McKinley's essay describes novelty as drawing on a small, fixed budget, and this stack spends it many times over before a single booking exists. With no versions, the agent will also mix patterns from different major versions.

**How review catches it:** ask *how many of these are new to me?* and *what would you remove?* For each remaining choice, ask for the alternative, what it costs to run, and the lock-in. Then pin the versions in AGENTS.md. If something new really is worth it, write down why, as McKinley suggests, and keep the rest boring.

## Sample prompts

### Weak vs strong
```compare
## Weak
What stack should I use for my app?
## Why it fails
It names no product, users, budget, skills or timeline, so the agent recommends whatever is popular in general, with no trade-offs and no sense of what you can operate.
## Strong
I'm building <describe product, users, scale, budget, timeline>. My skills:
<list>. Recommend a stack (language, framework, DB, hosting, auth, email,
payments, analytics) optimizing for: shipping fast, low cost under <N> users,
and strong LLM/agent familiarity. For each choice give one alternative and when
I'd pick it. Flag anything with significant lock-in.
## Why it works
It gives the product, your skills and the constraints that matter, and it asks for one alternative per choice plus the lock-in, which is what you need in order to decide.
## What changed
- **Product, users, scale, budget and timeline** are stated
- **Your skills** are listed, so the stack fits the person who will run it
- **The goals** are ranked: ship fast, low cost, strong agent familiarity
- **One alternative per choice** and when you'd pick it
- **Lock-in** is called out
```

```text
Add to AGENTS.md a "Stack" section with exact major versions from package.json,
and a list of version-specific gotchas you know for each (e.g. App Router vs
Pages Router, Tailwind v4 config). Mark anything you're unsure about.
```
*Why it works:* Pinned versions and known gotchas in AGENTS.md stop the agent from mixing patterns from different major versions, and "mark anything you're unsure about" keeps it honest.

### Spend your novelty budget deliberately
```text
Here is the stack you proposed. List every technology in it. For each one, say whether it is likely to be new to me (my skills: <list>), what a boring alternative would be, what it costs to operate, and what would make it worth the extra risk. Recommend which, if any, of the new ones to keep, no more than <N>, and say what you'd cut.
```
*Why it works:* It makes the cost of each new technology explicit, which is the trade-off the agent skips by default.

### Audit a stack for lock-in and version drift
```text
Audit this project's stack. List each major dependency and service with its exact major version from the lockfile. Flag: versions that differ from what AGENTS.md says; places the code mixes patterns from different major versions; services that would be hard to leave (and what leaving would involve); and anything that appears to duplicate another dependency. Don't change anything yet.
```
*Why it works:* Version drift and lock-in are quiet problems. A list from the lockfile makes them visible.

### Explain the choices you rejected
```text
For each choice in your recommendation, explain what you considered and rejected, and why. Say which of your reasons depend on my constraints (budget, skills, scale, timeline) and would change if those changed. Mark any claim about a tool that you aren't sure is current.
```
*Why it works:* Rejected alternatives and their reasons show whether the recommendation is tied to your situation or just a default. Verify tool claims against the current documentation.

## Check your understanding

```quiz
Q: Why does popularity matter more when an agent writes the code?
- [ ] Popular tools are always better
- [x] Models have seen far more examples of popular tools, so they write them more accurately
- [ ] Niche tools can't be used with agents
> Why: Accuracy depends on how much the model has seen. A newer or niche tool means more guessing and more mistakes.

---

Q: In "Choose Boring Technology", what does adopting a new technology cost?
- [ ] Nothing, if it's the best tool for the job
- [x] One of a small budget of "innovation tokens": novelty brings failure modes the team doesn't understand yet
- [ ] A licence fee
> Why: McKinley argues that attention and risk are limited, so each new choice should be deliberate.

---

Q: What should you always tell the agent about your stack?
- [ ] Only the language
- [x] The exact major versions, for example "Next.js 15, App Router" and "Tailwind v4"
- [ ] Nothing, it can guess
> Why: APIs change between major versions, and a model may mix patterns from several.
```

## Checklist

- [ ] The stack is the most boring one that meets my constraints
- [ ] Anything new or niche is justified in writing
- [ ] Exact major versions are in AGENTS.md
- [ ] I know the lock-in of each managed service
- [ ] I can operate everything in it, or know who will

## Go deeper
- [Choose Boring Technology (Dan McKinley)](https://mcfunley.com/choose-boring-technology)
- [llms.txt](https://llmstxt.org): the proposal for helping agents read a site
- [Context engineering](/docs/ai-agents/context-engineering.md): putting your stack and versions in an instruction file
- [Stack recipes](/docs/stacks/stack-recipes.md): known-good combinations
- [Databases](/docs/data/databases.md) and [Deployment](/docs/shipping/deployment.md)
