Build Apps Without Code

Verified against Lovable · 2026-07-29

Build a read-only ops dashboard on top of an existing production database

A Lovable brief for connecting a dashboard to an existing production database through a read-only role, with an explicit rule against inventing a column that isn't actually in the schema.

Lovable6 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

Build Ops Console, a read-only internal dashboard on top of an EXISTING production database — you are not designing the data model, you are visualizing one that already exists and must not be altered.

EXISTING SCHEMA
The dashboard reads from these tables, exactly as they exist today — do not rename a column, do not add a migration, and do not assume a field exists that isn't listed here:
orders(id, customer_id, status, total_cents, created_at), customers(id, email, name, created_at), order_items(id, order_id, sku, qty, unit_price_cents) — Postgres 15, orders.customer_id references customers.id, order_items.order_id references orders.id

CONNECTION AND ACCESS
Connect using a read-only database role or a read replica connection string, never the primary write credentials — use the read-only reporting replica connection string in an env var named REPORTING_DB_URL, not the primary DATABASE_URL. If Lovable's setup flow only offers a single connection string with write access, explicitly note that risk back to me rather than silently proceeding, since this dashboard should be structurally incapable of writing to production even if a bug in the generated code tried to.

WHAT TO BUILD
1. A landing view: orders today, gross revenue this week, average order value, count of orders still in pending status, each as a card with the current value and a simple trend indicator against the prior period.
2. the orders table — a filterable, sortable table view over the real data, with pagination; assume the table can hold hundreds of thousands of rows, so every query must use the existing indexes and a LIMIT, never a full table scan into the browser.
3. A drill-down page for a single record showing its related rows across the other tables listed above, joined the way the existing foreign keys actually define, not a guessed relationship.
4. A CSV export button on the table view, scoped to whatever filters are currently applied, not a silent full-table dump.

CONSTRAINTS
Every query this dashboard runs must be read-only — no INSERT, UPDATE, DELETE, or DDL statement anywhere in the generated code, including in any Edge Function or server action. Do not add authentication to the underlying database itself; auth for who can view this dashboard is handled separately at a separate company SSO gate in front of the whole dashboard URL, outside of Lovable. If a screen I've asked for would require a field or table that isn't in the schema above, stop and tell me exactly what's missing instead of inventing a plausible-looking column name and building against it — a dashboard that silently reads from a column that doesn't exist in production will fail the moment it's pointed at the real database instead of a design-time guess.

REVIEW BEFORE SHIPPING
Before calling this done, list every query the dashboard runs against the production schema in one place, so I can review each one for whether it's genuinely read-only and whether it's going to be slow against real data volume, not just against however much sample data Lovable seeded during the build.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

Lovable's default posture, when it builds a data-backed app from scratch, is to design and own the schema itself — that's the normal, well-supported path. Handing it an existing schema and forbidding migrations means fighting that default directly, which is why the "do not add a migration, do not invent a column" rule has to be explicit and specifically triggered at the moment a requested screen doesn't map cleanly onto the given schema. Left unscoped, the natural move for a generation pass hitting a missing field is simply to add it — the tool has no way to know that "add the column it needs" is exactly the wrong move against a database it doesn't own. Naming a read-only role or replica, rather than trusting the generated code to simply "not write," targets the actual security boundary correctly. Code-level promises not to write are advisory, not enforced: a generated app connected with write-capable credentials is one bug away — or one future prompt asking for an "edit" feature down the line — from a mutation against production. A database-enforced read-only role fails closed even if the application code above it is wrong, which is a meaningfully stronger guarantee than "the current prompt didn't ask it to write anything." Forcing pagination and index-aware queries addresses a failure mode specific to how design-time testing works inside a builder like this. Lovable seeds and previews against whatever sample data exists during the build, which is typically small, so a query pattern that looks instant in the builder's own preview — an unindexed scan, no LIMIT clause — can be catastrophically slow the moment it's pointed at hundreds of thousands of real rows. That failure is invisible for the entire build session and only surfaces the first time a real user opens the dashboard against real production volume, which is precisely the wrong moment to discover it.

What you get back

A written list of every SQL query the dashboard runs — for example, "orders table view: SELECT id, customer_id, status, total_cents, created_at FROM orders WHERE status = $1 ORDER BY created_at DESC LIMIT 50 OFFSET $2, using the existing idx_orders_status index" — ready for a human to review for read-only correctness and index usage before the dashboard is pointed at real production data.

Verified against

Lovable Lovable web app (Supabase-integrated chat builder) · 2026-07-29

Changelog

  • 2026-07-29 Initial publish, verified against Lovable connected to an external read-only Postgres role with an explicit no-invented-columns rule.

Need this built into your business?

If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
All Build Apps Without Code prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY