# Step 7: Start from the stack, not a blank prompt

> Pagebee Academy, part 2 (Build). Tell the agent the stack on day one and write it into CLAUDE.md. Boring, popular tools mean the agent makes fewer mistakes and you can hire help later.

Time: 30 minutes. Cost: Free.

## Why it matters

Ask for "an app that does X" and the agent picks a stack for you, sometimes a different one each session. Name the stack up front and it builds on choices you can deploy, hire for and move.

Our default for a web product: **Next.js** with TypeScript for the app, **Postgres** for the data (with Drizzle to talk to it), and **Tailwind** for styling. Agents have seen millions of projects built this way, so they make fewer mistakes in it. Any of these can be swapped; the point is to decide once.

`CLAUDE.md` is a file in the root of your repo that Claude Code reads at the start of every session. Put the stack and your rules there, and you stop repeating yourself.

## Do this

1. In your repo, start Claude Code and paste the prompt below. It sets up the project and writes `CLAUDE.md`.
2. Read the `CLAUDE.md` it writes. Fix anything that's wrong in your own words. It should look roughly like this:

```
# CLAUDE.md

Tally helps freelancers chase unpaid invoices. Read docs/brief.md first.

## Stack
Next.js (App Router, TypeScript), Postgres with Drizzle, Tailwind.
Runs on Google Cloud Run; database on Cloud SQL. Email through Resend, payments through Stripe.

## Rules
- Small steps. Commit after each one with a message that says why.
- Never commit secrets. Settings live in .env locally and Secret Manager in production.
- Database changes are migrations, and they only ever add.
- Run the type check before every commit.
```

3. Run the app on your own computer and open [localhost:3000](http://localhost:3000). If you see a page, the foundations work.

```
npm run dev
```


## Paste into Claude Code

```text
Read docs/brief.md. Set up this repo as a Next.js app with the App Router and TypeScript, Tailwind for styling, and Postgres through Drizzle (use a local Postgres in Docker for development, with a docker-compose.yml). Add a .env.example listing every setting by name with no values. Write a CLAUDE.md that records the stack, how to run it locally, and these rules: small committed steps, no secrets in git, additive database migrations only, type check before every commit. Don't build any features yet. Commit and push.
```

## The trap: Picking the exotic option because the agent suggested it

Agents will happily reach for a new framework, a hosted database with its own query language, or a backend-as-a-service with a generous free tier. Each one is a thing you can't easily leave. Plain Postgres and a container run anywhere, which is what keeps step 16's bill flat.

## Using something else

If you already know another stack (Rails, Django, Laravel, SvelteKit), use it. Claude Code knows them all, and every later step works the same: it's a container and a Postgres database either way.

## Sources

- [Claude Code: memory and CLAUDE.md](https://code.claude.com/docs/en/memory)
- [Next.js: installation](https://nextjs.org/docs/app/getting-started/installation)

Checked 24 November 2026. https://pagebee.ai/academy/start-from-the-stack
