Skip to main content
Every Fabricate app comes with a Cloudflare D1 database. D1 is built on SQLite, globally distributed on Cloudflare’s edge network, and requires zero configuration from you.

How It Works

When you build an app with Fabricate, the AI automatically:
  • Designs your database schema based on what your app needs
  • Generates migrations to create and modify tables
  • Writes database queries in your API routes
  • Updates the schema when you add new features that need new tables or columns
You don’t write SQL. You describe what you need and the AI handles the database.

Example

Fabricate will:
  1. Add a comments table to your D1 schema
  2. Create a migration to add the table
  3. Add API routes to create, read, and delete comments
  4. Update the frontend to display comments on blog posts

Schema Example

A typical Fabricate app database might look like:

Data Access

D1 data is accessed from your Hono.js API routes using the D1 binding. Fabricate generates these routes for you. Example:

Limitations

D1 is SQLite-based. It’s great for most web apps, but if you need advanced PostgreSQL features (like complex JSON operations, full-text search, or very high write throughput), consider using an external database and syncing via GitHub.

Frequently Asked Questions

You can view and query your D1 database through the Cloudflare dashboard. Your data is stored securely on Cloudflare’s infrastructure.
Yes. Tell Fabricate you want to seed your database with initial data, or describe the data import you need — it will generate a migration or seeding script.
Your data persists regardless of plan changes. It’s stored on Cloudflare’s infrastructure and is not affected by your Fabricate subscription.
Yes. Ask Fabricate to add database indexes: “Add an index on the projects table for user_id to speed up user project queries.”