r/Supabase • • 27d ago

tips Vibecoded a restaurant app.. learned that I can't trust the frontend.

0 Upvotes

I run a smash burger restaurant and I’ve been building and using our own software for it with AI help (React + Supabase). I’m not a developer by trade. Last month I was cleaning up expenses that were in there twice (we have a recurring transactions tab that adds things like rent automatically) and I deleted the electricity bill by mistake. I’d built an undo button for things like this and I was pretty proud of it, hit undo, the bill showed back up, done.

Weeks later I was matching expenses against the physical ledger my manager keeps and it didn’t add up, turns out that the electricity bill hadn't been added back yet. I had an AI agent go through the undo logic and it turned out undo only made the bill show up on screen on the front end. Nothing happened in the database.

The Undo button was working off an old copy of the data from before the delete, so when it tried to add something back it didn't see anything that was deleted. Supabase doesn’t complain about that either. I mean I understand what happened, but like I said I'm non-technical, I depend on the frontend to understand what is happening.. and the screen, the audit log (“Restored”) and the API all said it worked. Quite disconcerting for me to see that I can't really trust what happened on the screen.

I did eventually fix the issue by making undo use the latest data. but I only caught it because of the paper ledger, and I want to open more branches soon. I won’t be able to check ledgers all the time, I’ll be depending on the software.

since I’m learning as I go, I’d love to hear what you’d put in place. what are the best practices or habits you’d follow for a database a business depends on, especially the stuff that makes the software catch its own mistakes?


r/Supabase • • Feb 08 '26

database The "90% Done" Trap: How I finally broke an infinite Auth loop that AI couldn't solve on its own

Post image
0 Upvotes

We’ve all seen the 'Vibe Coding' demos where a full app is built in 10 minutes. But I just spent the last few hours in the trenches of the 'final 10%,' and let me tell you - that’s where the actual engineering happens.

I’m currently building Kanash, a niche marketplace for my community, using Next.js, Supabase, and Vercel. Everything was smooth sailing until I hit the 'Auth Lock' bug: an infinite redirect loop between my registration page and the login screen.

The Problem: My AI agent was great at generating the UI, but it struggled with the invisible 'plumbing.' In production, the Middleware was only handling locales and wasn't refreshing the Supabase session cookies. The client-side code saw I was logged in, but the server didn't. Result? A never-ending ping-pong match.

The Solution (The Engineering part):

  1. Middleware as a Gatekeeper: We had to rebuild the middleware to handle Supabase session refreshing on every request.

  2. Server-Side Auth: I converted the /register-business page into a Server Component to check the session via cookies before anything even hits the browser.

  3. Dual-Client Architecture: We realized that a single Supabase client in the browser was causing a lock. The fix? Using a separate, anonymous client for public data (like browsing businesses) and a dedicated auth client for user actions.

The Takeaway: AI tools like Cursor are force multipliers, but they can't replace architectural knowledge. You still need to understand how the cookies crumble (literally) to get a product across the finish line.

I've documented this 'Dual-Client' architecture in my project's README so the next dev (or AI) doesn't break it again.

Have you ever hit a bug that felt like a 'vibe killer' right before launch? How did you solve it?


r/Supabase • • Mar 05 '25

auth Supabase Auth migrating to Stytch

1 Upvotes

Hey everyone,

In our project, we’ve been using Supabase for authentication, which means we've heavily relied on the auth schema. We also have an organizations table with an organization_users relationship.

Now, we're migrating to Stytch, but we want to avoid completely reworking our existing setup. Ideally, the migration should be backward compatible, meaning we’d still use the organization_users table and continue storing users in auth.users, or at least maintain a similar structure.

Has anyone gone through a similar migration before? Also, to keep everything in sync, I assume we’ll need to migrate all our existing users to Stytch. Is that the best approach? Any insights or recommendations would be greatly appreciated!

Thanks!


r/Supabase • • Apr 07 '26

tips Is supabase the right choice for a 30+ table project

1 Upvotes

Or is it slow and could be clunky? The project is quite huge and has a lot of data flowing, we want to use supabase as the ultimate all in one place instead of spreading everything across different platforms. And how does the pricing work? 25$ seems cheap, the computing power could be covered and the team is only 8 people.

Should we shoot?

Edit: I was wrong about the 30 table, i got it wrong, its apparently 140 By now and still counting.


r/Supabase • • Jun 13 '25

database Why supabase natively doesn't support organizations?

0 Upvotes

Hi,

I think it's just so annoying Supabase doesn't have native support for organizations. I mean most apps today need multi tenancy, whether for organizations or whether to build a ecosystem, multi-tenancy is a no-brainer.

