Windsurf prompt

Next.js App from Scratch

Complete Next.js application with routing, API, auth, database, and deployment configuration.

Build a production-ready Next.js application for {{project_name}}.

## Purpose: {{purpose}}
## Main features: {{features}}
## Auth: {{auth_method}}
## Database: {{database}}

### Project Setup
Next.js 14+ with App Router and TypeScript.
Tailwind CSS + shadcn/ui for styling.
ESLint + Prettier with strict config.
Husky pre-commit hooks.
Environment variables with validation (t3-env).

### Directory Structure
```
app/
  (auth)/login, signup
  (app)/dashboard, [feature pages]
  api/[routes]
components/ui, forms, layouts
lib/auth, db, utils
prisma/schema.prisma
```

### Authentication: {{auth_method}}
If NextAuth: configure providers, session strategy, callbacks.
If Clerk: install, configure, protect routes.
Middleware for protected routes.

### Database: {{database}}
Prisma schema for: User + {{core_models}}.
Migrations setup.
Database client singleton.

### Core Features
Implement: {{features}}.
For each: API route + React Server Component or client component.

### API Design
RESTful API routes in /app/api/.
Input validation with zod.
Error handling with typed error responses.
Rate limiting on sensitive endpoints.

### Deployment Config
vercel.json or similar.
Environment variable documentation.
Build optimization: image optimization, bundle analysis.
Edge runtime for lightweight routes.

### Output
Complete working application that builds successfully with npm run build.

Fill in: {{project_name}}, {{purpose}}, {{features}}, {{auth_method}}, {{database}}, {{core_models}}. In Loopy you fill these in a form and copy the finished prompt in one click.