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 any cloud.

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.

Deploy Anywhere

Cloudflare-first with D1, KV, R2, and Workers AI. Runtime adapters for AWS, GCP, Azure, DigitalOcean, and Docker. Your code stays the same.

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.

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.

Deploy Anywhere

Your code stays the same — only the adapter changes. Cloudflare-first with native bindings, plus runtime adapters for every major cloud.

Cloudflare D1 + KV + R2 + Workers AI
AWS Lambda + Fargate
Google Cloud Cloud Run + Functions
Azure Functions + Container Apps
DigitalOcean App Platform
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.