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.

The centre of RepGarden’s stackThe app on a client’s phone and the web app in a trainer’s browser both talk to one API. The API is connected to the database, which is Postgres. A worker, which does work on a clock, is connected to the same database.The appa client’s phoneThe web appa trainer’s browserThe APIevery read and saveThe databasePostgresThe workerwork on a clock
The centre of it. Both apps talk to the API, and only the API and the worker can reach the database.

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.

RepGarden’s whole stack, with the share Supabase would do markedThe app and the web app talk to the API. Inside a dashed outline labelled Supabase’s share are five parts: the API, the database on Postgres, the worker, sign-in by Clerk and files on Cloudflare R2. Below the outline are five rented services that are needed either way: payment by Stripe, email by Resend, push by Expo, errors by Sentry and analytics by PostHog.Supabase’s shareRented either way, one job eachThe appa client’s phoneThe web appa trainer’s browserThe APIevery read and saveThe databasePostgresThe workerwork on a clockSign-inClerkFilesCloudflare R2PaymentStripeEmailResendPushExpoErrorsSentryAnalyticsPostHog
The whole stack. The five parts inside the dashed line are the ones Supabase would have done. The five below it are rented either way.

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 same app built on SupabaseThe app and the web app talk straight to one box, Supabase, which does the database, the API, sign-in, files and work on a clock. The same five rented services sit below it: payment, email, push, errors and analytics.Supabasethe database · the API · sign-infiles · work on a clockRented either way, one job eachThe appa client’s phoneThe web appa trainer’s browserPaymentStripeEmailResendPushExpoErrorsSentryAnalyticsPostHog
The same app on Supabase. Five boxes become one, and nobody writes an API.

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 jobOn SupabaseIn RepGarden
The databasePostgres, run for youPostgres on Railway, with backups I set up and test
How the apps reach the dataAn API made automatically from the tablesAn API written by hand
Sign-inBuilt inClerk
Who can see whatRules in the databaseA check in the API, and the same rules in the database
FilesBuilt in, with uploads that carry on after a dropped signalCloudflare R2, with that upload written by me
Work on a clockA scheduler inside the databaseThe worker
Screens that update liveBuilt inNot 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.

Five levels of running a backend, drawn as an icebergAn iceberg in five bands. Above the waterline is level 1, a backend service such as Supabase or Firebase. Below it, going deeper: level 2, a platform that runs your code, such as Railway or Render, which is where RepGarden is; level 3, containers on a cloud, such as AWS Fargate or Google Cloud Run; level 4, Kubernetes, such as Amazon EKS or Google GKE; and level 5, your own server.11. A backend serviceSupabase, Firebase22. A platform runs your codeRailway, RenderRepGarden is here33. Containers on a cloudAWS Fargate, Cloud Run44. KubernetesAmazon EKS, Google GKE55. Your own servera rented machine
Each level down, you look after more yourself. A backend service is the part above the water. RepGarden goes one level down, not to the bottom.

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.

These four rules matter more than any name on the list.

  1. Only the API reaches the database. The database has no public address.
  2. 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.
  3. 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.
  4. 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:

PartRuns on
The appExpo (React Native)
The web appReact, built with Vite, hosted on Netlify
The API and the workerNode and TypeScript, with Fastify
The databasePostgres, with Drizzle
Work on a clockpg-boss
HostingRailway
Sign-inClerk
PaymentStripe
FilesCloudflare R2
EmailResend
Push notificationsExpo
ErrorsSentry
AnalyticsPostHog
Checks and releasesGitHub 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.