Your stack is a building.
Every diagram of a "tech stack" is boxes and arrows drawn by someone who already understands it. Here is the version that actually made it click: you are not writing software, you are designing a building. It has an entrance, hallways, floors, a food court, and a stockroom nobody sees.
—
—
—
—
Tenant A must not reach Tenant B's floor
Every store leases its own floor. Tenant A's staff badge opens Tenant A's floor and nothing else. Here is the thing worth internalising: the sign in the lobby is not what stops them. A sign is a suggestion. The elevator refusing the badge is what stops them.
In your stack, the sign is your application code — the .filter() that hides
the other tenant's rows. The elevator is the database. If isolation only exists in the sign, then
one forgotten line, one crafted URL, and a customer is standing in someone else's stockroom.
Put the lock in the elevator. That is the entire argument for row-level security, and it is the single most expensive lesson in multi-tenant software.