Skip to content
STACK IT FIRST
Install the skills
03 · Backend · MVP · Product API

Bun + Hono + SQLite

One file to start, a Zod-validated router, and a database that is a file in the repo until it needs to be more.
Agent fit5/5 MVP · Ship it Reviewed

The stack

Framework
Hono
Runtime
Bun
Data
SQLite (libSQL / Turso) via Drizzle ORM
Auth
Session cookies or a hosted provider's JWT
Hosting
Fly, Railway, or a single VPS; Turso if the database must be remote
Also
  • Zod OpenAPI for validation and a generated spec
  • Hono RPC client for the frontend
  • bun test
AGENTS.md + real projects on STACK IT FAST (opens in a new tab)

Why agents do well here

5/5
  • Hono's API is small and its docs are dense; the agent rarely invents a middleware that does not exist.
  • Drizzle over SQLite keeps the schema in one readable TypeScript file and migrations in the repo, so the agent sees the whole data model at once.
  • Zod on every route means a wrong shape fails at the boundary with a message the agent can act on.

Avoid at this tier

  • Postgres before you need concurrent writers; SQLite is faster to develop against and to test.
  • A queue; do the work inline until something takes longer than a request should.
  • Splitting into packages; one src/ is enough.

How it fits together

An MVP API is a router, a schema and a database, all runnable with one command and testable with another. Hono on Bun keeps startup instant and the surface small; Drizzle over SQLite keeps the data model visible.

Folder layout

src/
  index.ts        Hono app, mounts routes
  routes/         <resource>.ts with Zod schemas next to handlers
  db/             schema.ts, migrations/, client.ts
  routes/*.test.ts   bun test against a temp SQLite file

First five decisions

Lock these in before the agent writes the second feature. Each one removes a choice it would otherwise make differently every time.

  1. 01 Hono with Zod OpenAPI
  2. 02 Drizzle migrations from day one
  3. 03 SQLite until concurrency forces Postgres
  4. 04 Session auth or a hosted provider
  5. 05 A test per route file

Also fits this cell

Same tier, same profile, a different stack. Pick one of these only for the reason given.

When to move on

Stay here until the product forces the next tier. You are ready for Growth when:

  • A breaking response change would break a client
  • Background work, emails or webhooks exist
  • Someone asks for an API reference
  • You have been paged at least once
Growth · Product API NestJS + Postgres + Redis One service with strong module conventions, a queue for side effects, and an OpenAPI document clients are generated from. Next tier

Same tier, other profiles