Lovable ward
Code review for apps built with Lovable
Lovable gets you from an idea to a working React app with a Postgres database in an afternoon. What it doesn't tell you is which parts only work because nobody has tried to break them yet.
Lovable’s scan goes first, and I start where it stops: your database rules, whether on Lovable Cloud or your own Supabase, your edge functions and what should be true for your app. You get the problems the scan could not know, ranked for your app and proven on your live app, each with a fix prompt you can paste straight back into Lovable.
US dollars, no tax added. See both prices.
create table invoices (
id uuid primary key default gen_random_uuid(),
owner_id uuid not null references auth.users,
customer text not null,
amount_cents integer not null
);
alter table invoices enable row level security;
create policy "Invoices are readable"
on invoices for select to authenticated
using (true);
- Line 12: Row level security is on, so this looks safe. But using (true) lets every signed-in user read every invoice of every customer, straight from the browser console. The fix is one line: using (auth.uid() = owner_id).
Your first opinion
Lovable runs a Quick scan automatically every time you publish and offers a Deep scan of your code on request; both are free in the Security view. Run the Deep scan and paste what it found; ran the AI pentest Lovable offers with Aikido? Paste its report too, and I check what it could not know. Lovable itself says the scans cannot guarantee complete security and suggests a professional review for sensitive apps. Supabase’s safer default only applies to new tables; tables you already have keep their access.
Lovable’s own security docs: Lovable docs: Security. How it compares with other checks: the comparison.
What Lovable usually generates
- React
- TanStack Start
- Vite
- TypeScript
- Tailwind CSS
- shadcn/ui
- Lovable Cloud or Supabase
- Edge Functions
Reviewed:
Common problems in Lovable apps
Not every one of the Lovable apps I review has all of these; the report says which yours has, where and what to do. Items marked scan are ones Lovable’s own scan usually flags too; paste its results when you book and I start there. The rest is where my time goes.
“Slop” is what the AI left behind, not you. Every AI tool skips the same things, whoever is at the keyboard.
- Critical
Row level security that isn'tscan
Tables with RLS switched off, or policies like using (true), let anyone holding your publishable key (older projects call it the anon key) read or change every row. That key ships in your JavaScript bundle by design, so this is the first thing I check.
- Critical
Business rules that only live in the browser
Plan limits, prices and admin roles checked inside React components can be bypassed from the browser console. I list every rule that has to move into a policy, a database function or an edge function.
- High
Secret keys in frontend codescan
OpenAI keys, Stripe secret keys and email API tokens pasted into components or VITE_ variables are sent to every visitor. I find them and tell you which ones to rotate.
- High
Edge functions that trust everyone
Functions that skip JWT verification, trust whatever is in the request body or call paid APIs with no limit per user. One script can run up your bill overnight.
- Medium
Components that grew to 800 lines
Each new prompt adds another branch to the same file. I point out what to split so that changing the pricing page stops breaking the dashboard.
- Medium
Database types that drifted from the database
Supabase types generated once and never again mean TypeScript checks your code against a schema that no longer exists, and stops catching the bugs it is there to catch.
The Supabase warnings behind these:
Case history
How this usually happens with Lovable
Lovable builds the screens and the database together, one chat message at a time. When a feature runs into a permission error, the quickest way to make the error go away is to loosen the rule that caused it. The feature works, the preview looks right and the rule now lets in more people than it should.
Automated checks catch a lot of this, and Lovable integrates Aikido's AI pentest. What they cannot know is your business: that a customer may see their own invoices but not a colleague's, or that only admins may change prices. Those rules live in your head, and in your database only if someone wrote them there.
New Lovable apps use TanStack Start and render pages on the server. Existing projects stay on the old React and Vite setup, which runs entirely in the browser, unless you upgrade them. Either way, the database rules are what protect your data, so that is where I start.
alter table profiles enable row level security;
create policy "Profiles are visible to signed-in users"
on profiles for select
to authenticated
using (true);
- Line 6: Row level security is on, so the dashboard looks fine. But using (true) lets every signed-in user read every profile: names, emails and anything else in the table. Anyone can sign up, so that means everyone.
Lovable Cloud or your own Supabase
With Lovable Cloud, Lovable manages the hosting and the backend for you, and the built-in backend uses Supabase’s open-source foundation. With your own Supabase project you own the backend directly: it is your Supabase subscription, billed by Supabase, and you manage data, users and files in the Supabase dashboard.
For security the question is the same either way: does every table have row level security, and does each policy let in only the right people? What I need from you differs. On Lovable Cloud, screenshots of the policy list are enough; on your own Supabase, a schema-only dump of the database.
Self-exam
Five checks for Lovable apps
Five things you can look at today in Lovable apps. If one of them turns something up, fix it or let me look at the rest.
Make sure row level security is on for every table
Open your database in Lovable Cloud or the Supabase dashboard and look at each table. Every table your app uses should have row level security enabled. One without it is open to anyone with your publishable key, which is in your website.
Search your policies for using (true)
Look in the supabase/migrations folder of your repository or in the policy list. A policy with using (true) lets everyone it applies to see every row. Fine for a public product list, wrong for anything personal.
Search your code for secret keys
Search the src folder for sk_live, sk_test, sb_secret and service_role. None of them belong there: anything in src ends up in your visitors' browsers. They belong in edge function secrets.
Open the admin page as a normal user
Sign up a second account and type the admin page's address. Being sent away is not enough. Open the browser's developer tools, go to the Network tab and reload: if admin data still loads, the page only hides it.
Look at edge functions that call paid services
Any function that calls OpenAI, sends email or sends texts should require a signed-in user and limit how often each user can call it. Without that, one script can run up your bill overnight.
Want a longer list your AI can run for you? Get the free self-check prompt.
Pharmacy
Prices
Same fixed prices for Lovable, whichever tool wrote the code.
After your scan
Second Opinion
$299
What your scan cannot know, checked by a human. The five things to fix first, signed.
Book Second Opinion for LovableFull exam
Launch Review
$999
Launching, raising or selling? Every problem proven, and a signed report you can show.
Book Launch Review for Lovable
Prices in US dollars, no tax added, paid once by card. A fix list or Aftercare is offered in your report, never sold by card. See everything each tier includes.
Lovable questions
Can you review a Lovable project that isn't on GitHub yet?
Lovable can sync your project to a GitHub, GitLab or Bitbucket repository in a few clicks. Do that, then give me read-only access (I send you a key to paste in; it takes a minute). I also need your database policies. On Lovable Cloud, screenshots of the policy list (Cloud tab, Database, RLS policies) are enough; on your own Supabase, a schema-only dump of the database.
Is it a problem that my Supabase publishable key is public?
No. The publishable key (older projects call it the anon key) is meant to be public. It is only safe when row level security is enabled on every table and every policy is correct, which is exactly what I check.
Can I fix the findings inside Lovable?
Yes. Every finding comes with a fix prompt you can paste into Lovable chat, or into Cursor or Claude Code if you have moved to an editor.
Is my Lovable app secure?
It can be, and a clean scan is a good sign, but it does not prove it. What decides it is whether every table has row level security with the right policies, and whether the rules only your app needs, like who may see a colleague’s data, live in the database rather than in the page. The free self-check and the read-only SQL checklist cover the first part in an hour; the second part is what I check.
Does Lovable’s deep scan replace a review?
No, and Lovable does not claim it does. The Deep scan reviews your code for issues specific to your app’s logic, permissions and data, and it is worth running first. It cannot know what your app is for, and Lovable’s docs say the scans cannot guarantee complete security. Paste its findings when you book: anything it already reported does not count toward my guarantee.
Questions about price, privacy or refunds for Lovable? All questions and answers.
Find out what Lovable skipped.
Replies within 2 business days.