Purven Bhavsar.Power · Systems · Data
← Portfolio

The Website IDP

A Next.js/Supabase starter I reuse for every new project, except it's built so a real bug found on one site becomes a rule the next site can't skip, instead of a lesson I have to remember myself.

Role: Architect & Sole DeveloperVisit ↗

I build most of my projects with AI coding tools now. They're fast, but by default they're bad at three things: remembering what we already decided, saying "I don't know" instead of guessing, and applying Monday's lesson to Friday's project. I kept hitting the same class of bug across different builds because nothing was actually holding the lesson anywhere durable.

So I built the Website IDP, an internal developer platform, not just a starter template. It's a Next.js/Supabase scaffold I clone for every new site, with auth, database migrations, row-level security patterns, a tested billing engine, and a shared design-token system already worked out. But the scaffold isn't really the point. The point is what happens after I ship something real: I go back and write the lesson into the platform itself, as a rule the next project literally can't skip, not a note I might forget to reread.

A few real examples of that loop working:

  • Every site cloned from the same scaffold defaulted to the same local database port. On one project, a login form silently started authenticating against a different project's user table, with no error, just wrong data. I traced it, fixed it, and added a port registry to the setup checklist so that specific class of bug can't happen again.
  • In Postgres, a row-level security policy isn't enough on its own: the underlying table also needs an explicit grant, or writes fail with no error telling you why. I rediscovered this the hard way on three separate projects before I wrote it down as an enforced rule with the fix baked into the platform's reference code. I haven't hit it since.
  • On another project, a database policy I wrote was too broad. A live test caught that one admin could see data they shouldn't have, before the feature was ever called done. I narrowed the policy instead of patching around it, and that narrower pattern is now what the platform defaults to for that shape of problem.

Nine-plus real projects have shipped from this platform so far: attendance-tracking apps, an e-commerce/GST engine, an internal ops tool, and event platforms, several live with real users today. Every one of them ships with an automated test that proves, against a real signed-in session and not just by reading the policy text, that access control actually holds.

What I think this shows isn't "I can get an AI to write code for me." It's that I can direct a complex system, check what it actually does instead of trusting what it says it did, and turn a mistake into a permanent safeguard instead of a repeated one.

Outcome

9+ real projects shipped from this platform, several live

More work

Want to talk about work like this?

Get in touch →