Skip to content
Putting technology to work.
Insights to guide decisions and action.

Search articles

Fastest Way to Build Fully Type-Safe SPAs with Hono × Inertia.js × React — Contract MVP 2026

Table of contents · 7 items

At the end of April 2026, Hono officially released its Inertia.js adapter, and an article titled "A New SPA Experience with Hono × Inertia × React" quickly climbed the Zenn Trending charts. Inertia.js is a technology widely embraced in the Laravel community that enables building SPAs without writing REST or GraphQL APIs, moving beyond traditional architectures like React/Vue on the front end and Rails/Laravel on the backend.

Bringing this to Hono creates a lean stack tailored for custom MVPs: an edge-ready server, API-free architecture via Inertia, and end-to-end type safety powered by TypeScript. This article outlines key criteria and setup procedures for adopting Hono, Inertia, and React in client projects.

Three major challenges in custom MVPs solved by Hono and Inertia.js

Whether building an MVP for a startup or an internal management dashboard in custom development, teams run into the same three roadblocks every time:

ChallengePain point in traditional architecturesSolution with Hono and Inertia
API design consumes excessive time1 to 2 weeks spent writing OpenAPI or GraphQL schemasNo need to write APIs. Return props directly from controllers.
Type definitions drift between frontend and backendOperational burden from manual syncing or code generationType inference passes through seamlessly from the same TypeScript code.
Combining authentication, routing, and SSR is burdensomeRequires separate, complex configurations in frameworks like Next.jsKept lightweight using Hono middleware and Inertia's page concept

In particular, losing time to API design is fatal during PoC and PMF validation phases. When a project allows only 4 weeks before user testing, losing a full week to API design leaves only 3 weeks to iterate on UI and validation. Inertia adopts a simple mental model where returning a page equals returning props, directly linking server-side controller functions to frontend prop types.

Inside the Inertia adapter: What it handles and what it leaves to you

Hono's Inertia adapter primarily handles the following three responsibilities:

  1. Initial HTML response: Returns HTML embedding page component names, props, and shared data according to Inertia conventions.
  2. XHR detection: Automates response switching, returning JSON if the X-Inertia header is present and HTML otherwise.
  3. Sharing CSRF tokens, flash messages, and validation errors: Bridges data from Hono's context to Inertia's share properties.

Conversely, what it does not handle is the build pipeline; configuring SSR/CSR switching for Vite and React must be set up separately. Combining Hono's SSR helpers or Vite SSR is a practical solution, and leveraging @hono/vite-dev-server preserves an excellent developer experience.

Minimal sample configuration: Hono + Inertia + React + Vite

The minimal directory structure looks like this:

src/
  server/
    index.ts          // Hono エントリ
    routes/
      dashboard.ts    // Inertia.render('Dashboard', { stats })
  client/
    pages/
      Dashboard.tsx   // export default function Dashboard({ stats }: Props)
    main.tsx          // createInertiaApp
  shared/
    types.ts          // 両側で参照する型

The server-side controller is simply this:

// src/server/routes/dashboard.ts
import { Hono } from 'hono';
import { inertia } from '@hono/inertia';

const app = new Hono();

app.get('/dashboard', async (c) => {
  const stats = await c.env.DB.prepare(
    'SELECT COUNT(*) AS users FROM users'
  ).first<{ users: number }>();

  return inertia(c, 'Dashboard', { stats });
});

export default app;

And the frontend page is just this:

// src/client/pages/Dashboard.tsx
type Props = { stats: { users: number } };

export default function Dashboard({ stats }: Props) {
  return <p>登録ユーザー: {stats.users.toLocaleString()} 人</p>;
}

The essential benefit is that types defined in stats flow end-to-end from the controller to the screen component. Neither OpenAPI schemas nor tRPC setups are required.

Decision criteria for client projects (comparison with Next.js and Astro)

When considering this stack for custom development, clients often ask why Next.js isn't used instead, so organizing the comparison in a table makes proposals much smoother.

