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"]
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"product_name": "<product_name>"
},
"name": "briefkit_generate_database_schema"
}
}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 |