Lovable Architecture Design Prompt Template
You get an architecture that fits your team size, scale and constraints, with components, data flow and the tradeoffs spelled out. This version is set up for Lovable: describe the user, the screen and the data involved. If the project uses Supabase, say which table or auth flow is affected. Below you'll find the prompt, how to run it in Lovable, a worked example and answers to common questions.
Help me design the architecture for a system. ## What we are building [one paragraph: the product and its main user actions] ## Scale and constraints Users and traffic: [e.g. 5,000 users, 50 requests per second at peak] Team: [e.g. 2 full-stack developers] Existing stack or hard requirements: [e.g. Postgres, must run on one cloud provider] Budget or ops limits: [e.g. no dedicated ops person] ## Hard parts [the features you are worried about, e.g. scheduled reminders, real-time updates] ## Instructions - Prefer the simplest design that meets the constraints. Do not add services we do not need yet. - For each component, say what it does and why it exists. - Show how data flows for the two most important user actions. - Give the main tradeoffs and what would make you change the design later. ## Output format 1. Components list 2. Data flow for key actions (numbered steps) 3. Tradeoffs and risks 4. What to build first Context - App and screens involved: [framework, page or component names] - Leave unchanged: [features, routes or styling that must not change]
How to use this prompt
- 1
Open Lovable
Paste the prompt into Lovable's chat for your project.
- 2
Give it context
Describe the user, the screen and the data involved. If the project uses Supabase, say which table or auth flow is affected.
- 3
Review and iterate
Test the change in the preview, then send one follow-up per problem.
Working in Lovable
- •Lovable generates full-stack code, so state what must not change (routes, data model, styling).
- •Describe behavior in user terms ("when a signed-out user clicks Save") rather than only in code terms.
- •Ask for a summary of changed files so you can review them in GitHub if the project is synced.
Worked example
What you give it
Building: an appointment booking app for small clinics. Patients book a slot, clinics manage calendars, patients get an SMS reminder 24 hours before. Scale: 5,000 users, low traffic. Team: 2 full-stack developers, no ops person. Stack: Postgres required. Hard part: reminders must go out reliably even if a server restarts.
What a good answer looks like (shortened)
1. Components - One web app (monolith) serving the UI and API. - Postgres for clinics, slots, bookings and a reminders table. - A background job worker using a Postgres-backed queue, so there is nothing new to operate. - An SMS provider called from the worker. 2. Data flow: booking 1. Patient picks a slot. The app inserts the booking and a reminder row due 24 hours before, in one transaction. 2. The worker polls for due reminders, sends the SMS, and marks the row sent. 3. Tradeoffs - A monolith is simplest for two people. Split only if one part needs to scale on its own. - Polling adds up to a minute of delay, which is fine for reminders. Use an idempotency key so a restart never sends twice. 4. Build first: booking with the transactional reminder row.
Tips for better results
- •The Team line in Scale and constraints does more work than any other. A design is only good if your team can build and operate it.
- •Name your scariest features in Hard parts. The data flow in item 2 is most useful when it walks through those, not the login page.
- •Lovable generates full-stack code, so state what must not change (routes, data model, styling).
- •Avoid this: Leaving out team size and ops capacity, which leads to designs with microservices and message brokers a two-person team cannot run.
Get the free prompt pack
Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.
Variations
Review an existing design
Replace What we are building with: Here is our current architecture [paste diagram or description]. Find the weak points at [target scale].
Decision record
Change Output format to: An architecture decision record with context, options considered, decision, and consequences.
Compare two options
Add this line to Instructions: Compare [option A] and [option B] in a table on cost, complexity, failure modes and time to build.
Save it as a Retext snippet
Retext is a free text expander for Mac. Save this prompt once, then type ;archdesign in any app (ChatGPT, Claude, your editor, a browser tab) and the full prompt is pasted in.
- Click Add to Retext. The prompt installs as a snippet with the trigger ;archdesign.
- Change the trigger in Retext if you prefer a different one.
- Type the trigger wherever you want the prompt, then fill in the brackets.
Frequently asked questions
Can AI design system architecture for production?
It is useful for laying out options and tradeoffs quickly, especially when you give real constraints. The final call should come from someone who knows your team, budget and failure history.
Can I use a coding prompt like this in a no-code-style builder?
Yes. Lovable writes real code, so a prompt that names inputs, expected behavior and constraints gets better results than a one-line request.
Why does AI suggest complex architectures for simple apps?
Without constraints it defaults to patterns from large systems. State team size, traffic and ops limits, and ask for the simplest design that works.
How do I reuse this prompt without copying it every time?
Click Add to Retext to save it as a snippet. Then type ;archdesign in any Mac app, including your AI tool, and the full prompt is pasted in.
Related Templates
Get the free prompt pack
Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.