# Rocketflare > An open-source, MIT-licensed starter kit for building a multi-tenant B2B SaaS > product or internal tool on Cloudflare Workers. It ships tenancy, authentication, > roles and permissions, background jobs, realtime, file storage, analytics > dashboards, an AI agent layer and a CLI as a single Worker over Postgres — and it > is written to be worked on by coding agents. Stack: Cloudflare Workers (fetch + queue + scheduled, a Durable Object and a Workflow), Hono 4, zod contracts, CASL, Postgres 17 + pgvector through Hyperdrive, Drizzle over postgres.js, React 18 + Vite, drizzle-cube for analytics, a commander CLI. Node 24, pnpm 10. Getting started: clone the repository and run "bash scripts/bootstrap.sh" (macOS or Linux, Docker running) — it checks the toolchain, starts Postgres, migrates, seeds a demo workspace and opens the browser signed in; or open the folder in Claude Code and type /setup (the repository ships /setup, /preflight, /adapt and /provision as skills). Local development needs a free Cloudflare login only because the Workers AI binding always calls out (--offline turns it off); deploying needs Workers Paid for Hyperdrive and Workflows and is scripted by "pnpm provision". ## Pages - [Home](https://rocketflare.dev/): A ready-made multi-tenant web app you copy and make your own — sign-in, teams, an AI assistant over your documents, dashboards and background jobs on one Cloudflare Worker. Running on your laptop in about two minutes. - [Tour](https://rocketflare.dev/tour/): What you get on the first run, screen by screen: sign-in, people and roles, AI settings, chat, agents, knowledge and search, analytics, usage, the admin area and the CLI. - [Get started](https://rocketflare.dev/get-started/): From git clone to a running app you are signed in to — ask your coding agent, run one script, or do it by hand — then deploy it with three accounts and one command. - [Who it's for](https://rocketflare.dev/who-is-it-for/): Three things you would build on it — an internal operations tool, a customer portal with AI over documents, an analytics-heavy B2B product — what is already done for each, and when to pick something else. - [Concepts](https://rocketflare.dev/concepts/): One page per subsystem: what it does, the invariant it protects, and the decision behind it. ## Concepts - [Agent-first by design](https://rocketflare.dev/concepts/agent-first/): Built to be worked on by a coding agent: the rules, the per-directory guides and the test gate are the interface it reads and the check it cannot skip. - [Tenancy and access](https://rocketflare.dev/concepts/tenancy/): Every row belongs to an organisation, and one schema serves a single tenant or a thousand — changing modes needs no migration. - [Authentication](https://rocketflare.dev/concepts/auth/): Sign in with nothing configured: magic links, Google or Microsoft, and API keys, all over sessions stored as database rows. - [The API shell](https://rocketflare.dev/concepts/api/): One Worker runs one Hono app with one validated config, and every middleware sits where it does for a stated reason. - [Database](https://rocketflare.dev/concepts/database/): Postgres through one driver and one client per request, with row-level security already wired and waiting to be switched on. - [Background work and realtime](https://rocketflare.dev/concepts/background-work/): Long work never runs inside a request — it goes to a queue or a durable workflow, and the WebSocket only tells the browser to look again. - [Email and file storage](https://rocketflare.dev/concepts/email-and-files/): Mail that logs instead of failing when no provider is set, and file storage on R2 behind a small interface with a table in front of it. - [The UI shell](https://rocketflare.dev/concepts/ui/): A React shell with design tokens instead of colours, one guard for pages and navigation alike, and a data layer that never shadows the server. - [Analytics and dashboards](https://rocketflare.dev/concepts/analytics/): Dashboards over a semantic layer that scopes every query to the tenant, fact tables rebuilt hourly, and templates kept as code. - [The AI layer](https://rocketflare.dev/concepts/ai/): Chat, agents and search behind one resolver that picks the model — and it works on a fresh clone with no key at all. - [Deployment](https://rocketflare.dev/concepts/deployment/): Staging and production as two wrangler files a test keeps identical, and a release you ship by pushing a tag. - [The CLI](https://rocketflare.dev/concepts/cli/): A browser sign-in that ends with a tenant API key on your machine, and commands that parse the server’s own schemas. - [Shared contracts](https://rocketflare.dev/concepts/contracts/): One zod package the API validates with and the UI and CLI parse with — no build step, so the three can never drift. ## Source - [Repository](https://github.com/rocketflare-dev/rocketflare): the kit itself, MIT licensed - [docs/CONCEPTS.md](https://github.com/rocketflare-dev/rocketflare/blob/main/docs/CONCEPTS.md): the full subsystem reference - [SETUP.md](https://github.com/rocketflare-dev/rocketflare/blob/main/SETUP.md): the step-by-step setup walkthrough - [docs/DEPLOY.md](https://github.com/rocketflare-dev/rocketflare/blob/main/docs/DEPLOY.md): the Cloudflare topology reference - [docs/ADAPTING.md](https://github.com/rocketflare-dev/rocketflare/blob/main/docs/ADAPTING.md): the rename checklist for a fresh copy