ToolBunny LogoToolBunny
Back to Library
Cursor
Software Engineer
Development
Full-Stack Component Generation

A comprehensive Cursor prompt for generating a full-stack Next.js component with database integration and API routes.

1. Customization Parameters

[COMPONENT_TYPE]
[COMPONENT_NAME]
[ACTION_NAME]

2. Compiled Prompt Preview

Live compiler active
output template
Generate a production-ready [COMPONENT_TYPE] component using Next.js 14 App Router, TailwindCSS, and Shadcn UI. Requirements: 1. Create a responsive, accessible React component in `src/components/[COMPONENT_NAME].tsx`. 2. Create the necessary Zod schema for validation in `src/lib/validations.ts`. 3. Create a Server Action in `src/app/actions/[ACTION_NAME].ts` to handle the database insertion using Drizzle ORM. 4. Implement optimistic UI updates using React's `useOptimistic` hook. 5. Ensure the component follows the existing design system tokens and supports dark mode. 6. Add loading states (skeletons) and error handling with react-hot-toast. Please provide the exact file paths and code for each file sequentially.

1Customize Variables

Fill in the parameters on the left. Type custom topic, instructions, or adjust selectors to fit your exact business goals.

2Live Compiler Updates

The template values will be automatically inserted into the placeholders in real time on the right preview window.

3Copy & Paste to AI

Click the large action button to copy the compiled prompt, then paste it directly into Cursor to experience top outcomes.

Related Prompts

Cursor
Software Engineer

Instruct Cursor to analyze and refactor a complex, messy legacy file into clean, modern, testable code.

Claude
Software Engineer

Get an in-depth review of your React and TypeScript components focusing on performance, modularity, type-safety, and clean coding practices.

Cursor
Software Engineer

A professional system prompt to instruct Cursor or Copilot to write idiomatic Next.js 15 code using the App Router, Server Components, and Server Actions.