home/roleplay/crud-pattern-instructions

Crud Pattern.instructions

GPTClaudeGemini··1,309 copies·updated 2026-07-14
crud-pattern-instructions.prompt
# CRUD Pattern Instructions

## Overview

This document establishes the **canonical pattern for implementing CRUD operations** in this application. All features requiring Create, Read, Update, and Delete functionality MUST follow this API-first pattern.

## When to Use This Pattern

Use this pattern when implementing features that require:

- ✅ User profile management
- ✅ Content creation and editing (posts, comments, etc.)
- ✅ Settings and preferences management
- ✅ Any resource that requires full CRUD operations
- ✅ Features that might need programmatic access in the future

## Architecture: API-First Pattern

### Why API-First?

The API-first pattern provides:

- **RESTful architecture** - Standard HTTP methods for predictable behavior
- **Modular design** - Separation of business logic (API) from presentation (UI)
- **Reusability** - API endpoints callable from anywhere in the application
- **Programmatic access** - Easy integration with external tools or services
- **Consistency** - Follows the established pattern of `/api/profile` (reference implementation)
- **Type safety** - Full TypeScript support throughout the stack

### File Structure

when to use it

Community prompt sourced from the open-source GitHub repo sethdavis512/prompt-bucket (no explicit license). A "Crud Pattern.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

sethdavis512/prompt-bucket · no explicit license