Skip to content

ADR-0002: No Next.js

ADR-0002: No Next.js

  • Status: Accepted
  • Date: 2026-07-30
  • Supersedes:
  • Superseded by:

Context

Next.js is the default reach for a React web app, and would ordinarily serve both the UI and the API routes.

Decision

Do not use Next.js. Use a standalone Hono API plus a separate web framework — see ADR-0009.

Rationale

Next.js on Cloudflare requires the OpenNext adapter, which reintroduces exactly the friction that Cloudflare’s agent tooling was supposed to remove.

Critically, a standalone API is needed for the Expo mobile client regardless. That means Next.js would be doing double duty that isn’t needed — its API-route half is redundant from day one.

Consequences

  • Dropping Next.js removes a layer rather than adding one. Astro or a Vite SPA sits on Cloudflare’s happy path with no adapter.
  • Web and mobile both consume the same Hono API, which forces the shared-schema discipline in packages/shared — a benefit, not a cost.

Alternatives considered

Next.js + OpenNext on Cloudflare. Rejected: adapter friction for a framework whose main advantage (colocated API routes) is unusable here.