Generate complete API endpoints with validation, types, and tests.
## Cursor Composer — API Endpoint Builder A structured Composer prompt for multi-file code generation. ### Composer Prompt ``` I need you to api endpoint builder with the following requirements: **Feature:** [FEATURE_NAME] **Description:** [BRIEF_DESCRIPTION] **Files to create/modify:** [FILE_LIST] **Requirements:** 1. Follow existing project patterns and conventions 2. Add TypeScript types for all new interfaces 3. Include error handling for edge cases 4. Add JSDoc comments for public functions 5. Create corresponding test files **Acceptance Criteria:** - [ ] All new files follow project structure - [ ] Types are exported from index files - [ ] Error states are handled gracefully - [ ] Tests cover happy path and error cases - [ ] No linting or type errors **Context:** - Reference: @[EXISTING_SIMILAR_FILE] - Docs: @[RELEVANT_DOC] - Related: @[RELATED_MODULE] **Output:** Create all files in a single Composer session. Show me the file tree first, then implement each file. ``` ### Tips - Use @ references to give Composer context about existing code - Start with the data model, then API, then UI - Review changes before accepting — Composer can modify multiple files
Free to copy and use. Compatible with Cursor AI, Claude 4 Opus, GPT-5.
Copy this prompt into your Cursor AI project and customize the bracketed variables for your stack.
Initial release
Sign in and download this prompt to leave a review.