Your First Cruz App
import { Steps, Aside } from ‘@astrojs/starlight/components’;
This tutorial walks you through building a complete to-do list app with CruzJS, from scratch to a live Cloudflare Pages deployment.
By the end you will have:
- A working app with user authentication (sign up, log in, log out)
- A to-do list per user (create, complete, delete tasks)
- A deployed production app on Cloudflare Pages + D1
The app is intentionally simple so the focus stays on the framework patterns, not the product logic. Every pattern you learn here applies directly to real-world features.
What You Will Build
Section titled “What You Will Build”A to-do list where each authenticated user manages their own private tasks:
- Sign up / Log in — handled by CruzJS’s built-in auth
GET /api/todos— list your tasks (tRPC + REST)POST /api/todos— create a taskPATCH /api/todos/:id— toggle complete / update titleDELETE /api/todos/:id— delete a task- A React page at
/todosshowing the list with add/complete/delete UI
The Full Stack
Section titled “The Full Stack”| Layer | Technology |
|---|---|
| Runtime | Cloudflare Workers (edge, global) |
| Framework | CruzJS + React Router v7 |
| Database | Cloudflare D1 (SQLite at the edge) |
| ORM | Drizzle |
| API | tRPC (type-safe) + REST |
| Auth | CruzJS built-in (session-based) |
| UI | React + Tailwind CSS |
| DI | Inversify |
Tutorial Sections
Section titled “Tutorial Sections”Prerequisites
Section titled “Prerequisites”Before starting, make sure you have:
- Node.js 20+
- A Cloudflare account (free — you will need it for Step 5)
- Basic familiarity with TypeScript and React
No prior CruzJS experience is needed.
Ready? Start with project setup →