đ§ Modes & Scope
| Cheat Code | Use | Example |
|---|---|---|
Chat Mode | Plan without editing files | 'Chat: draft an auth flow spec' |
Build Mode | Apply changes | Default when editing |
@file | Point to a file | @src/routes/pricing.tsx â add annual toggle |
@route | Point to a route | @/dashboard tighten empty state |
Only change | Restrict blast radius | 'Only change the Header component' |
đ¨ Design system
| Cheat Code | Use | Example |
|---|---|---|
Use tokens | Force semantic tokens | 'Use bg-surface, text-foreground â no hex' |
Tailwind v4 | Stick to Tailwind v4 | 'Add utility to styles.css @utility' |
shadcn variant | Extend shadcn cleanly | 'Add a ghost-primary Button variant' |
Dark mode | Verify both themes | 'Confirm contrast in dark mode' |
âī¸ Lovable Cloud
| Cheat Code | Use | Example |
|---|---|---|
Enable Cloud | Provision backend | 'Enable Cloud, add users + posts tables' |
RLS | Ask for policies | 'Add RLS: users can only read own posts' |
user_roles | Never store role on profile | 'Create user_roles table + has_role fn' |
Server fn | Move logic to server | 'Move Stripe call to a server function' |
Add secret | Never hardcode keys | 'Add STRIPE_SECRET_KEY as a secret' |
đ Ship & verify
| Cheat Code | Use | Example |
|---|---|---|
Preview check | Ask for verification | 'Verify the form submits and toasts on error' |
SEO | Set head() per route | 'Add unique title + og for /pricing' |
Publish | Deploy | 'Publish and give me the URL' |
Custom domain | Point a domain | In Project â Settings â Domains |
đ Debugging prompts
| Cheat Code | Use | Example |
|---|---|---|
'Repro then fix' | Force a repro first | 'Reproduce with Playwright, then fix' |
'Show logs' | Ask for evidence | 'Print console + network before claiming fix' |
'Root cause' | Beyond the symptom | 'Fix the category, not just this route' |
'Revert last' | Roll back safely | Use chat history revert |
Frequently asked questions
Do I need to know React to use Lovable?
No â but naming the exact route/component you want changed dramatically improves accuracy. Learn the file map of your project.
Where do secrets live?
In Lovable Cloud secrets, never in code. Reference them only inside server functions.