How Cleverbrush compares to popular TypeScript frameworks. We aim to be precise — where competitors are ahead, we say so.
| Feature | Cleverbrush | tRPC | ts-rest | Hono |
|---|---|---|---|---|
| API style | REST (contract-first) | RPC only | REST (contract-first) | REST (server-first) |
| Typed client | Zero codegen, Proxy-based | Yes | Yes | hc helper |
| Exhaustive handler mapping | mapHandlers() compile error | No | Yes (Express/Fastify) | No |
| OpenAPI generation | Full 3.1 (links, callbacks, webhooks) | @trpc/openapi (alpha) | @ts-rest/open-api | @hono/zod-openapi |
| Client retry & timeout | Built-in with backoff + jitter | Via TanStack Query | DIY | No client-side |
| Client dedup & batching | Both built-in | Batching via httpBatchLink | No | No |
| Client caching | Built-in TTL cache | Via TanStack Query | No | No |
| Auth | JWT, cookies, OAuth2, OIDC, RBAC | Context pattern | DIY | Basic/Bearer/JWT middleware |
| Dependency injection | Schema-as-key, .NET-style | No | No | No |
| WebSocket subscriptions | Typed, bidirectional, reconnect | Yes, with tracked events | No | Via WebSocket Helper |
| Schema-driven forms | @cleverbrush/react-form | No | No | No |
| Multi-runtime | Node.js | Node.js, Bun, Deno, CF Workers | Node.js (adapters) | All major runtimes |
| Schema library | @cleverbrush/schema (own) | Any (Zod, Valibot, etc.) | Zod, Valibot, ArkType | Zod (via @hono/zod-openapi) |
extern()).// contract.ts — shared between server and client
const api = defineApi({
users: {
create: endpoint.post('/api/users')
.body(CreateUserBody)
.returns(User)
}
});
// server.ts — exhaustive handler mapping
mapHandlers(server, api, {
users: {
create: async ({ body }) => db.users.insert(body)
}
});
// client.ts — zero codegen
const client = createClient(api, { baseUrl });
const user = await client.users.create({ body: { name: 'Alice' } });// server.ts — define procedures inline
const appRouter = router({
createUser: publicProcedure
.input(z.object({ name: z.string() }))
.mutation(async ({ input }) => db.users.insert(input))
});
type AppRouter = typeof appRouter;
// client.ts — needs the server type
const trpc = createTRPCClient<AppRouter>({ links: [...] });
const user = await trpc.createUser.mutate({ name: 'Alice' });ts-rest is the closest competitor architecturally — both use contract-first REST with typed clients.
Hono is a lightweight, multi-runtime web framework. Different philosophy — Hono is server-first and runtime-flexible; Cleverbrush is schema-first and full-stack.
hc client infers types from typeof app which can cause IDE performance issues in large apps.hc is a minimal fetch wrapper.@cleverbrush/schema is the foundation. For detailed benchmarks, bundle size comparisons, and feature matrix vs Zod, Valibot, ArkType, and TypeBox, see the dedicated schema site:
@cleverbrush/schema. The extern() wrapper allows using Zod/Valibot schemas inside Cleverbrush schemas for incremental adoption.