cloudwerk-handlers
Cloudwerk Handlers
Handler, middleware, and component patterns for Cloudwerk applications. Covers the signature conventions for route handlers, middleware, and page/layout components, plus how to use Cloudflare bindings and response helpers.
When to Apply
Reference these guidelines when:
- Writing API route handlers (GET, POST, PUT, DELETE)
- Creating middleware for authentication, rate limiting, or logging
- Building page or layout components with data loading
- Accessing Cloudflare bindings (D1, KV, R2)
- Using response helpers like
json(),redirect() - Creating client-side interactive components with
'use client'
Rule Categories by Priority
More from squirrelsoft-dev/cloudwerk
cloudwerk-config
Configuration reference for Cloudwerk applications. Use when setting up cloudwerk.config.ts, choosing a renderer, configuring Vite plugins, or setting up path aliases. Triggers on tasks involving project configuration, renderer selection (hono-jsx vs react), Vite configuration, or Tailwind CSS setup.
6cloudwerk-routing
File-based routing conventions for Cloudwerk, a full-stack framework for Cloudflare Workers. Use when creating pages, API routes, layouts, middleware, or error boundaries. Triggers on tasks involving route files (page.tsx, route.ts, layout.tsx, middleware.ts, error.tsx, not-found.tsx), dynamic segments ([id], [...slug]), route groups ((group)), loaders, actions, or data loading patterns.
6cloudwerk-monorepo
Monorepo workflow for the Cloudwerk framework. Use when building, testing, or releasing Cloudwerk packages. Covers pnpm workspace commands, package structure, changeset requirements, and test workflows. Triggers on tasks involving building packages, running tests, creating changesets, or understanding the monorepo structure.
3