Hype StackHypeStack

How to Build an App with AI: Pick the Route, Copy the Setup

GuideThe answer first, the product second.

All stacks

By Maciej Pyrc, who maintains Hype Stack.Published .

"AI builds the app" covers two arrangements. In one, a platform writes the code and runs it for you. In the other, an agent edits a codebase you own and host. Most of what goes wrong later follows from which one you chose.

Tutorials on how to build an app with ai usually walk through one tool and call that the method. That skips the first decision. A hosted AI builder such as Lovable, Bolt, Replit or v0 takes a description and returns a running app on its own platform. A coding agent such as Claude Code, Cursor or Codex edits files in a repository on your machine, and the hosting, the database and sign-in are yours to arrange. The scope here is building a web app with AI, meaning something people open from a link and sign in to.

Either one can make an app with AI this week. They break in different places, so this page picks the route first, then gives the agent route as a setup you can copy.

Builder or agent: which route is yours

Who runs the app once it works?

A hosted AI builder

The platform does. Pick it to learn whether the idea deserves an app.

  • Describe the app in a browser and get a link, with hosting, a database and sign-in arranged
  • Building is metered, and the finished app assumes the platform under it
A coding agent on your codebase

You do. Pick it when the app is meant to last and take real users.

  • The agent edits a git repository, so the app outlives the tool that wrote it
  • A typecheck and tests can fail a wrong guess before a user finds it
  • A slower first hour: tools to install, a database to run, hosting to arrange

When a builder is the right call

A builder is made for the person who wants to create an app with AI and not look at code. Stay on one when three things are true. Nobody on the project uses git or a terminal. The goal is something to put in front of five people, not something to run for a year. And the app will not hold data you would be in trouble for losing. Under those conditions a builder is faster than anything further down this page. Best AI App Builder 2026 compares the four main ones, and How Do I Make an App? ranks every route by cost, the no-code one included.

The agent route starts to win when any of these shows up: people pay you, the app stores other people's data, a second person needs to work on the code, or you expect to maintain it next year.

"It worked in the demo and broke with real users"

Sessions log people out. A payment fails now and then. A fix to one screen breaks another. An API key turns up in frontend code. Reports like these usually trace back to three things an agent in an empty folder does not have.

What an empty folder is missing

Code to copy

An agent writes in the shape of what it reads. With nothing to read, it picks a layout per session, and Thursday's permission check does not match Monday's.

A check that can fail

Without a typecheck and tests, done means the agent stopped. With them, a changed response field that a screen still reads fails before you open the browser.

Reviewed code for the risky parts

Payment providers retry and reorder webhook events, and code written from memory tends to assume each one arrives once. Sign-in and permissions fail the same quiet way.

So before the first prompt, check whatever you start from for four things: sign-in and permissions that work, a typecheck and a test command, conventions written in the format your agent reads, and one command that runs it locally.

What the agent route asks you to bring

A builder hides these behind one subscription. On a codebase you own, each is a separate account with its own bill, whichever starter you pick.

Accounts in your name

  • The agentClaude Code from Anthropic, Cursor, or Codex from OpenAI. You pay them for the model.
  • A host and a Postgres databaseWhere the app and its data run once they leave your laptop. Not needed on the first evening.
  • A payment providerStripe, or Lemon Squeezy or Polar if you want a merchant of record handling tax. Skip it until you charge.
  • Email sendingA provider such as Resend, with a verified sending domain. Password reset emails go through it.

A browser the agent can drive is the first MCP server worth adding, and it is somebody else's too. Best MCP Servers for Claude Code lists the rest.

What to start from tonight

The repository we make for this is Hype Stack: a TypeScript web app with a React frontend and a Hono API on Postgres, scaffolded by one CLI command and kept as source in your own git history. It needs Node 20 or newer and pnpm 12, plus Docker for the local database.

