Skip to content

Latest commit

 

History

History

README.md

kitcn Example

Reference implementation for kitcn.

This app is the source of truth for docs snippets and migration guidance.

Stack

  • Next.js App Router
  • Convex backend
  • kitcn cRPC + ORM
  • Better Auth
  • TanStack Query

Run Locally

  1. Install deps from repo root:
bun install
  1. Configure env files:
cp /Users/zbeyens/GitHub/kitcn/example/.env.example /Users/zbeyens/GitHub/kitcn/example/.env.local
cp /Users/zbeyens/GitHub/kitcn/example/convex/.env.example /Users/zbeyens/GitHub/kitcn/example/convex/.env
  1. Start app + Convex processes:
bun --cwd /Users/zbeyens/GitHub/kitcn/example dev
  1. Open:

Useful Commands

# Typecheck
bun --cwd /Users/zbeyens/GitHub/kitcn/example typecheck

# Lint
bun --cwd /Users/zbeyens/GitHub/kitcn/example lint

# Convex logs
bun --cwd /Users/zbeyens/GitHub/kitcn/example convex:logs

# Reset + seed data
bun --cwd /Users/zbeyens/GitHub/kitcn/example reset
bun --cwd /Users/zbeyens/GitHub/kitcn/example seed

Architecture Map

  • Server schema: /Users/zbeyens/GitHub/kitcn/example/convex/functions/schema.ts
  • ORM context: /Users/zbeyens/GitHub/kitcn/example/convex/lib/orm.ts
  • cRPC builder: /Users/zbeyens/GitHub/kitcn/example/convex/lib/crpc.ts
  • HTTP entrypoint: /Users/zbeyens/GitHub/kitcn/example/convex/functions/http.ts
  • React provider: /Users/zbeyens/GitHub/kitcn/example/src/lib/convex/convex-provider.tsx
  • React cRPC context: /Users/zbeyens/GitHub/kitcn/example/src/lib/convex/crpc.tsx
  • RSC helpers: /Users/zbeyens/GitHub/kitcn/example/src/lib/convex/rsc.tsx

Notes

  • IDs in auth context are plain string in this example.
  • Use ctx.orm and cRPC procedures as the default server pattern.
  • Use TanStack Query useQuery/useMutation with cRPC queryOptions/mutationOptions on client.