You have a workspace and a spec. Now you choose what to build the app out of: the language, the framework, the database, the place it runs. Ignore the hundreds of options and the fights about them. This chapter hands you a stack to start on today, and a prompt that picks the right one for your case with a senior engineer's judgment.
2.1.1A stack is layers, bottom to top
A stack is just the layers your app is built from, each sitting on the one below:
- Platform: where it runs, web, iPhone, or desktop. This choice decides everything above it.
- Language: the code it is written in, like TypeScript or Python.
- Framework: a proven structure on top of the language, so you do not start from a blank page.
- Boilerplate: a ready-made starter project, so you begin from a working app instead of an empty folder.
- Libraries: open-source pieces you drop in for one specific job instead of building it yourself.
You pick from the bottom up, and at each layer the popular choice is usually the right one.
2.1.2Default to the popular choice
Pick the most common option unless a hard requirement forces otherwise. Your agent has built it countless times and makes fewer mistakes with it, so popularity is really how much help you get.
2.1.3A stack for almost any app
For a typical web or consumer app, take this as-is:
| Piece | Use | Why |
|---|---|---|
| Frontend | React, via Next.js | The default way to build a web interface |
| Backend | Node with TypeScript | Same language as the frontend, one stack to run |
| Database | PostgreSQL | Proven, free, handles almost anything |
| Hosting | A plain rented server | Cheapest and simplest; a plain server suits your agent better than a fancy dashboard |
One language front to back. Next.js can serve both sides, so it is often the whole stack on its own.
2.1.4Switch when the job demands it
The default holds until your app has a real requirement. Then a senior engineer moves deliberately, one line each:
- AI or heavy data: a Python backend, its ecosystem is years ahead.
- Very low latency or high throughput: Go or Rust on the hot path.
- A static or brochure site: no backend or database at all.
2.1.5Let your agent choose for your case
This prompt already carries the engineering judgment. Paste it in and describe your app in the one slot at the bottom, nothing in the middle to hunt down and replace:
Act as a senior engineer choosing my stack. Recommend a
frontend, backend, database, and hosting for the app below.
Default to the simplest, most popular, agent-friendly option,
and override only where my case demands, with real
engineering judgment:
- Typical web or consumer app: TypeScript everywhere.
- AI or heavy-data app: Python backend for the ecosystem.
- Low-latency or high-throughput core: Go or Rust there.
- Weigh ecosystem maturity, hosting cost, and how easily
an agent can maintain it.
For each choice: one line of reasoning, plus one alternative
and its tradeoff.
My app:
Do this now: take the default stack, or paste the prompt and describe your app at the bottom, then lock one tool into each piece before the next chapter.