$15,000 in Lovable credits, and the app still did not work
A Lovable carbon-credit app was not operational after over $15,000 in credits. Ishan Rana of DappaSol wrote up the rebuild.
Last updated
Written by
Ishan Rana
Their numbers, their account. The figures on this page are the contributor's own. ShipSecurely has not independently verified them.
This is DappaSol's own account of a real client rebuild. The client is unnamed.
If you are building on Lovable now, check three things today
- Is Row Level Security on for every table?
- Does any policy say "true"?
- Can the browser write anything that is worth money?
The story
A US client came to us with a carbon credit rewards app built entirely on Lovable. Users scanned real-world work (trees, hauled waste, compost), the app estimated the carbon kept out of the air, and paid them in coins.
He had spent over $15,000 in credits. The app was not operational.
What we found
- Files thousands of lines long. Past that size the AI could no longer see what it was editing, so every fix broke something else. It had started inventing tables and functions that did not exist.
- A database that no longer matched the code. Tables changed by prompt, no migrations, the same data living in two places.
- Coin balances the browser was allowed to write. Anyone signed in could have given themselves coins.
- A mint function with no check on who was calling it.
- Policies that were either off or set to "true", which is the same as off.
- Secret keys in the front end. Public storage for user photos and GPS data. No rate limits, no tests, no backups, no staging. Production was the only copy.
One policy, before and after
Before, the balances table had this:
create policy "users can update wallets"
on wallets for update
using (true);
Any signed-in user could update any wallet, including the balance.
After:
revoke update on wallets from authenticated;
create policy "users read own wallet"
on wallets for select
using (auth.uid() = user_id);
Users can read their own wallet and nothing else. Nobody updates a balance from the browser. Balances change in one place only: a server function that verifies the login, checks the scan is real, and writes the coins and the audit record together.
What we did
We rebuilt it outside Lovable. Same product, new codebase: a schema with migrations, small files, every table locked down by default, minting behind a verified server function, secrets on the server, a staging copy and backups.
We do repair apps inside Lovable when asked. I don't recommend it for an app in this state. The tool that made the mess cannot see enough of it to clean it up.
Want us to check your app? ShipSecurely App Check
A one-time, outside-only security review of one app you built with Lovable, Bolt, Cursor, Replit or similar. $99, one time.
What we check
- Supabase table exposure and row level security
- the Oct 30 Data API grants change (the grants guide)
- API keys in your client bundle (secret keys in the frontend)
- open admin pages
- exposed .env files and source maps
- security headers
What you get
A plain-English report, ranked by severity, with copy-paste fixes you can hand to your AI builder. By email within 48 hours.
Get an App Check, $99This is an external review of what anyone can see from the internet, done without logins or code access. It isn't a full audit or a guarantee. We only check apps you own or are authorized to have checked.
Featured on ShipSecurely
Paste one of these on your site. Both link to this page. Neither adds a tracking parameter.
Markdown
[Featured on ShipSecurely](https://shipsecurely.dev/stories/lovable-credits-app-still-did-not-work)
HTML
<a href="https://shipsecurely.dev/stories/lovable-credits-app-still-did-not-work">Featured on ShipSecurely</a>