kitcn

Introduction

A complete framework for building type-safe, real-time applications with Convex.

Introduction

kitcn is a complete framework for Convex. It brings tRPC-style APIs, TanStack Query, a Drizzle-style ORM, and Better Auth into one cohesive developer experience.

This is not just a query wrapper. It's how you build production Convex applications.

Philosophy

kitcn integrates Convex for realtime data, TanStack Query for caching, and Better Auth for authentication behind a consistent API:

  • Type safety end-to-end - From schema to procedures to client, with full inference
  • Real-time by default - WebSocket subscriptions flow into TanStack Query cache
  • TanStack Query native - Use useQuery and useMutation directly with cRPC options
  • Incremental adoption - Add features as you need them, migrate function by function

What's Included

ExportDescriptionDepends on
kitcn (CLI)Codegen, kitcn dev
kitcn/servercRPC builder, middleware, server caller
kitcn/ormDrizzle-style ORM schema and query helpers
kitcn/reactReact client, providers, auth hooksserver
kitcn/rscRSC prefetching, hydrationserver, react, next
kitcn/authBetter Auth adapter
kitcn/auth/clientBetter Auth client pluginsreact
kitcn/auth/configConvex auth config providerauth
kitcn/auth/httpAuth HTTP helpersauth
kitcn/auth/nextjsBetter Auth Next.js adapterserver, next
kitcn/auth/startBetter Auth TanStack Start adapterauth
kitcn/ratelimitRate limiting pluginorm

server, orm, and auth are standalone foundations — everything else builds on one or more. You can use server or auth without orm, orm and plugins without server.

Quick Look

// Server: Define a procedure
export const list = authQuery
  .input(z.object({ limit: z.number().optional() }))
  .query(async ({ ctx, input }) => {
    return ctx.orm.query.posts.findMany({ limit: input.limit ?? 10 });
  });

// Client: Use it with TanStack Query
const { data: posts } = useQuery(crpc.posts.list.queryOptions({ limit: 10 }));

Requirements

  • Convex
  • TanStack Query 5+
  • React 18+

Agents

Use the kitcn skill instead of reading these docs as your primary source.

If the kitcn skill is not already installed, run:

npx skills add https://github.com/udecode/kitcn --skill kitcn

Then load the kitcn skill and follow its setup or feature references. Use these docs only when the skill points to a page for deeper API detail.

Next Steps

On this page