← Devlog

StepIELTS #3: A colleague wanted it, so it became multi-tenant

StepIELTS Posted stepieltsmulti-tenant

Once the first version was running well, one of my wife’s colleagues asked: can I use it for my classes too?

It sounds easy: add one more teacher account. But StepIELTS was built for one teacher. Everyone who logged in saw the same students and the same materials. Add a second teacher without separating anything, and she would see my wife’s students too.

From one class to many organisations

I moved StepIELTS to a multi-tenant model:

  • Every teacher or centre is its own organisation, with its own classes, students and self-made materials.
  • The shared test bank stays shared by everyone. That’s exactly what gives a new teacher enough material to set from day one.
  • Teachers bring students into a class with an invite link, instead of searching a shared list.
  • A class management plan priced by student count lets outside teachers sign up and use it on their own.

The hardest lesson

The hard part wasn’t writing features. It was keeping data apart. Every query about students or materials has to ask “which organisation?”. Forget it once and one teacher can read another teacher’s students’ work, and that kind of bug raises no error at all: everything keeps working, the data just quietly leaks.

So I put every “which organisation” check in one place in the code, then logged in as an outside teacher and tried to break it. That test turned up a few leaks like this, and I closed them before opening the system to my wife’s colleague.