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
useQueryanduseMutationdirectly with cRPC options - Incremental adoption - Add features as you need them, migrate function by function
What's Included
| Export | Description | Depends on |
|---|---|---|
kitcn (CLI) | Codegen, kitcn dev | — |
kitcn/server | cRPC builder, middleware, server caller | — |
kitcn/orm | Drizzle-style ORM schema and query helpers | — |
kitcn/react | React client, providers, auth hooks | server |
kitcn/rsc | RSC prefetching, hydration | server, react, next |
kitcn/auth | Better Auth adapter | — |
kitcn/auth/client | Better Auth client plugins | react |
kitcn/auth/config | Convex auth config provider | auth |
kitcn/auth/http | Auth HTTP helpers | auth |
kitcn/auth/nextjs | Better Auth Next.js adapter | server, next |
kitcn/auth/start | Better Auth TanStack Start adapter | auth |
kitcn/ratelimit | Rate limiting plugin | orm |
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 kitcnThen 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.