Skip to content

Build your nextApp

TypeScript · Cloudflare · Edge-native

Your next product
is already 80% built.

One coherent stack: Auth, OttaORM, RBAC & RLS that fail closed, Queues, Cron, Realtime, a multilingual Blog/CMS, a landing site you edit in the admin, BYOK AI & UI components - wired together for multi-tenant SaaS apps on Cloudflare Workers.Your AI already knows this codebase: 60+ production-ready packages it can pull in with one command, and 14 built-in agent skills that teach it the Ottabase way.An idea on Friday, a product on Monday.

Edge KV·D1 + Drizzle·Durable Objects·MIT

The Facts
You've probably shipped auth five times.The App's queue is two libraries taped together to an external service. Tenancy showed up in month seven. Real-time ate a weekend. You need to re-architect for scale. Ottabase is your answer to all of that. Opinionated, edge-native, and all yours to fork.
60+packages100%typed0servers275+edge PoPs$0to start

Everything your needs.
In Packages.

Open-source monorepo on Cloudflare Workers - not a hosted backend. 63 packages and four apps: otta-web for your product, otta-worker for a single Worker with no SPA, otta-landing for your public site, otta-cache for your builds.

Expressive APIs.
For Humans and Agents alike.

Even 100% AI-generated code stays readable, intentional, and truly yours.

Fields, relationships, and domain logic live in one class. Validation, CRUD APIs, forms, and tables are derived from it - one place defines it all. Inspired by Laravel Eloquent, built from day one for TypeScript and Cloudflare Workers.

import { BaseModel } from '@ottabase/ottaorm';
import { postsTable } from './Post.schema';

export class Post extends BaseModel {
  static entity      = 'posts';
  static table       = postsTable;
  static softDeletes = true;
  static casts       = { publishedAt: 'date', featured: 'boolean' } as const;

  // Drives Zod validation, generated forms, tables, and the API.
  protected static fields = {
    title:  { type: 'string', searchable: true, validation: { rules: 'required' } },
    status: { type: 'string', formConfig: { fieldType: 'select' } },
  };

  // Domain logic on the model - not in a forwarder.
  async publish() {
    this.set('status', 'published');
    this.set('publishedAt', new Date());
    return this.save();
  }

  async author() {
    const { User } = await import('@ottabase/ottaorm');
    return this.belongsTo(User, 'userId');
  }
}

// GET / POST / PATCH / DELETE /api/ottaorm/posts
// ↑ one allowlist entry. Zero extra code.

Edge-first.
Not ported-from.

Ottabase was designed for Cloudflare Workers from day one - not ported from Node.js. Every layer is a first-class Cloudflare primitive, not a wrapper hiding something slower underneath.

D1 for your relational database (SQLite, replicated globally). KV for sub-millisecond RBAC permission checks and session lookups. R2 for file storage with Cloudflare Images processing. Durable Objects for stateful WebSocket pub/sub without a separate Realtime bill. Queues for reliable background jobs. Analytics Engine for high-volume event tracking at the edge.

You own every bit of it - deployed under your own Cloudflare account. Sub-100ms latency to users in 275+ cities worldwide, with no cold starts and pricing that stays predictable as you scale. Not sponsored. Just convinced.

Read the philosophy
Browser / Client
TanStack Router + Vite + React 19
type-safe TanStack Query hooks
Cloudflare Workers
275+ locations · zero cold starts · Auth + RBAC + RLS
OttaORM fat models · auto-CRUD API
OttaORM
fields · relationships · domain logic · migrations
Drizzle ORM · D1 driver · typed queries
Cloudflare D1
SQLite · globally replicated · 5 GB free
KV
RBAC cache
R2
Files
DO
Realtime
Queues
Jobs

Secure by default

Every gate fails closed.

Tenant leaks rarely come from the code you wrote. They come from the check you forgot. In Ottabase, a forgotten check is a denial - not a leak.

7 defaults 0 flags

RLS + RBAC
  1. 403POST /api/ottaorm/user_rolesCRUD is an allowlist
  2. 403GET /api/ottaorm/posts x-org-id: theirsOrg header vs. your memberships
  3. DENYctx.memberOrganizationIds = undefinedUnresolved is never unscoped
  4. IGNOREDrole: "owner"Permission + scope, not names
  5. 429POST /__bootstrap__/api/init ×20Secret guesses throttled
  6. DROPPEDGET /api/auth/callback/googleProvider tokens never stored
  7. OPAQUEthrow new Error(stack, policy, ctx)Clients get a generic error

From an empty folder to going live.

Clone, env, dev servers, then a built-in bootstrap wizard on first open - no mystery init route. Under five minutes to a logged-in tenant app.

  1. Clone & install - git clone + pnpm install + pnpm build:pkg - shared packages must compile before first dev.
  2. Env secrets - pnpm env:secrets writes apps/otta-web/.env.local with every local secret generated. Safe to re-run; it never overwrites a value you set.
  3. Setup Cloudflare - pnpm cf:setup when you want real D1/KV/R2/Queues bindings. For a local spin, Wrangler --local needs nothing more.
  4. pnpm dev - Vite on 3003, Wrangler on 3004; it waits for both before opening the browser. pnpm otta start <app> runs any other app.
  5. Bootstrap wizard - First visit to localhost:3003 redirects to /__bootstrap__: migrations, RBAC seed, owner account, finalize via a GUI wizard.
  6. Deploy - git push - CI lints, type-checks, tests, and deploys. First production boot runs the same wizard once; later schema tweaks use Admin → Migrate.

Ottabase Pro

When the side project becomes the business.

Everything above is complete and stays MIT. Pro is the eleven packages a company running on it needs next: see every app on one board, charge your users, catch every error, tell customers what is going on, open the database from the admin. Source, in a private repository you clone into your monorepo. No license keys, nothing gated.

See what is in the box Starts from $149 for Solo Founders.

Nothing already open source ever moves behind the paywall. That's a promise →

Own 100% of the stack.
Stop Rebuilding.
Start Shipping!

Open sourced under the MIT License.

v1.13.0 · github.com/ottabase/ottabase