Build your nextApp

TypeScript · Cloudflare · Edge-native

Your co-founder isthis monorepo. & AI.

One coherent stack: Auth, OttaORM, Queues, Cron, Realtime, Blog/CMS, RBAC, RLS & UI components wired together for multi-tenant SaaS apps on Cloudflare Workers.An idea on Friday, a product on Monday: ottabase+AI makes it a ✨magical reality.

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.
45+packages100%typed0servers275+edge PoPs$0to start

Everything your needs.
In Packages.

Open-source monorepo on Cloudflare Workers - not a hosted backend. Fat models, RBAC, RLS, queues, realtime, and blog/CMS when you enable them.

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. CRUD APIs, forms, and tables are derived from it - one place defines it all. Inspired by Laravel Eloquent, extended for fat-models, and designed from day one for TypeScript and Cloudflare Workers.

import { BaseModel } from '@ottabase/ottaorm';

export class Post extends BaseModel {
  static entity      = 'posts';
  static softDeletes = true;

  // Drives auto-generated forms, tables, and API.
  static fields = {
    title:    { type: 'text',       required: true },
    status:   { type: 'select',     options: ['draft', 'published'] },
    authorId: { type: 'belongs-to', model: 'users' },
  };

  static casts = { publishedAt: 'date', featured: 'boolean' };

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

  author()   { return this.belongsTo(() => import('./User'),    'authorId'); }
  comments() { return this.hasMany  (() => import('./Comment'), 'postId');   }
}

// GET / POST / PATCH / DELETE /api/ottaorm/posts
// ↑ 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 · 3 GB free
KV
RBAC cache
R2
Files
DO
Realtime
Queues
Jobs

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 - Copy apps/ottabase-template-app-tanstack/.env.example to .env.local; set three required secrets.
  3. Setup Cloudflare - pnpm cf:setup when you want real D1/KV/R2/Queues bindings; for a quick local spin a dummy CLOUDFLARE_API_TOKEN is enough with wrangler --local.
  4. pnpm dev - Runs Vite on 3003, Wrangler on 3004.
  5. Bootstrap wizard - First visit to localhost:3003 redirects to /__bootstrap__: migrations, RBAC seed, owner account, finalize via a GUI wizard.
  6. Deploy - wrangler deploy - first production boot uses the same wizard or API sequence once; later schema tweaks use Admin → Migrate from the UI.

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

Open sourced under the MIT License.

v1.0.0 · github.com/thinkdj/ottabase