Skip to content

CruzJS

Open Source Full-Stack Framework

The Full-Stack Framework
TypeScript Has Been Missing

Type-safe APIs, dependency injection, multi-tenant auth, 124+ UI components, and a single CLI — from idea to production on Cloudflare's edge.

Terminal
$ npx create-cruz-app my-app

Why CruzJS?

Stop wiring together a dozen libraries. Get a single coherent stack where every layer — database to UI — is designed to work together.

Type-Safe APIs

End-to-end type safety with tRPC. Define procedures on the server, call from the client — your IDE autocompletes everything. No codegen, no REST boilerplate.

124+ UI Components

Production-grade React library — primitives, forms, data tables, layouts, marketing blocks. Themed with CSS variables, accessible, mobile-responsive.

Multi-Tenant Auth

Sessions, organizations, RBAC (Owner, Admin, Member, Viewer), invitation flows, and audit logging. Every endpoint scoped to the current org.

Ships on Cloudflare

Native D1, KV, R2, Queues, and Workers AI on Cloudflare Workers/Pages. A runtime-adapter layer underpins the multi-cloud roadmap.

DI Container

Inversify-powered dependency injection. @Injectable() classes, @Module() composition, constructor injection. Swap implementations without changing a line.

One CLI

cruz dev starts your server. cruz db generate creates migrations. cruz deploy production ships your app. Scaffold Workers, Workflows, and Queues with cruz new.

Your AI assistant already knows CruzJS

npx @cruzjs/skills init installs a portable knowledge base, command suite, and agent personas — so your coding assistant follows framework patterns out of the box. One source of truth, five tools.

Canonical knowledge base

34 KB docs install to .cruzjs/ as one source of truth — architecture, DI, tRPC, auth, data ownership, deployment.

13 slash commands

Repeatable workflows: /new-feature, /dev, /code-review, /qa, /create-ui-component, and more.

8 agent personas

Architect, developer, code reviewer, QA, and UI/UX designers — each primed with CruzJS conventions.

Works with Claude CodeCursorCodexOpenCodeAntigravity

End-to-End Type Safety

Define a tRPC procedure on the server, call it from the client. Full TypeScript inference — no codegen step, no runtime surprises.

server/routers/tasks.ts Server
export const tasksRouter = router({
  list: orgProcedure
    .query(async ({ ctx }) => {
      return ctx.db
        .select()
        .from(tasks)
        .where(eq(tasks.orgId, ctx.org.id));
    }),

  create: orgProcedure
    .input(z.object({ title: z.string() }))
    .mutation(async ({ ctx, input }) => {
      return ctx.db.insert(tasks)
        .values({ ...input, orgId: ctx.org.id });
    }),
});
routes/tasks.tsx Client
export default function Tasks() {
  const { data: tasks } = trpc.tasks.list.useQuery();

  return (
    <Page title="Tasks">
      <DataTable
        data={tasks}
        columns={[
          { header: "Title", accessorKey: "title" },
          { header: "Status", accessorKey: "status" },
          { header: "Assigned", accessorKey: "assignee" },
        ]}
      />
    </Page>
  );
}

Change the server schema — the client breaks at compile time, not in production.

The Stack

React Router v7

File-based routing, SSR, loaders, actions, streaming, and progressive enhancement.

Drizzle ORM

Type-safe SQL, automatic migrations, Drizzle Studio. D1 in production, SQLite locally.

tRPC

Remote procedure calls with full TypeScript inference. Zero runtime overhead for types.

Inversify

Industrial-strength DI — constructor injection, module composition, singleton and transient scoping.

Ships on Cloudflare

Cloudflare Workers/Pages with native D1, KV, R2, Queues, and Workers AI. The runtime-adapter layer powers a multi-cloud roadmap — other targets are planned.

Cloudflare D1 + KV + R2 + Workers AI
Planned
AWS Lambda + Fargate
Planned
Google Cloud Cloud Run + Functions
Planned
Azure Functions + Container Apps
Planned
DigitalOcean App Platform
Planned
Docker Self-hosted anywhere

Start Building Today

From idea to production in minutes. Follow the tutorial and build a complete SaaS app — or jump straight into the docs.