Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

Cursor rules for database best practices with Prisma and Supabase

A Cursor rules file giving guidance on Prisma schema, models, queries, and Supabase setup, security, and performance for database code.

People use this for

  • prisma supabase schema rules
  • database code review checklist
  • prisma query optimization guide
  • supabase rls policy setup
  • write prisma schema migrations
Name
cursor-rules-for-database-best-practices-with-prisma-and-supabas
Works with
Cursor
License
CC0(as observed at the source)
Version
v1 · updated Nov 29, 2026
Imported · UnclaimedCC0

Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.

Are you the author?Claim this profileRequest removal

Use this rule

$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/cursor-rules-for-database-best-practices-with-prisma-and-supabase-dtfu/export/mdc" -o .cursor/rules/cursor-rules-for-database-best-practices-with-prisma-and-supabas.mdc

Then open a new session; Cursor picks it up from .cursor/rules/.

Download cursor-rules-for-database-best-practices-with-prisma-and-supabas.mdc
Manual install

Save cursor-rules-for-database-best-practices-with-prisma-and-supabas.mdc as .cursor/rules/cursor-rules-for-database-best-practices-with-prisma-and-supabas.mdc for this project or ~/.cursor/rules/cursor-rules-for-database-best-practices-with-prisma-and-supabas.mdc for every project, then start a new session.

Rule


description: "Database best practices focusing on Prisma and Supabase integration" globs: prisma//*, src/db//*, /*.prisma, supabase//* alwaysApply: false

Database Best Practices

Prisma Setup

  • Use proper schema design
  • Implement proper migrations
  • Use proper relation definitions
  • Configure proper connection
  • Implement proper seeding
  • Use proper client setup

Prisma Models

  • Use proper model naming
  • Implement proper relations
  • Use proper field types
  • Define proper indexes
  • Implement proper constraints
  • Use proper enums

Prisma Queries

  • Use proper query optimization
  • Implement proper filtering
  • Use proper relations loading
  • Handle transactions properly
  • Implement proper pagination
  • Use proper aggregations

Supabase Setup

  • Configure proper project setup
  • Implement proper authentication
  • Use proper database setup
  • Configure proper storage
  • Implement proper policies
  • Use proper client setup

Supabase Security

  • Implement proper RLS policies
  • Use proper authentication
  • Configure proper permissions
  • Handle sensitive data properly
  • Implement proper backups
  • Use proper encryption

Supabase Queries

  • Use proper query optimization
  • Implement proper filtering
  • Use proper joins
  • Handle real-time properly
  • Implement proper pagination
  • Use proper functions

Database Design

  • Use proper normalization
  • Implement proper indexing
  • Use proper constraints
  • Define proper relations
  • Implement proper cascades
  • Use proper data types

Performance

  • Use proper connection pooling
  • Implement proper caching
  • Use proper query optimization
  • Handle N+1 queries properly
  • Implement proper batching
  • Monitor performance metrics

Security

  • Use proper authentication
  • Implement proper authorization
  • Handle sensitive data properly
  • Use proper encryption
  • Implement proper backups
  • Monitor security issues

Best Practices

  • Follow database conventions
  • Use proper migrations
  • Implement proper versioning
  • Handle errors properly
  • Document schema properly
  • Monitor database health

No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.

Tried it

Reports from people who added this rule to their editor. They roll up into the badges above.

No one has filed a report yet. Try the prompt and be the first.

License: CC0v1 · published Nov 29, 2026

Comments

No comments yet. If you tried this prompt, say how it went.