Convex is Awesome; Theo was right again...

technology
convexsupabasetypescript
Share:
Supabase vs Convex

Convex is Awesome

What is Supabase

If you don’t know what Supabase is, it is a backend as a service that is extremely popular for real-time postgres database and edge functions. It is useful for an API, database and auth services for a React app as well as a mobile app.

The advantages for Supabase are the real-time database where apps can update automatically when data changes as well as its built in authentication. Supabase offers Row Level Security (RLS) which allows you to set policies on the database tables. These policies, if crafted carefully, can allow frontend apps to directly access the database securely without having to go through a secure server API.

Another advantage is that you can self host Supabase for free. I don’t recommend this for production as then you are responsible for all aspects of the services, but it is incredibly useful for development on local docker containers.

So what is the problem with Supabase

Supabase sounds great, but there are a few issues that I constantly run into. I am so stubborn, so for too long, I continue to deal with these problems.

First issue is that if you are not careful, incorrect RLS policies can leave your database open to security concerns. If you misconfigure a policy, and it is easy to do, you can leave a database table open for public reading or worse public writting. Because of this, I often lock down the database and only access the database through an API with greatly defeats one of the advantages of Supabase.

Another issue is with vibe coding. Supabase uses its own JavaScript like language in its Edge functions, called Deno. Deno is a great language, but it is different than JavaScript. Also, when talking to Supabase, you are speaking over REST and types are not guaranteed across your app and the API edge functions.
This means if you change a type in your application, it might not be reflected on the API which leads to errors that go uncaught until deployed (unless you have good tests).

What is Convex

Convex is a newer backend as a service, but quickly gaining in popularity. It is like Supabase and has a database and authentication (as well as other services). Convex attempts to solve the same problems as Supabase, but differs in execution. Convex is still a realtime database so updates to data automatically update all connected clients, but Convex uses a non-relational database.

Why I switched

I have been working on an anoymous location based chat app in React Native with Supabase backend. This app has taken me a week of fighting with Claude Code to correctly vibe code this app. New feature would be implemented quickly, but then not working correctly during test. I though the issue was with Claude’s understanding of the latest React Native, but turns out it was the communication between my app and Supabase.

I watched Theo’s video on Convex and decided to switch to using Convex as a test.

Theo t3.gg was right again. Since Convex is TypeScript from front to back, it guarantees that all types are correct during build time. Many more errors are caught during build time and saves the headaches of finding these issues at runtime. Your code ships faster, better, stronger with far less errors… your customers will thank you.

My test to recreate this location based anoymous with Convex took me less than 3 hours with Claude Code.

Convex is not perfect

There are 2 reasons not to use Convex:

  1. If you absolutely need a relational database, then Convex is not for you. The database is a document database. Technically it has relations, but you cannot us SQL joins. But watch Theo’s video above for a solution to this.
  2. Vendor lock-in: if you want to move to a different vendor, it will not be as simple as copying the database and changing your connection string.
Jeff Kershner

Jeff Kershner

Early Tech Adopter, Lifelong Coder, Animal Lover, Happiness Seeker

esc
↑↓ navigate select
esc close