Build series · Technical design
The tech stack.
RepGarden won’t be built on Supabase. Here is every part it will run on, which of them Supabase would have done, and what doing them ourselves costs.
By Ahmed Gadir6 min read
No Supabase
RepGarden won’t be built on Supabase.
You may have heard that reaching for Supabase is what amateurs do. I don’t agree. Supabase takes the hard parts of a backend, the part of an app that runs on a server and holds the data, the sign-in and the rules, and puts them behind one sign-up. For a first app that is a sensible trade: less to build, less to run and less to get wrong. My last app, ArabyBuddy, runs on Supabase, and it has served me well.
RepGarden is the app this series follows: a phone app for a personal trainer’s clients and a web app for the trainer, built for a trainer called Benji. Its screens and its database are designed, and nothing is built yet. This entry is the last decision before the first line of code: what it all runs on.
A service like Supabase does more than a dozen jobs so quietly that you can ship an app without knowing they exist. This series is about how an app gets made, so RepGarden does those jobs in the open, one at a time.
Two apps, one API, one database
Clients use a phone app and trainers use a web app. Neither is allowed to touch the database. Both talk to an API: a program on a server that offers a fixed list of things an app may ask for, such as “log this set” or “show me this week”, and refuses everything else. The API is the only way in to the database, where every workout, set and client is kept.
The database is Postgres, a relational database: one that keeps data in tables and knows how the tables connect. RepGarden’s data is almost all connections. A trainer has clients, a client has a plan, a plan has workouts and a workout has sets. A relational database can answer a question that crosses all of them, and can hold a rule across them, such as “a client has one trainer at a time”. A document database, the kind often called NoSQL, stores each record on its own and would leave those connections to my code.
One more program sits beside the API, called the worker. It does the work nobody taps a button for: the reminder at the time a client chose, the harvest every Sunday evening, deleting a video clip a week after the trainer has replied to it.
Rent what isn’t special
One of my rules for a first version is: don’t build anything you can rent. That still holds. RepGarden rents seven jobs:
- Sign-in from Clerk: passwords, codes, and signing in with Apple or Google.
- Payment from Stripe, so RepGarden never sees a card.
- File storage from Cloudflare, for clips and photos.
- Email from Resend, and push notifications through Expo.
- Error reports from Sentry, and analytics from PostHog.
The computers are rented too. A platform called Railway runs the API, the worker and the database, and Netlify hosts the web app.
What RepGarden doesn’t rent is the bundle.
What Supabase would have done
Here is the whole stack, with Supabase’s share of it marked.
Five of those boxes are Supabase’s. It runs the database. It makes the API for you, automatically, from your tables. It handles sign-in, stores files, and runs small pieces of code on a clock or on request.
The biggest difference is the API. On Supabase the app talks to the database almost directly, and rules written inside the database, called row-level security, decide which rows each person may see. Without Supabase, I write every operation the apps can ask for, by hand.
| The job | On Supabase | In RepGarden |
|---|---|---|
| The database | Postgres, run for you | Postgres on Railway, with backups I set up and test |
| How the apps reach the data | An API made automatically from the tables | An API written by hand |
| Sign-in | Built in | Clerk |
| Who can see what | Rules in the database | A check in the API, and the same rules in the database |
| Files | Built in, with uploads that carry on after a dropped signal | Cloudflare R2, with that upload written by me |
| Work on a clock | A scheduler inside the database | The worker |
| Screens that update live | Built in | Not needed |
One thing surprised me when I counted. Supabase doesn’t remove the backend. It moves it. ArabyBuddy never got a backend of its own, and it still has one: I’ve written about 270 database functions and more than 400 security rules for it, all in SQL, the database’s own language. That is where the app’s logic lives, and SQL inside a database is harder to read, test and review than ordinary code. RepGarden’s logic will live in TypeScript, the language both apps are written in.
One level down
Leaving Supabase doesn’t mean running servers. There are roughly five ways to run a backend, and each one hands you more to look after.
With a backend service you write almost no backend at all. One level down, you write the backend and a platform runs it: you hand over the code, and it starts it, restarts it when it crashes and gives it an address. Further down you set up the networks yourself, then the system that juggles the running copies, which is what Kubernetes is, and at the bottom you own the machine.
RepGarden stops at level 2. For one trainer and his clients, everything below it would be work with nothing to show for it.
Four things that have to be right
These four rules matter more than any name on the list.
- Only the API reaches the database. The database has no public address.
- Who can see what is checked twice. The API checks that a trainer is asking about his own client, and the database checks again with its own rules. Row-level security is a feature of Postgres, not of Supabase, so RepGarden keeps it as a second lock.
- A release never breaks the app already on someone’s phone. A web app changes for everyone at once. A phone keeps its version for weeks, so the API only gains things, and never drops one that an older version still uses.
- The data can be brought back. The database can be restored to any minute of the last few weeks, a copy leaves the host every night, and a restore gets practised before launch.
What it costs
This is more work than Supabase.
- An API and a worker to write, test and keep running.
- Three accounts where Supabase would be one: the hosting, the file storage and the sign-in.
- Backups that are mine to set up and to prove.
The part I’m least sure of is the video upload. Supabase’s storage carries on after a dropped connection without any work from me. Gyms have bad signal, and I have to build that part myself.
What the work buys is the app’s rules in ordinary code, in one language, where I can read and test them, and a database that nothing outside can reach.
If you’re building your first app, I’d still say use Supabase or something like it.
Where things stand
The stack was decided on 4 December 2026. Nothing is built. For anyone who wants the names:
| Part | Runs on |
|---|---|
| The app | Expo (React Native) |
| The web app | React, built with Vite, hosted on Netlify |
| The API and the worker | Node and TypeScript, with Fastify |
| The database | Postgres, with Drizzle |
| Work on a clock | pg-boss |
| Hosting | Railway |
| Sign-in | Clerk |
| Payment | Stripe |
| Files | Cloudflare R2 |
| Resend | |
| Push notifications | Expo |
| Errors | Sentry |
| Analytics | PostHog |
| Checks and releases | GitHub Actions, started by hand |
I don’t know yet what all of this costs a month. That is the next piece of work: the bill with one trainer, with ten and with a hundred.
RepGarden has its own website with a waiting list, at repgarden.app.