AI SummaryThis Cursor Rules booster provides standardized guidelines for implementing CRUD operations and data access layer patterns, helping teams maintain consistency across database operations in their codebase.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "budget-group-api — Cursor Rules" prompt rules to my project. Repository: https://github.com/constROD/budget-group-api Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Guidelines for Data Access Layer via Database
Purpose & Overview
These rules define the standard patterns for implementing CRUD operations in the data access layer. The guidelines are based on the implementation of the 'users' module and should be followed for all database operations to maintain consistency across the codebase.
Shared Domain
By default, place all data access files in the shared data directory. Only use feature domains when explicitly specified in requirements. ` src/data/[entity-name]/ ├── schema.ts # Entity schema definitions ├── create-[entity].ts # Create operation ├── get-[entity].ts # Get single entity ├── get-[entity]s.ts # Get multiple entities ├── update-[entity].ts # Update operation ├── delete-[entity].ts # Delete operation ├── search-[entity]s.ts # Search with filters └── __test-utils__/ # Test utilities `
Feature Domain
When a prompt/requirement explicitly specifies that code should be organized in a feature domain, follow this structure: ` src/features/[feature-name]/ └── _data/ # Feature-specific data access layer ├── schema.ts # Feature's schemas ├── create-[entity].ts # Create operation ├── get-[entity].ts # Get single entity ├── get-[entity]s.ts # Get multiple entities ├── update-[entity].ts # Update operation ├── delete-[entity].ts # Delete operation ├── search-[entity]s.ts # Search with filters └── __test-utils__/ # Test utilities `
Function Naming
• create[Entity]Data: For creating records • get[Entity]Data: For retrieving a single record • get[Entity]sData: For retrieving multiple records • update[Entity]Data: For updating records • delete[Entity]Data: For deleting records • search[Entity]sData: For searching records with filters
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts