Full CRUD API Endpoint Generator
Generate complete CRUD operations for any resource with model definitions, route setup, input validation, error handling, and proper status codes.
Prompt AgentExpert
February 1, 20265560
Workshop · 4 variables
Generate the full CRUD logic for managing a resource in Express.
Include:
- Model/Schema definition with appropriate types and validation
- Controller/Handler methods for Create, Read (single + list with pagination), Update, and Delete
- Route setup following RESTful conventions
- Input validation for all endpoints
- Error handling with appropriate HTTP status codes (400, 404, 409, 500)
- TypeScript types for request/response shapes
Requirements:
- Use TypeScript best practices
- Include comments explaining design decisions
- Handle edge cases (duplicate entries, not found, invalid input)
- Return consistent response shapes
Additional context: None
~176 tokens · 702 chars
Fill the variables
The resource to create CRUD for (e.g., 'User', 'Product')
Framework to use (e.g., 'Express', 'Fastify', 'Next.js')
Programming language
Additional requirements or constraints
Results
What it actually produced
Tags
Discussion