Data Brain
Structured data as a service -- the database equivalent of Storage Brain. Data Brain wraps the full DatabaseAdapter interface (43 methods) in an HTTP API backed by Cloudflare D1, with a TypeScript SDK for client-side use.
Features
- Full DatabaseAdapter Coverage -- 43 methods exposed over HTTP (tables, columns, rows, views, relations, select options, file references)
- Multi-Tenant -- API key isolation with per-tenant quota and workspace scoping
- Cloudflare D1 Backend -- Edge-first, SQLite-based storage with minimal latency
- TypeScript SDK -- Full type safety with automatic retry and typed errors
- Drop-In Adapter -- Use as a
DatabaseAdapterfor@marlinjai/data-table-react
Architecture
Data Brain uses a three-layer design:
- SDK -- TypeScript client with retry logic, typed errors, and full method coverage
- API -- Hono-based Cloudflare Worker with auth, ownership verification, and Zod validation
- Storage -- Cloudflare D1 via
@marlinjai/data-table-adapter-d1
Quick Links
- Quick Start -- Get started with Data Brain
- SDK Guide -- TypeScript SDK usage and reference
- API Reference -- Full endpoint documentation
- Architecture -- System design and data flow