Catmint Framework

A strongly-typed, full-stack React framework built on Vite. Catmint provides file-based routing, React Server Components, server functions, middleware, layouts, caching, and deployment adapters — all with first-class TypeScript support.

Features

  • File-based routing with dynamic segments, catch-all routes, and route groups
  • React Server Components with streaming SSR and client hydration
  • Server functions via createServerFn with automatic client-side fetch compilation
  • Middleware with onion-model execution and inherit: false boundaries
  • Layouts that persist across sibling navigation with nested layout chains
  • Caching with cachedRoute, staticRoute, and cache invalidation
  • API endpoints with HTTP method handlers and typed parameters
  • Environment variables with build-time enforcement of server/client boundaries
  • Head & metadata via <Head> component and generateMetadata export
  • Error handling with ErrorBoundary, status pages, and statusResponse()
  • Forms with progressive enhancement and CSRF protection
  • Internationalization with locale detection and routing strategies
  • Telemetry via OpenTelemetry with trace() and structured logging
  • Security with CSP generation, nonce injection, and CSRF tokens
  • Testing utilities for pages, server functions, endpoints, and middleware
  • Deployment adapters for Node.js, Vercel, and Cloudflare Workers

Quick Start

# Create a new project
pnpm create catmint my-app

# Navigate to project
cd my-app

# Start development server
pnpm dev

Modes

ModeDescriptionOutput
fullstackPages + API endpoints + server functionsServer bundle + client assets
frontendStatic pages only, no server runtimeStatic HTML/JS/CSS
backendAPI endpoints only, no page renderingServer bundle only

Get started with the installation guide →