Cursor prompt
Build Admin Dashboard with CRUD
Data table with server-side CRUD, column sorting and filtering, bulk actions, and role-protected admin panel.
Build an admin dashboard for managing {{entity}} in {{project_name}}. ## Columns: {{columns}} ## Actions: {{actions}} ### Data Table (TanStack Table v8) - Server-side pagination, sorting, filtering - Column visibility toggle with localStorage persistence - Row selection: checkbox per row + select all on page + select all matching - Column-level filter inputs (text, select, date range) - Export current view to CSV ### CRUD Operations **List: GET /api/admin/{{entity_plural}}** Parameters: page, pageSize, sortBy, sortDir, filters (JSON) Response: { data: T[], total: number, page: number } **Create: POST /api/admin/{{entity_plural}}** Modal form with all fields + client/server zod validation. Show field-level errors inline. **Update: PATCH /api/admin/{{entity_plural}}/:id** Same form in edit mode. Detect no-op updates (no changes = no API call). **Delete: DELETE /api/admin/{{entity_plural}}/:id** Soft delete via deletedAt timestamp. Confirmation dialog: "Delete [name]? This cannot be undone." **Bulk Delete** "Delete N selected items?" — require typing "delete" to confirm for > 10 items. ### Authorization (Enforce on Every Route) ```typescript // Every admin route starts with this const session = await requireRole(request, 'admin'); ``` ### Audit Log Write to AuditLog table: actorId, action, entityType, entityId, before, after, createdAt. ### Output Table component, all admin API routes, form components, audit log schema.
Fill in: {{entity}}, {{project_name}}, {{columns}}, {{actions}}, {{entity_plural}}. In Loopy you fill these in a form and copy the finished prompt in one click.
More coding prompts
- CursorAdd File Upload with Cloud StorageMulti-file upload with type checking, size limits, virus scanning, cloud storage, and progress tracking.
- CursorAdd Redis Caching LayerCache-aside Redis caching with typed get/set helpers, TTL management, pattern-based invalidation, and monitoring.
- CursorAdd Stripe Payment IntegrationComplete Stripe checkout, webhooks, subscription management, and billing portal with idempotent webhook handling.
- LovableBooking and Scheduling SystemCalendar-based booking with availability management, confirmations, reminders, and payment collection.
- CursorBuild Data Export FeatureExport large datasets to CSV or Excel with streaming for memory efficiency, background jobs, and signed download links.
- CursorBuild Feature from SpecComprehensive prompt for your coding agent to build a complete feature from a technical specification. Handles file creation, imports, and testing.

