Vite + React SPA + Hono (Edge API)
Architecture guidelines for zero-server-lag single-page apps built with Vite and React, backed by a Hono API on Cloudflare Workers.
- Formats
- 4 files
- AGENTS.md
- 37 lines
- CLAUDE.md
- 15 lines
- Languages
- TypeScript
- Updated
- Sep 2026
- Used by
- 4 projects
Writes .claude/skills/vite-react-hono-edge/SKILL.md
$ curl -s --create-dirs -o .claude/skills/vite-react-hono-edge/SKILL.md https://stackitfast.com/rules/vite-react-hono-edge/SKILL.mdRule files
Works with Cursor · Claude Code · Windsurf · AGY
Architecture notes
Architecture Overview
Standardized production guidelines for Vite, React (as a pure SPA), and Hono running on Cloudflare Workers — a minimal-latency pattern for behind-login developer tools and internal dashboards where SEO and SSR add no value.
Verified Real-World Adoption
Hoppscotch, an open-source API testing client, follows this class of architecture: a fast client-rendered app paired with a lightweight edge-deployable API layer, prioritizing instant load and zero server-side rendering overhead.
Key Architectural Nuances
- Type Sharing Without Codegen: Hono’s RPC client imports the API’s route types directly into the frontend, eliminating the OpenAPI-generation step that most REST-based type-sharing setups require.
- SSR Is a Deliberate Non-Goal: Skipping server rendering entirely is correct here specifically because the target audience is always authenticated, removing the SEO/first-paint arguments that justify SSR elsewhere in this catalog.
Frequently asked questions
Does this AGENTS.md work with Cursor, Claude Code, and Windsurf?
Yes — AGENTS.md is the open, cross-tool standard read by Cursor, Claude Code, Windsurf, and 30+ other agents. A dedicated .mdc file is also included for Cursor's native .cursor/rules format.
Why a pure client-side SPA instead of Next.js or Astro?
For tools that live entirely behind a login screen (internal dashboards, developer utilities), SSR and SEO add deployment complexity without a corresponding benefit -- there's no public page to rank in search, and every user is already authenticated before seeing content. A Vite SPA statically hosted on Cloudflare Pages, backed by a Hono API, minimizes both build complexity and time-to-interactive for this specific use case.
What does Hono's RPC client actually save over a typical REST client?
Normally, keeping a frontend's request/response types in sync with a backend API requires either hand-maintaining duplicate types or running an OpenAPI codegen step. Hono's `hc<AppType>()` imports the server's route types directly, so the frontend client is fully typed and a backend shape change becomes a compile error on the client immediately -- no codegen, no schema file, no drift.
Used in production
Explore all stacksOrca
1Agent CLIs stay the user's own. Orca adds the orchestration layer around them: isolated git worktrees, a PTY daemon that outlives the UI, and a relay for mobile steering. It can support new agents without bundling them.
MindsHub (formerly MindsDB)
1Splitting the client, API and agent into separately versioned git submodules lets each ship on its own cadence (a signed desktop app, a PyPI server package, an agent package), while one Makefile and one docker-compose.yml still bring the whole stack up together.
Excalidraw
1A client-only canvas editor kept free of backend dependencies so it can be embedded anywhere; sharing, live collaboration and persistence are layered on in the app shell with Firebase and a Socket.IO relay.
crates.io
crates.io runs one pinned-dependency Rust binary as migrate, web and worker processes, splits domains into small internal crates, and generates its TypeScript client from OpenAPI types so the SvelteKit frontend and Axum API share one contract.