Multi tenant implementation

@xpoler
Sun, 05 Apr 2026 11:31:20 +0000

woutercouvaras:

Oh, one last comment…

This app is not live yet and while developing, I’ve just been using the actual db id as the tenant id, but I will likely implement some sort of api key or uuid to make things a little more secure an in line with common practice.
I’ve not given it too much thought yet, but just thought I would highlight the poin

Good point to raise early
Using the DB ID works fine during development, but yeah—moving to something like a UUID or API key is definitely the better approach for security and scalability. It’ll help avoid exposing predictable identifiers and keep things more aligned with common practices.

When you do revisit it, you might also want to think about things like key rotation and scoping permissions per tenant, depending on how complex the app gets.
Sounds like you’re on the right track just something to refine as you move closer to production.