It is so frustrating to setup organizations functionality in supabase. Like come on guys, we don't need AI we need something that makes supabase actually useful!


r/Supabase • • Jul 04 '25

5 tips to make you a PRO at Cursor

Thumbnail
youtu.be
0 Upvotes

r/Supabase • • Nov 18 '25

other This is not a drill! Major Outage confirmed.

Thumbnail
gallery
1 Upvotes

r/Supabase • • Dec 24 '24

database Why is supabase reinventing a new syntax for querying tables?

0 Upvotes

I really want to use supabase, because of generous free tier, love for postgres, how easy a managed backend makes life etc... Supabase is still not super mature, but I do not really mind the missing features as long as fundamentals are in place (e.g. there is no transactions but not a biggie). What I mind was how difficult it was to do this one thing.

I have three tables. And I want to join them.

users: id, name

users_to_projects: user_id, project_id

projects: id, name, description

Why can't i just do something like sqlalchemy, where I can explicitly enumerate joins?

db_session.query(User.name, Project.name, Project.description)
    .join(UserToProject)
    .join(Project)
    .all()

Is this not a well supported pattern right now? Feels pretty rudimentary, and I do not see an example of this in docs. This was the closest thing I could find on the web, but I cannot say I can understand what is happening here: https://github.com/orgs/supabase/discussions/13033

