The Stack, Explained
Ten layers, taken apart

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.

DNS The sign on the highway CDN / Edge The nearest doors HTTPS / TLS The bag check Frontend The lobby and the map Auth The membership desk API routes The hallways Services The stores Third-party The food court Background jobs The loading dock Database The stockroom
Scroll to walk down the stack ↓
01 / 10

The part that bites people

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.