Baseflare is an open-source backend framework built for Cloudflare’s developer platform. Define your data model and server functions in TypeScript, deploy to Cloudflare Workers with D1 as the database, and consume a typed API from your frontend — without assembling your own backend stack.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nickruigrok/baseflare/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
Understand what Baseflare is, how it compares to alternatives, and when to use it.
Quickstart
Install Baseflare, define a schema, write your first query and mutation, and call them from curl.
Core Concepts
Learn the document model, function types, and permission system that underpin Baseflare.
API Reference
Full reference for every exported function, type, and validator in
baseflare/values and baseflare/server.Why Baseflare?
Baseflare delivers the developer experience of Convex — typed queries, mutations, and actions with a document database — while running entirely on infrastructure you own. There is no managed control plane, no per-seat pricing, and no single-region limitation.Your Cloudflare Account
Workers, D1, R2, Durable Objects, and Vectorize all deploy to your account. You own the data and the billing relationship.
TypeScript-First
Validators, schema definitions, and function signatures are all TypeScript. The runtime enforces them at every write and return boundary.
Deny-by-Default Permissions
defineRules() gates every read, insert, update, and delete. No access is granted unless you explicitly allow it.Explore the Framework
Schema & Data Model
Define tables and indexes with
defineSchema() and defineTable(). Understand how the document model works on top of D1/SQLite.Validators
Use
v.string(), v.number(), v.object(), v.array(), and more to validate arguments and return values.Queries
Read documents with
query(). Use the fluent query builder to filter, order, paginate, and count results.Mutations
Write documents atomically with
mutation(). Insert, patch, replace, and delete with full schema validation.Actions
Run side effects — external API calls, emails, payments — with
action(). Compose queries and mutations inside actions.Permissions
Gate every database operation with
defineRules(). Rules receive the context and document so you can enforce ownership and roles.Baseflare is early-stage alpha software. The core package — validators, schema, server functions, permissions, the query builder, and the D1 runtime foundation — is implemented. The CLI deploy workflow, generated client SDK, React hooks, auth, real-time subscriptions, scheduler, and storage are in active development.