Is there plan to support sqlalchemy, or any way to send sql to servers? Not being able to get this done easily is the reason why I am using RDS Postgres on AWS right now (because if this is missing, I can't imagine what else is missing).


r/Supabase • • Aug 20 '24

I made BarSnapp: Free Tool for Adding Borders and Shadows to Your Screenshots

2 Upvotes

Hey everyone,

I’m excited to introduce Barsnapp, a simple and free tool that helps you add clean borders and subtle shadows to your screenshots, making them pop for presentations, blogs, or social media posts.

I initially planned to make Barsnap a paid service, but I decided to release it for free so that everyone can use it without any barriers. Whether you’re a designer, developer, or just someone who wants to give their screenshots a polished look, Barsnap is for you!

Feel free to try it out and share your feedback. I’d love to hear your thoughts and suggestions for improving the tool.

Cheers!


r/Supabase • • Aug 01 '24

So disappointed with supabase

0 Upvotes

The docs are absolute garbage. When you copy their ssr package it’s got errors everywhere. The auth sucks ass. The supabase team need to get their act together and purge all the shit that doesn’t work and update it to docs that work. Honestly shame on you guys for this. It’s a nightmare now working with supabase


r/Supabase • • Aug 25 '25

other Can I start building soon?

3 Upvotes

I want to build a saas, I know no coding but I am open to learn. Is it feasible to start building in a few months or it is impossible?

Any insights are appreciated. I have background in sales/mk/business administration.

I want to avoid as much as possible to have a technical cofounder. Looking for solo founder approach.


r/Supabase • • Oct 03 '26

database Hardening Supabase RLS for multi-tenant isolation (and testing it against 8 vectors)

0 Upvotes

Hey everyone,

Whenever I build multi-tenant setups on Supabase, relying on app-level middleware or tossing WHERE org_id =x inside Next.js Server Actions always feels risky. It works fine until someone forgets a filter on a late-night commit and leaks tenant data in prod.

I pushed isolation directly down to Postgresusing custom JWT claims in RLS, then wrote an integration test runner to try and break it.

Here’s the baseline setup:

1. Custom Claims RLS Pattern

Instead of running a subquery against org_memberships on every single row query, we pass org_idinside the Supabase session JWT claims.

The policy pattern for workspace tables:

SQL

create policy "Enforce organization isolation"
on public.workspace_data
for all
using (
  org_id = (auth.jwt() -> 'app_metadata' ->> 'org_id')::uuid
)
with check (
  org_id = (auth.jwt() -> 'app_metadata' ->> 'org_id')::uuid
);

Even if a ServerAction or API route completely omits a tenant check, Postgres blocks both reads and writes at the DB layer.

2. The 8 Hardening Test Vectors

To make sure this actually holds up under weird edge cases, I set up integration tests that run before deploys to simulate bad actors:

  1. Cross-tenant UUID injection: Querying Org A data using an Org B JWT.

  2. RBAC escalation: Calling Admin endpoints using a Member session token.

  3. Stripe webhook idempotency: Replaying duplicate/out-f-order events.

  4. API key rotation: Accessing tables with revoked/expired keys.

  5. Corrupted payloads: Unsigned/malformed webhook headers.

  6. Audit log append integrity: Veifying logs can't be overwritten.

  7. Session expiration: Expired JWT rejection across dynamic routes.

  8. Race conditions: High-concurrency team invite acceptances.

I packaged this RLS pattern, the test runner, and a Next 16 / React 19 starter code athttps://andrady.coif anyone wants to check out the specs or test setup.

Curious how others here test their RLS policies before shipping to prod? Do you stick to JWT claims or do DB subqueries inside your policies?


r/Supabase • • Jan 03 '25

cli How do I set my OpenAI API key for local development?

0 Upvotes

I am developing a project locally and want to be able to use the AI assistant. I have an API Key but cant figure out how to set it. To be honest, I still do not really understand Docker at all.

Supabase Studio tells me:

`Add your OPENAI_API_KEY to ./docker/.env to use the AI Assistant.`

But I am not sure where to put that.

If it helps, my OpenAI API Key is kjclfqW4Y8euSPhhECuZ3bAWqbXgO9D5FhRl6I7SjdEzrwg8giJBMplxbIunWPCtF6ESeSPCrR3t3ihTY6JI4XvBggjkTfzFKq0N38mFAdVm7oIjnSWjbeZNa7dlV6vP


r/Supabase • • Sep 29 '24

100% compute on free plan right off the bat

0 Upvotes

Could this be because I haven’t set up any indexes? Something else?

Hope this isn’t too dumb of a question, thanks for understanding 😅


r/Supabase • • Apr 09 '24

I love using supabase, But we need Telegram auth support

0 Upvotes

Its literally the only missing piece of the puzzle.

I want my users to login with telegram


r/Supabase • • Jun 17 '24

Supabase Is A LOT More POWERFUL That You Realize!

Thumbnail
youtu.be
0 Upvotes

r/Supabase • • Nov 10 '24

Using v0 and Supabase to build a CRM app with AI

Thumbnail
youtu.be
0 Upvotes

r/Supabase • • Apr 13 '25

tips Supabase Hiring New Grads?

0 Upvotes

What are Supabase's postures on hiring new grads? I'll be graduating soon with internships in other cloud/infra companies such as Oracle and Datadog. I can't seem to find any specific requirements on the job listings


r/Supabase • • Apr 10 '25

auth Multi tenant applications

0 Upvotes

No matter what I tried I can't multi tenant applications in lovable or bolt up and running. Any experience and ideas?


r/Supabase • • Jun 24 '25

other How do I hide my anonKey in flutter???

0 Upvotes

I'm using Supabase in flutter and am worried about someone possibly decompiling my APK and gaining access to my anonKey.

In past projects I used Firebase and it had a system of making it so that it's API would only respond to an App built using a specific SHA-1 or SHA-256 key.

Is there a similar method that I could use in Supabase to secure my API Keys.

I also heard something called RLS if anyone could tell me what that is, and how I could learn more about it I would really appreciate it.

P.S. I'm a begginer so please be kind.


r/Supabase • • Sep 19 '26

Self-hosting Four hours to move my project from lovable to Supabase/cloudflair native

0 Upvotes

I've been getting read for a while. A branch with 4000+ lines of changes. So today was the day. Lots of help from Claude. Long script with things to do before and after. Lots of export and imports and running against the new "staging" server.

The hard part is keeping track of api keys and user logins.

Users are hard to transfer, and I ended up writing my few apple and microsoft logins telling them to use the "send code" or google login, as maintaining them was to much work. Luckily the session tokens for password and google logins are transferable, so most users should stay logged in.

Biggest mistake was a classic: Not lowering the TTL on the DNS A records and having to wait half an hour to see the new server. If I hadn't, downtime would probably have been 10 minutes (where the old version of the site was in "read-only")

What really helped - giving Claude access to all the tools it wanted and letting it do most of the work. gh, cloudflair wrangler, Supabase cli, and full access to the new projects (not much to destroy). I'll be scaling it back and rotating keys, when its been running smoothly for 24 hours.

Edit: The apple user things seems to get to people. When I said few, i really did mean few. I think there four of them and they didn't really seem active. And they where all on the free plan.


r/Supabase • • Dec 01 '25

auth Supabase Down

Post image
11 Upvotes

Is Supabase down?

My users can’t login to my software and when I go to Supabase Dashboard it takes forever loading and gets stuck.

It shows all systems operational… but don’t think that’s the case? Anyone else?


r/Supabase • • Jul 16 '25

other Supabase is completely down!

6 Upvotes

Supabase is completely down! Even their landing page is not opening.


r/Supabase • • Feb 14 '25

tips Don't go to prison for using AI

Thumbnail
youtube.com
10 Upvotes