Database
Once Supabase is connected, Cadrant can create and manage a full PostgreSQL database for your application. Tables, relationships and access policies are configured automatically from your prompts.
Automatic table creation
When you describe your data in a prompt, Cadrant automatically generates the corresponding database schema:
- Tables are created with appropriate columns, types and constraints.
- Relationships between tables (foreign keys) are configured automatically.
- Indexes are added for frequent queries.
- You can view and modify the schema in the Database panel of your project.
Row Level Security (RLS)
Supabase uses PostgreSQL's RLS system to control who can read, create, update or delete data:
- Cadrant configures basic RLS policies based on your prompt.
- By default, data is protected: only authenticated users can access it.
- You can adjust policies in the Supabase dashboard for more fine-grained rules.
- Example: 'only the author can edit their article' translates to an automatic RLS policy.
Best practices
- Describe your data in clear business terms in your prompts.
- Review RLS policies in Supabase before going to production.
- Use the Database panel to inspect created tables and their data.
- For complex schemas, proceed step by step: create main tables first, then relationships.
You can access your Supabase dashboard directly from the Database panel of your project to modify the schema, run SQL queries or manage data manually.