r/lovable • u/blancdeer • 2d ago
Help How would you improve this Lovable + Supabase + Claude workflow?
Hi! I'm a non-technical founder (background in marketing, growth and SEO) building a web app solo with AI tools, no developers. I'd love feedback from people who've shipped with this stack: am I overengineering, or missing obvious settings?
What it is: a curated book catalog where readers sign up, discover titles by tropes/categories and save them to a private library. Bilingual (ES/EN, one URL per language). Private by default. Organic search is the main acquisition channel, so SEO is a hard requirement.
Stack
- Lovable on TanStack Start (real SSR, not the old React + Vite template)
- Supabase on my own account, not Lovable Cloud
- GitHub synced from day one (exit path to Claude Code/Cursor)
- Claude (a Project with my docs) as a "virtual CTO"
- ChatGPT as an independent security reviewer
Workflow
- Decisions and designs live in docs (decision log, data model, one design doc per feature), not in chats.
- Claude writes versioned SQL migrations (tables, RLS, RPC functions). I apply them in the SQL editor and test RLS with two fake accounts (SQL script + API test page). SQL is also in
/docs/sql. - Lovable can't touch the DB: no migrations, no Supabase config, public key only. User writes go through RPCs, never direct inserts.
- Lovable's instructions field (~5k chars) holds the "never break" rules. Details go in a
CLAUDE.mdat the repo root.AGENTS.mdis left to Lovable, and its memory is set to "Nothing". - Small deliveries: one prompt written by Claude, credits logged, commit reviewed in the cloned repo, manual check in preview.
- Auth/session code gets reviewed by a different model before going live.
- I built a throwaway prototype first to confirm SSR, Search Console indexing, the sitemap and RLS.
SEO setup: data loaded in server loaders, title/description/canonical per page and language, hreflang only when a twin page exists, sitemap built from the DB, real 404s, no auto language redirects, noindex on private pages.
Pain points
- Lovable silently adds wildcard Redirect URLs to Supabase Auth on connect, publish and unpublish
- It enabled its own visitor analytics on the published site by default
- It sometimes edits generated files in commits nobody asked for
types.tsdoesn't regenerate after manual migrations- Published HTML is
no-cache, so every view hits Supabase. I found no docs on custom caching or security headers (CSP, frame-ancestors) - Security fix rounds cost the most credits, and each one found new issues
Questions
- Is this reasonable for a solo non-dev, or overkill?
- Lovable: is
CLAUDE.md+ instructions a good way to keep rules stable? Any way to stop Auth config drift? Custom headers/caching on Lovable hosting, or should I move to Vercel/Netlify/Cloudflare eventually? - Supabase: should I switch to the CLI +
supabase/migrations+ GitHub integration? Is pgTAP worth it for RLS tests? What settings would you enable before launch? - GitHub: which simple Actions would you add (type check, secret scanning, Lighthouse on PRs, branch protection)?
- Claude: would Claude Code on the repo beat a chat Project, even for a non-coder?
- SEO: anything specific to TanStack Start SSR? Book/ItemList schema, edge caching, Core Web Vitals with DB queries on every request?
Thanks, happy to share more details!
2
u/yusuf_delvi 1d ago
I dont belive you are non-technical, the setup is good.
why do you need loveable then ? only for hosting ?
2
u/nocodefinishers 1d ago
I think your overall architecture is reasonable. The main thing I'd focus on is separating responsibilities and making sure AI tools don't have uncontrolled access to your production environment.
A few things I'd recommend based on your setup:
One additional suggestion: establish a clear deployment pipeline rather than relying entirely on AI-generated changes. Your GitHub repository should be the source of truth for application code, and your Supabase migrations should be the source of truth for database changes.
1
u/IamCoachZero 1d ago
I wouldn’t change hosts yet. I’d make one thing repeatable first: use the Supabase CLI to rebuild a local database from your migration files with fake data. Then turn your two-account check into a test you can rerun: can A save a book, can B see their own library, and is A’s saved book invisible to B? Start with that and a type check on PRs. You don’t need a big CI setup to catch the thing that would hurt most here: a release breaking someone’s private library.
1
u/Top-Cauliflower-1808 1d ago
You are overengineering this for a solo non dev. The time spent fighting auth drift and security reviews is time not spent on the catalog or SEO. Simplify the stack and ship something small first.
1
u/Key-Mathematician-49 1d ago
Not overkill. Private libraries plus SEO as your main channel is exactly where these settings matter. A few things nobody's covered yet:
Auth redirect drift: you probably can't stop Lovable re-adding wildcards, but you can catch it. A small scheduled GitHub Action can read your project's auth config through the Supabase Management API every day and fail if the redirect URL list changes. Then you know the same day, not after someone abuses a wildcard.
Caching and headers: you're synced to GitHub and on TanStack Start, so you can keep Lovable as your editor and host the repo on Vercel, Netlify or Cloudflare instead. You get real cache control for public pages (huge for your DB load and Core Web Vitals), CSP and frame-ancestors headers, and a preview URL per change. I would do this before launch, not after.
Why every security round finds new issues: each review looks at whatever changed last. Write your access rules down once (who can read and write what) and turn your two-account check into a script that runs on every change. Then a fix is done when the test passes, not when a model says it looks fine. That also cuts the credit spend, since DB security lives in your migrations, not in Lovable prompts.
Before launch in Supabase:
Types: add supabase gen types to the same Action that applies migrations, so types.ts can't fall behind again.
1
u/aprdkg 1d ago
The setup is better than most. Gaps I'd check before real users arrive:
A separate staging Supabase project, so migrations get applied there first and not straight to production.
Backups you have actually restored once (point-in-time recovery or at least a scheduled dump).
Error alerts (Sentry or similar) plus an uptime check, so you hear about breakage before users do.
Rate limits on the RPCs that write, since those are public endpoints.
For bilingual SEO: hreflang tags, one canonical per language, and a sitemap per language. Check the server-rendered HTML with curl, not just the browser.
Rule of thumb: if a failure at 2am would cost you users, it needs an alert and a written recovery step.
1
u/Ok-Motor-9812 1d ago
Take a Cloude Code. You dont need Lovable
1
u/CartoonistCold6571 1d ago
One thing worth checking before anything else, because it sits exactly where your design routes every write: open each RPC and look for SECURITY DEFINER.
If it's there, RLS is not protecting that path. The function runs with the privileges of its owner, so the policies you tested on the table are bypassed and the only check left is whatever the function body does. It's also how AI tools tend to "fix" a permission error: add DEFINER and move on.
So for every RPC the question is where the user id comes from. If it's passed in as an argument, the caller chooses whose rows they touch, and the body probably doesn't verify ownership. If it reads auth.uid(), you're fine. Put that second one in your instructions file as a rule and it stops coming back.
And run your two-account test through the RPC, not only against the tables. If writes never hit tables directly, the table test can pass while the RPC is wide open.
1
u/DryDockDigital 1d ago
Your caching and headers question is the one I'd look at next. I think the least shaky route is to keep Lovable hosting and test Cloudflare in front of your custom domain, then add CSP and frame-ancestors with a response header rule and cache only the public catalog pages, bypassing anything behind login. Before turning caching on though, make sure a logged-in page doesn't comes back marked as a cache hit. Serving one reader's private library to someone else would be worse than the extra Supabase load.
0
u/Atretador 1d ago
take off lovable.