I Got a 0.5% Raise. So I’m Building a Multitenancy Starter for Spring Boot.
After spending weekends and late nights scaling a multi-tenant SaaS in FinTech, I received a 0.5% raise.
It said more than words ever could.
But instead of burning out or shutting down, I decided to build in public the very thing I wish existed:
A true Spring Boot Multitenancy Starter — built with clarity, built with pain, built with purpose.
🧱 What I'm Building
I don't want to make another wrapper or a copy-paste blog pattern.
I’m building:
- 🧠 A thread-safe
TenantContextHolder
- 🔌 Database-per-tenant routing
- ⚙️ Pluggable resolver strategies
- 🧰 Runtime onboarding hooks
- 🩺 Tenant-aware health indicators & logs
- ✨ Auto-configured like Spring Boot itself
Think: spring-boot-starter-data-jpa
— but for multitenancy.
🧠 Day 0: The Ego Kick
It didn’t start with a plan. It started with rage.
I opened ChatGPT and typed:
“If Spring Boot had to build multitenancy the right way — how would it design it?”
Then I fell down the rabbit hole of spring-boot-autoconfigure
, conditionals, DataSourceBuilder
, and bean registration logic.
I wasn’t looking for a tutorial. I was looking for intent. Design intent. Spring’s kind of intent.
And slowly, the fog started clearing.
🗂️ What I Scaffolded on Day 0
Here’s the first shape:
org.nirvikalpa.multitenancy
├── context/ # Holds TenantContextHolder (ThreadLocal)
├── resolver/ # JWT / Subdomain / Header strategies
├── datasource/ # RoutingDataSource logic
├── config/ # Auto-config magic
└── starter/ # What end users depend on
🔮 Why I’m Building in Public
- 🧭 It keeps me honest and aligned
- 💬 Feedback can shape design before it ossifies
- 🪞 You see not just the final code, but the internal war that built it
This isn’t just about multitenancy. It’s about building with intent instead of reaction.
🔗 GitHub (Day 0 State)
👉 github.com/rahulsb/spring-boot-starter-multitenancy
(still raw, still real — but it's up)
📅 What’s Next?
- Finalize the pluggable
TenantResolver
interface - Decide if we default to JWT or subdomain
- Log Ego Entry #002
- Publish a Twitter/X launch thread
If you've ever struggled with multitenant systems in Java or wished for a true starter — follow this build. I’m designing in the open, thinking loud, and logging everything.
Thanks for reading my Day 0.
I built this out of fire. Hope it helps light someone else's path.
Top comments (0)