Full Stack

CRUD Feature Template

A template for implementing a complete Create, Read, Update, Delete feature with database model, API routes, form UI, list/table view, and confirmation dialogs.

Template Preview

Copy and use in your project

Implement CRUD for [Resource Name]

As an authenticated user, I want to create, view, edit, and delete [resources] so that I can manage my [resources] entirely within the application.

featureMEDIUM8 pts

Description

Build a complete CRUD interface for managing [resource]. This includes the Prisma data model, API routes (GET, POST, PATCH, DELETE), a list/table view with sorting and filtering, a create/edit form with validation, and a delete confirmation dialog. **Data Model:** - id (cuid) - name (string, required) - description (string, optional) - status (enum) - createdAt, updatedAt (timestamps) - userId (relation to User) **Pages/Components:** - List view with search, sort by column, pagination - Create dialog/page with validated form - Edit dialog/page pre-filled with existing data - Delete confirmation modal with resource name **API Routes:** - GET /api/[resource] - List with query params for search, sort, page - POST /api/[resource] - Create with Zod validation - PATCH /api/[resource]/[id] - Update with partial Zod validation - DELETE /api/[resource]/[id] - Soft delete or hard delete

Acceptance Criteria

Given I am on the resource list page

When I click 'Create New' and fill in the required fields

Then a new resource is created, appears in the list without a page refresh, and I see a success toast notification

Given I have existing resources in the list

When I click on a resource to edit it and modify a field

Then the changes are saved to the database and the list updates to reflect the new values optimistically

Given I want to delete a resource

When I click the delete button and confirm in the dialog

Then the resource is removed from the database and disappears from the list with an undo option available for 5 seconds

Given I have more than 20 resources

When I view the list page

Then the list is paginated with 20 items per page and I can navigate between pages

Given I type in the search field

When I enter at least 2 characters

Then the list is filtered in real-time (debounced 300ms) to show only matching resources

Import directly into Codepylot

Skip the copy-paste. Codepylot has built-in templates you can use with one click, plus AI that generates even richer stories from your ideas.

Try Codepylot Free

Other Templates

Ready to build your AI agent workforce?

Describe what you want. Your agents write the code. You stay in control.