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.Documentation Index
Fetch the complete documentation index at: https://fabricate.build/docs/llms.txt
Use this file to discover all available pages before exploring further.
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
Example
- Add a
commentstable to your D1 schema - Create a migration to add the table
- Add API routes to create, read, and delete comments
- 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
Can I see my database data?
Can I see my database data?
You can view and query your D1 database through the Cloudflare dashboard. Your data is stored securely on Cloudflare’s infrastructure.
Can I import existing data?
Can I import existing data?
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.
What happens to my data if I switch plans?
What happens to my data if I switch plans?
Your data persists regardless of plan changes. It’s stored on Cloudflare’s infrastructure and is not affected by your Fabricate subscription.
Can I add indexes for performance?
Can I add indexes for performance?
Yes. Ask Fabricate to add database indexes: “Add an index on the projects table for user_id to speed up user project queries.”