Lovable Prompts — Build Apps with Natural Language
Lovable (formerly GPT Engineer) lets you build full web applications by describing what you want in plain English. It generates React applications with Supabase backends, handling everything from UI components to database schemas and authentication. The quality of your Lovable output is directly proportional to the specificity of your description. A prompt like "build a project management app" will produce something generic, but a detailed description transforms the output: "Build a project management app for freelancers. Include a kanban board with customizable columns, time tracking per task with start/stop timer, a client portal where clients can view progress, and an invoice generator that calculates totals from tracked hours. Use a professional design with a sidebar navigation, dark mode support, and blue as the primary accent color."
Lovable's strength is in generating complete, connected applications where the frontend, backend, and database work together. To get the most from this, describe your data relationships explicitly. "Users have many projects. Projects have many tasks. Tasks belong to a single column (status). Tasks can have multiple time entries with start and end timestamps." This data model description helps Lovable generate proper database tables, relationships, and the corresponding CRUD operations. For authentication, Lovable integrates with Supabase Auth out of the box — just mention "add user authentication with email and Google login" and it will wire up the entire auth flow.
Iteration is where your prompting strategy matters most. After the initial generation, use targeted follow-up prompts to refine specific aspects without disrupting the overall architecture. "Add a search bar to the task list that filters by title and description" or "Change the dashboard layout to show weekly stats instead of monthly" are effective iteration prompts because they are specific about what to change and where. Avoid prompts that require rethinking the entire application structure — those are better handled by starting a new generation. Save your best initial project descriptions as templates. A well-written Lovable prompt for one type of app can be adapted for similar apps by swapping the domain-specific details while keeping the structural and design instructions intact.
Copy-Paste Lovable Prompts
Ready-to-use prompts for Lovable. Copy, customize the {{variables}}, and paste to start building.
Web App Builder
Build a {{app_type}} web application for {{target_audience}}. Core features: - {{feature_1}} - {{feature_2}} - {{feature_3}} - Dashboard with key metrics and recent activity feed Data model: - {{entity_1}} has many {{entity_2}} - {{entity_2}} belongs to {{entity_1}} - Each {{entity_2}} has: {{entity_2_fields}} Design: Professional and clean. {{primary_color}} accent color. Sidebar navigation with icons. Card-based layouts for data display. Mobile responsive. Include: Loading spinners for async operations, empty states with helpful messages, toast notifications for user actions.
Why it works: Describes the complete app through features, data model, and design direction. Explicit entity relationships help Lovable generate proper database tables and connected CRUD operations.
Feature Iteration
Add a {{feature_name}} feature to the existing app. What it does: {{feature_description}} User flow: 1. User navigates to {{entry_point}} 2. User {{action_1}} 3. System {{response_1}} 4. User sees {{result}} UI requirements: - Place the entry point in {{ui_location}} - Use the existing design system (same colors, spacing, components) - Include form validation with inline error messages - Add a confirmation step before destructive actions Data: {{data_requirements}} Do not modify existing features. Do not change the navigation structure. Only add new components and routes as needed.
Why it works: Describes the feature through a concrete user flow with numbered steps. The preservation constraints prevent Lovable from accidentally breaking existing functionality during iteration.
UI Polish Pass
Improve the visual design and UX of the {{page_name}} page: 1. Spacing and alignment: - Increase padding inside cards to 24px - Add 16px gap between grid items - Align all section headings consistently 2. Visual hierarchy: - Make the page title larger (text-2xl, font-bold) - Add subtle gray-50 background to alternating sections - Use {{accent_color}} for primary actions, gray for secondary 3. Micro-interactions: - Hover effects on clickable cards (shadow + slight lift) - Smooth transitions on all interactive elements (200ms) - Button press feedback (scale 0.98) 4. Empty and loading states: - Skeleton loaders that match the actual content layout - Friendly empty state messages with suggested actions 5. Mobile: Stack all grids to single column below 768px. Full-width buttons on mobile. Do not change any functionality, routes, or data logic. Only modify styling and UX.
Why it works: A numbered checklist of specific visual improvements with exact values (padding, font sizes, animation durations) gives Lovable precise targets instead of vague 'make it look better' instructions.
Database Setup
Set up the Supabase database for this application: Tables: 1. {{table_1}} - id (UUID, primary key, auto-generated) - {{table_1_fields}} - user_id (UUID, foreign key to auth.users) - created_at (timestamp with timezone, default now()) - updated_at (timestamp with timezone) 2. {{table_2}} - id (UUID, primary key, auto-generated) - {{table_2_fields}} - {{table_1}}_id (UUID, foreign key) - created_at, updated_at Row Level Security: - Users can only read/write their own {{table_1}} rows (WHERE user_id = auth.uid()) - Users can read/write {{table_2}} rows that belong to their {{table_1}} Indexes: Add indexes on user_id, {{table_1}}_id, and any field used for sorting or filtering. Generate the corresponding TypeScript types and Supabase query functions for CRUD operations on each table.
Why it works: Includes RLS policies, indexes, and type generation alongside table definitions. This produces a secure, performant database setup instead of just bare table creation.
Auth Flow
Add complete authentication to this app using Supabase Auth: Auth methods: - Email and password (with email confirmation) - Google OAuth {{additional_auth_methods}} Pages: - /login — email/password form + Google button + link to signup - /signup — email/password form + Google button + link to login - /forgot-password — email input to send reset link - /reset-password — new password form (accessed from email link) Post-auth flow: - On signup: create a user profile row with display name from email - On login: redirect to {{default_route}} - On logout: redirect to /login, clear local state Protected routes: All routes under {{protected_prefix}} require authentication. Redirect unauthenticated users to /login with a return URL parameter. UI: Center auth forms, max-width 400px. Show password strength indicator on signup. Display auth errors inline (not alerts). Loading state on submit buttons.
Why it works: Covers every auth page, method, post-auth behavior, and route protection rule. Lovable generates a complete auth system instead of a login page that leads nowhere.
Deployment Prep
Prepare this Lovable app for production deployment:
1. Environment variables:
- Verify all Supabase credentials use environment variables (not hardcoded)
- Ensure NEXT_PUBLIC_ prefix only on client-safe vars
- Create a .env.example listing every required variable
2. Error handling:
- Add global error boundary component that shows a friendly error page
- Add try/catch to all Supabase queries with user-facing error messages
- Log errors to console in development, suppress in production
3. Performance:
- Add loading.tsx files for route-level suspense boundaries
- Lazy load heavy components (charts, rich text editors)
- Optimize images with next/image where applicable
4. SEO basics:
- Add metadata (title, description) to each page
- Add Open Graph tags for {{app_name}}
- Generate a sitemap.xml
5. Security:
- Verify all RLS policies are active
- Remove any console.log statements with sensitive data
- Set secure cookie options for auth tokens
Do not change features or UI. Only add production infrastructure.Why it works: A structured deployment checklist ensures nothing is missed. The scope boundary (no feature/UI changes) keeps Lovable focused on infrastructure without introducing regressions.
Recommended tools & resources
The art of building software through natural language prompts.
Best Prompts for CodingCoding prompts that work across Lovable, Bolt, and other AI builders.
Prompt BuilderGenerate structured prompts for app generation and iteration.
Prompt PatternsReusable prompt structures for consistent AI-generated code.
AI Coding Assistant PromptsPrompts designed for AI-powered app builders and coding tools.
Prompt TemplatesBrowse development and design templates ready to use.