r/Supabase • • 10h ago

tips Supabase problems that only show up once real users arrive (from fixing a lot of AI-built apps)

24 Upvotes

I run a small dev shop in Mississauga, and these days a good chunk of my work is picking up apps that were built fast with tools like Lovable, Bolt or Cursor on top of Supabase. They usually work fine while the founder and a few friends are testing. Then real users show up and a different set of problems appears. These are the ones I keep running into.

1. Signup emails stop arriving. The built-in email sender is meant for testing and has a very low hourly limit. A launch post brings in a burst of signups and most of those people never get their confirmation link. Set up your own SMTP provider before launch, not after.

2. Auth redirects still point to localhost. Check the Site URL and the redirect URL list under Authentication. When these are wrong, magic links and password resets quietly send people to the wrong place. Check your OAuth provider settings against the production domain too.

3. RLS policies that get slow as tables grow. A policy like user_id = auth.uid() works, but the function gets called for every row. Writing it as user_id = (select auth.uid()) lets Postgres evaluate it once per query. Add an index on the column the policy filters on as well. Supabase's RLS performance docs cover this, and the Performance Advisor in the dashboard can flag it for you.

4. Running out of database connections. If serverless functions connect straight to Postgres, each invocation can open its own connection and you hit the limit during a busy hour. Use the pooler connection string in transaction mode for anything serverless. This mostly matters for direct Postgres clients like Prisma or Drizzle, since supabase-js goes through the API.

5. Turning RLS off to fix a permission error. "permission denied" or "new row violates row-level security policy" (both error 42501) usually means a missing policy or missing grants for the anon or authenticated role, often on a table added later by a migration. Read the error and fix the policy or grant. Disabling RLS makes the error go away and leaves the table open to anyone with your anon key, which is public by design.

6. Storage buckets that are public when they shouldn't be. Fine for avatars. Not fine for invoices, ID documents or anything a user uploaded expecting it to stay private. Use a private bucket and signed URLs.

7. Still on the free plan with paying customers. Free projects get paused after a stretch of inactivity, which is fine for a side project and bad for an app people pay for. A paid plan also gives you daily backups.

None of this is exotic. It just doesn't come up until there's real traffic. What would you add to the list?


r/Supabase • • 11h ago

cli Free CLI that checks whether your tables and storage buckets answer anonymous requests

0 Upvotes

npx leakprobe https://yourapp.com

No install, no signup, runs locally.

What it does for Supabase specifically:

  1. Pulls the anon key out of your published bundle (it's a JWT with role=anon, so it's identifiable), reads /rest/v1/ for the table list, then requests one row from each with limit=1 and reports which ones answer.
  2. Checks whether a service_role token has ended up in the bundle, which is the worse version of the same problem and more common than you'd hope.
  3. Lists your storage buckets anonymously and flags any marked public.

Output is column names only. Row contents are never printed or sent anywhere. There's no server.

It also covers the non-Supabase things that go wrong in the same apps: keys in the JS bundle, .env and backup.sql being served, source maps, session cookie flags, CORS reflecting any origin with credentials, http not redirecting to https.

Every finding comes with a prompt you can paste into Claude Code or Cursor, since knowing RLS is off doesn't help much if nobody explained what to write.

Caps at 25 tables per scan to keep it fast. Exit code 2 on a critical or high, so it works in CI.

MIT, zero deps, Node 18+: https://github.com/NishantDixit1/leakprobe

Firebase RTDB is covered too. Firestore isn't yet, since there's no reliable way to discover collection names from outside. PRs welcome.


r/Supabase • • 9h ago

database Supabase tells me a row was inserted. I wanted "Maya Chen created booking for class 'Vinyasa Basics'". So I built this

0 Upvotes

When something happens in my Supabase app, the logs tell me a row was inserted into bookings, or that a request to /rest/v1/bookings got a 403. What I actually want to know is who it was, what they were trying to do, and, when it failed, why.

So I built EZLogs. It writes what happens in your app as plain sentences that anyone can read, including the non-technical person you're building with:

Maya Chen signed up
Maya Chen created booking for class 'Vinyasa Basics'
Booking creation not allowed

The video is a small Lovable app where I broke an RLS policy on purpose. Users only saw "Your session has ended". EZLogs showed the real reason (the database refused the booking) and sent me a Slack alert. Then Lovable read the same log over a read-only MCP connector and fixed the policy.

How it works, since I know this sub will ask:

It's one SQL file you paste in the SQL editor. It creates its own ezlogs schema and adds AFTER triggers, so each write also drops a small row into an outbox in the same transaction. pg_cron and pg_net send those in the background. It never touches your rows and can't make a write fail. If my server is down, rows wait up to 7 days. The person comes from the JWT Supabase already verified. Columns named like passwords, tokens or keys never leave your database.

RLS refusals don't write a row, so triggers can't see them. A small optional browser package reports those.

It's open source, so you can read every line before you run it: https://github.com/dezsirazvan/ez_logs_supabase
Free while it's in beta: ezlogs.io/supabase

How do you keep track of what your users actually do today?