Skip to content

kamath/template

Repository files navigation

TanStack Start + Hono Turborepo

This template is a PNPM/Turbo monorepo with separate apps:

  • apps/frontend: TanStack Start React app
  • apps/server: standalone Hono API for Cloudflare Workers

The frontend uses TanStack server functions for app-owned reads and mutations. The Hono API is no longer bundled or proxied through the frontend Vite config; it exposes one query endpoint, /api/stats, that the frontend reads with Hono RPC and React Query. In local development, pnpm dev runs both apps through portless with HTTPS enabled:

  • https://frontend.localhost
  • https://server.localhost

On non-main branches, the branch slug is prepended to both hostnames, for example https://my-branch.frontend.localhost. The frontend points to the matching server URL automatically unless VITE_API_BASE_URL is set.

Commands

pnpm dev
pnpm build
pnpm typecheck
pnpm lint
pnpm fmt
pnpm deploy

Regenerate Worker environment types after changing either app's wrangler.jsonc:

pnpm cf-typegen

About

Simple Cloudflare-compatible Hono API plus React frontend, useful for utilizing Hono API, hono-rpc, and also some pre-built developer experience tools like Biome and React Query.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors