Structuring prompts for complex apps
The quality of your prompt directly determines the quality of the initial generation. A well-structured prompt saves rounds of iteration.Lead with purpose, not features
Lead with purpose, not features
Use the 3-5 feature rule
Use the 3-5 feature rule
Separate design from functionality
Separate design from functionality
Name the screens explicitly
Name the screens explicitly
Include example data
Include example data
Iteration patterns
Building a great app is an iterative process. These patterns help you iterate efficiently.Incremental iteration: build one feature at a time
Incremental iteration: build one feature at a time
- “Add user authentication with email/password sign up and sign in”
- “Add a settings page where users can update their profile and change their password”
- “Connect Supabase and store task data in a tasks table”
Wholesale iteration: regenerate from a better prompt
Wholesale iteration: regenerate from a better prompt
- The app type or framework is wrong
- The overall architecture does not match your needs
- More than half the screens need major changes
- The visual direction is completely off
Visual-first iteration: get the look right, then add logic
Visual-first iteration: get the look right, then add logic
- Generate the initial app
- Use Visual edit and chat to perfect the layout, colors, and typography
- Then add interactive features, data connections, and business logic
Logic-first iteration: build features, then polish design
Logic-first iteration: build features, then polish design
- Generate the initial app
- Add all features, data connections, and business logic
- Then polish the visual design
Managing complexity in large apps
As apps grow, complexity becomes the main obstacle. These strategies keep large projects manageable.Build in phases
Build in phases
Keep the screen count under control
Keep the screen count under control
- Generate core screens in the initial task
- Add additional screens through chat one at a time
- Consider splitting into multiple tasks if sections are independent
Use clear naming in your prompts
Use clear naming in your prompts
- Good: “On the Dashboard page, move the revenue chart above the recent activity list”
- Too vague: “Move the chart to the top”
Test after every significant change
Test after every significant change
Working with generated code
Understanding the generated code gives you more control over your app.Use Code for precision edits
Use Code for precision edits
- Adjusting specific pixel values
- Adding conditional logic
- Modifying component props
- Fixing edge cases that chat cannot describe precisely
Inject custom code for advanced features
Inject custom code for advanced features
Download for local development
Download for local development
.zip from the Code toolbar and continue in your preferred IDE.Understand the file structure
Understand the file structure
Testing strategies
Test the happy path first
Test the happy path first
Test edge cases with empty and extreme data
Test edge cases with empty and extreme data
Test on mobile
Test on mobile
Test with fresh eyes
Test with fresh eyes
Common patterns and anti-patterns
| Pattern | Why it works |
|---|---|
| Start with a focused prompt | Produces a cleaner initial generation that is easier to iterate on |
| Add features incrementally | Each addition is isolated and testable |
| Test after every change | Bugs are caught immediately, not compounded |
| Reference specific designs | Anchors the visual direction and reduces ambiguity |
| Separate design from logic | Lets you optimize each dimension without interference |
| Anti-pattern | Why it fails |
|---|---|
| Front-loading every feature in one prompt | Produces cluttered, inconsistent results that need more rework |
| Making many changes without testing | Bugs compound and become harder to diagnose |
| Vague prompts (“make it better”) | Produces generic improvements that miss your specific vision |
| Ignoring mobile until the end | Forces major restructuring late in the process |
| Over-iterating instead of shipping | Diminishing returns set in after 5-6 rounds - ship and get real feedback |