From an empty directory to the first feature

  1. Scaffold an app that already has accounts

    Run in an empty directory, the template command scaffolds the project, installs the starter, layout and billing, then offers to start Docker and migrate.

    npx @hype-stack/cli template better-studio
  2. Tick the agents you use

    The wizard writes the same conventions in each tool's format: .claude/rules/*.md for Claude Code, .cursor/rules/*.mdc for Cursor, AGENTS.md for Codex. Eleven skills land in .agents/skills.

  3. Connect the MCP server

    Eleven tools that go through the real CLI. plan_install flags a pack your licence does not cover before anything is written, add_packs copies the code in, and setup_project runs Docker and the migration once the agent has asked you.

    npx @hype-stack/cli@latest mcp install
  4. Type the keys in yourself

    The onboard command walks the variables your packs need: the Stripe secret, the plan ids, the signing secret for the webhook at /checkout/webhook. The MCP tool env_status reports what is still empty and takes no secrets.

    npx @hype-stack/cli onboard
  5. Ask for your feature, not for plumbing

    Sign-in and organizations exist, so the first prompt is the workflow only your app has. Point at an existing feature folder as the pattern, then have the agent run pnpm typecheck and the tests.

  6. Put it online early

    The deploy command creates the apps and Postgres on your own Fly.io or Railway account. It shows the plan and waits for a yes before creating anything billable.

    npx @hype-stack/cli deploy web --dry-run prints every command first

The flow is the same whether you build an app with Claude Code, Cursor or Codex. The Claude Code half (CLAUDE.md, plan mode, permissions) is step by step on How to Vibe Code with Claude, and the order to add accounts, teams and billing in is on How to Build a Web App.

better-studio is the multi-tenant SaaS template: the Better Auth starter, the Glass layout, Stripe subscriptions, a marketing landing page and revenue widgets in the admin app. The layout and the billing pack in it are paid. To try the route first, npx @hype-stack/cli compose --packs starter-saas-betterauth,layout-basic installs the two free pieces: email and Google sign-in, organizations, invitations, roles and the admin app, without billing.

Templates an agent can start inEach one is a running app with accounts, an admin app, rules files and a test setup.Browse templates

What you still write yourself

The product. Concretely: the Prisma models for your own records and their migration, the routes and screens for the core workflow, the rule for which role may do what to those records, what each paid plan allows, and the landing page copy. A feature such as "members can archive a project" is a status column, an endpoint with a permission check, and a button. The agent writes most of it. You read the plan and open the result as a second user to see whether the check holds.

What is not in the box

We ship no agent, no prompt box and no visual editor, and we host nothing. You get a repository and a terminal, and the first screen comes after an install and a database start. Because the files are yours, improvements we ship later do not arrive on their own: you re-run the CLI and merge what you want. The rules files know the conventions of the repository and nothing about your product.

Where this route stops

If you have never opened a terminal, expect the first evening to go on setup. Errors appear on your machine, and the agent will sometimes repair a symptom and report the job done, so commit after each working step. Rules files are advice the agent usually follows, and the typecheck only catches what is typed, so reading the plan stays your job. If that trade is wrong for where the idea is today, stay on a builder for now.

The sections below show the template this page recommends and the command that installs it.

For the files that steer the agent, see Claude Code Templates and Cursor Skills. If the app already lives on a builder, Lovable vs Claude Code covers moving it in stages.

What is Hype Stack?

Every product starts with the same month of work nobody pays you for: sign-up and login, teams and permissions, taking payments, notifications, an admin panel to run the business. Hype Stack is that month, already built and tested. Start from the free open-source app, add the pieces you need with one command, and keep going on the part that is actually your idea.

Everything lands as real code in your own repository, so there is nothing to rent and nothing anyone can switch off. For the engineers: React 19, Hono, Postgres, and a desktop build, typed end to end.

See it running.

Curated starters built on this stack: a layout, feature packs, a theme, and bonus pages. The previews are recordings of the real apps.
See all 8 templates

Two ways to install.

Same features underneath. Either command resolves what the packs need, copies the source into your repo, and merges the Prisma schema.

Take a template

A landing page, a design system, a themed layout, and the features already wired in. Rebrand it, put your product in the middle, ship.

$npx @hype-stack/cli template
Browse templates

Compose your own design

Your design and your choices, without rebuilding auth, billing, or notifications. Tick the packs you want and the CLI wires them into the open-source starter.

$npx @hype-stack/cli compose
Browse packs

Questions, answered.

Yes. On a hosted builder you describe the app and the platform writes and runs it. With a coding agent you can too, as long as the project gives you checks with a yes or no answer: a typecheck, tests, and opening the app as a second user. You still read the plan and approve commands, and the first evening goes on setup.

More stacks.

Your SaaS is one sentence away.

Add a Pro plan at $19 a month with a 14-day free trial.. Let customers invite their team and choose who can do what.. Send a welcome email the moment someone signs up.. Show me which customers are close to their limit this month.. Let people sign in with Google.

Free to start. Works in the AI tool you already use.