DimensionHono × Inertia × ReactNext.js (App Router)Astro + React Islands
Core strengthsAdmin panels and SaaS SPAsLarge-scale web applicationsContent websites
API layerNot required (direct controller binding)Route Handlers / Server ActionsAdditional fee
Edge execution◎(Cloudflare Workers/Bun)
Learning curveLow (fewer conventions)Medium to highLow
MVP startup velocityFair (redundant for SPA purposes)
Scalability for large teams

The sweet spot for Hono and Inertia is SPAs with 2 to 10 screens, at the PoC to PMF stage, built by 1 to 3 engineers. Beyond this scale, custom routing and state management become more prevalent, making a planned migration to Next.js a safer path.

To take full advantage of edge execution, use the architecture outlined in our Edge API guide for Hono and Cloudflare Workers as a baseline, choosing between D1, Hyperdrive, or external PostgreSQL for the database. For projects better suited to SSG rather than SPAs, such as corporate websites, refreshing corporate sites with TanStack Start RSC may be a more appropriate choice, so align your stack with project requirements.

Step-by-step guide to integrating authentication, authorization, and validation

When building an MVP in custom development, you should have at least these components ready during the first week:

  1. Authentication: Sessions based on Hono's bearerAuth or Lucia. Supply auth.user across all pages via Inertia's share.
  2. Authorization: Perform checks in controllers after executing c.set('user', user) in middleware; redirect to 403 and an Inertia error page if unauthorized.
  3. Validation: Validate inputs using Zod; pass the errors object to Inertia upon failure.
  4. CSRF: Combine @hono/csrf with Inertia conventions.

Under Inertia conventions, validation errors are handled standardly via "redirect + shared errors in flash storage," which the frontend consumes and renders using usePage().props.errors. This cuts form-handling code by more than half.

Where to redirect the design time you save

The business advantage of adopting Hono and Inertia is redirecting the time saved by eliminating API design into extra user testing cycles and refining the UI design. Clients appreciate obtaining a codebase from the PoC that can transition directly into production; framing this in proposals as saving design hours to increase validation iterations communicates clear value.

Summary: Enjoying end-to-end type safety right from the MVP stage

Hono, Inertia, and React form a crisp combination tailored for custom MVP development: building SPAs without dedicated APIs, running on the edge, and maintaining end-to-end type safety. In scenarios where Next.js feels too heavy due to its all-in-one nature, this stack is poised to see increased adoption throughout 2026 as a lean, rapid-launch alternative.

At our company, we choose among Hono, Astro, Next.js, and TanStack Start depending on project requirements. However, whether this architecture is effective hinges heavily on whether screen volume fits the 2-to-10 screen target, the complexity of roles and permissions, whether D1 suffices or external PostgreSQL is required, and whether the build is a throwaway PoC or intended to expand into full production. Even within the shared goal of building an MVP, answers to these four questions dictate completely different architectures and schedules, making an early consultation to map out the stack the fastest path forward.

Even if you are at the stage of needing an investor demo within four weeks or looking to lay a foundation in a PoC that scales to production, simply submit your expected screen count, user profiles, and demo deadline via our inquiry form, and we will advise whether to start lean with Hono and Inertia or choose Next.js from the outset. If you are concurrently planning to connect internal data to AI agents, we have compiled the relevant architecture considerations in our practical guide to building internal MCP servers.

Share this articleXFacebook
Kakeru Suzuki

Fascinated by the possibilities of technology, has had a deep interest in programming and digital art since student days

Turn this article's theme into your company's next step

Concrete steps forward for your organization.

We organize your desired architecture, legacy systems, and operational requirements to formulate your next steps toward execution.

  • Desired architecture
  • Integration with existing environments
  • Operational requirements
Consult on development & operations initiatives

You can consult with us from the initial conceptual stage. Details from this article will be carried over to the inquiry form.

Receive the latest articles by email