Generate SaaS Database Schema
briefkit_generate_database_schemaGenerate a complete, production-ready database schema for your SaaS product. Includes tables, foreign keys, indexes, and security baseline for immediate use in Supabase SQL editor.
Instructions
Generate a complete Supabase/PostgreSQL database schema for a SaaS product — tables with column types, foreign keys, indexes, and a security baseline. Ready to run in Supabase SQL editor.
Args:
product_name (string): Name of the SaaS product
saas_type (string): Type of SaaS — b2b, devtool, productivity, marketplace, or microsaas
custom_tables (array of strings): Additional product-specific table names beyond the standard ones
Returns: Complete SQL schema with CREATE TABLE statements, indexes, and security baseline (REVOKE statements for sensitive tables).
Examples:
"Generate schema for an inventory SaaS called StockFlow" -> saas_type="b2b", custom_tables=["products", "inventory", "suppliers"]
"Schema for a micro-SaaS invoice generator" -> saas_type="microsaas", custom_tables=["invoices", "clients", "line_items"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_name | Yes | Name of the SaaS product | |
| saas_type | No | Type of SaaS product | microsaas |
| custom_tables | No | Additional product-specific table names |