← All Blogs
AI · Engineering Culture

Everyone's a Developer Now — But Who's Thinking About Scale, Tenancy, and Security?

AI made building software feel effortless. That's the good news. It's also the problem. We now have a generation shipping products they don't fully understand — and the hard parts don't show up in the demo. They show up at 2 AM. Consider this your field guide for shipping AI-built apps that survive real users.

Mudit Kumar
Mudit Kumar · 18 min read · A practical guide

Let me start with something I actually believe: AI-assisted coding is one of the best things to happen to our industry. I use it every day. It removes the boring parts. It lets a person with an idea turn it into something real over a weekend. That's genuinely beautiful, and I'm not here to gatekeep it.

But I've also watched a quiet pattern repeat itself over the last year. Someone builds an app with AI. It works. They demo it. People clap. They ship it. And then a few weeks later, the same person is messaging me with a different tone entirely:

"It worked perfectly when I built it. Now it's slow, the bill is insane, two customers can see each other's data, and I have no idea why."

That gap — between "it works on my screen" and "it works for ten thousand people you've never met" — is what this post is about. Not to scare anyone off. To teach the part the demo never shows you.

The Demo Lies. Not on Purpose.

Here's the uncomfortable truth about software: the easy 80% is what you see, and the hard 20% is what actually keeps you up at night.

When you "vibe code" — you describe what you want, the AI writes it, you run it, it works — you are operating entirely inside that easy 80%. The AI is brilliant at producing code that runs. It is far less reliable at producing code that survives contact with reality: real users, real load, real money, real attackers, real regulators.

And here's the trap. Because the thing works, you assume it's done. But "it runs on my laptop for one user" and "it's a product" are separated by a long list of questions you didn't know to ask.

The core idea of this post: AI removed the barrier to writing software. It did not remove the barrier to understanding software. Those used to be the same skill. Now they're not — and the gap between them is where products quietly die.

First, Let's Be Honest About What "Vibe Coding" Is

The term gets thrown around loosely, so let me define it the way I see it on the ground.

Vibe coding is building software by describing intent to an AI and accepting the output based on whether it appears to work — rather than because you understand why it works. You're steering by vibes, not by comprehension.

There's nothing wrong with this as a starting point. Prototyping by vibes is fantastic. The problem begins when the prototype quietly becomes the production system — and nobody stopped to fill in the understanding that was skipped along the way.

Vibe coding is a great way to start. It is a dangerous way to finish.

The skill that's disappearing isn't "writing code." The AI has that covered. The skill that's disappearing is knowing what you don't know — the instinct to ask "okay, but what happens when…?" Let me show you the questions that instinct asks.

The Iceberg of "Done"

Picture an iceberg. The part above the water — the part everyone celebrates — is "it works." Below the waterline, where the ship actually sinks, is everything nobody demoed.

THE ICEBERG OF "DONE" waterline It works! 🎉 (the demo) WHAT THE DEMO NEVER SHOWED YOU Scale — what happens at 10,000 users? Multi-tenancy — can users see each other's data? Governance — who's allowed to do what? Audit — who did what, and when? Cost — what does success actually cost? Security — who's trying to break in? 90% of the real engineering lives below the line
Fig 1: The demo is the tip. The product is everything underneath.

None of these six things tend to show up when you're building for yourself. All six show up the moment a real, second human starts using your product. Let's teach each one — properly, the way I'd explain it to an engineer sitting next to me.

The Six Blind Spots — A Quick Course

1. Scale — "It's fast" is a lie until you prove it

Your app feels instant because you are the only user, you have twelve rows in the database, and there's no network between you and the server. Real scale changes the physics. That database query with no index is invisible at 12 rows and catastrophic at 12 million. The AI happily wrote SELECT * FROM orders and it worked — because it had no reason to think about the millionth row.

The question to ask: "What's the slowest thing in this code when the data is 1,000× bigger?" Usually the answer is a missing index, an N+1 query, or loading everything into memory. None of these break in the demo. All of them break on launch day.

2. Multi-Tenancy — the bug that becomes a headline

This one terrifies me the most, because it's invisible and it's a breach. When you build for yourself, there's only one tenant: you. So the code never needs to ask "whose data is this?" Then a second customer signs up, and unless every single query is scoped to the right user, customer A can see customer B's data. AI-generated CRUD code very often forgets the WHERE tenant_id = ? clause, because in the demo there was only ever one tenant.

"Why can I see another company's invoices?" is not a bug report. It's a regulatory incident.

3. Governance — who is allowed to do what?

In a demo, you're an admin, a user, and a god, all at once. In a real product, a junior support agent should not be able to delete the entire customer table. Governance is the set of rules that decides who can do which action on which data — roles, permissions, approvals. Vibe-coded apps almost always start with one role: "logged in." That's not access control. That's an open door with a sign that says "please be nice."

4. Audit — if you can't answer "who did that?", you have a problem

The day something goes wrong — a record vanishes, money moves, data leaks — the first question is "who did this and when?" If your app has no audit trail, you cannot answer. For a hobby project, fine. For anything touching money, health, identity, or other people's data, the absence of an audit log isn't a missing feature — it's a liability. And it's nearly impossible to add convincingly after the incident.

5. Cost — success can bankrupt you

Here's a cruel irony: with serverless functions, managed databases, and pay-per-call AI APIs, your app getting popular can be the thing that breaks you. That LLM call you make on every page load costs fractions of a cent — times a million users, times every refresh. The demo cost you nothing because you were the only traffic. Nobody vibe-codes a cost model. But cloud bills are very good at teaching it to you, retroactively, in red.

A habit worth building: for every external call (database, API, AI model), ask "what does this cost per request, and what happens at a million requests?" Multiply it out before you ship, not after the invoice.

6. Security — the part attackers love that you skipped

The AI will gladly write code that takes user input and drops it straight into a SQL query, a shell command, or an HTML page. It works! It also happens to be a textbook SQL injection or XSS vulnerability. Hardcoded API keys, missing input validation, secrets committed to the repo, no rate limiting — these never break the demo. They're not bugs in the "it doesn't work" sense. They're bugs in the "someone you've never met now owns your database" sense.

THE SIX QUESTIONS THE DEMO NEVER ASKED SCALE What breaks at 10,000 users? indexes · N+1 · memory TENANCY Can users see each other's data? isolation · scoping GOVERNANCE Who's allowed to do what? roles · RBAC · approvals AUDIT Who did what, and when? trails · logs · history COST What does success actually cost? per-request · at scale SECURITY Who's trying to break in? injection · secrets · authz
Fig 2: Six questions to ask before you call anything "done"

The Vocabulary Nobody Taught You — Scaling & Tenancy, Explained

Two of those blind spots — scale and tenancy — come with a pile of words that get thrown around in architecture discussions like everyone was born knowing them. Scale up, scale out, multi-instance, multi-tenant… Nobody actually sits you down and explains the difference, so let me do that here. Once these click, you'll start hearing the right alarm bells before you ship.

Think of it in two families. Scaling is about handling more load. Tenancy is about how you separate different customers. They're related, but they answer completely different questions.

SCALE UP vs SCALE OUT SCALE UP (Vertical) Make one machine bigger 2 CPU · 4GB 8 CPU · 32GB 32 CPU · 128GB SCALE OUT (Horizontal) Add more machines load balancer node 1 node 2 node 3 + + + …add node 4, 5, 6 as needed Simple, but hits a ceiling Near-limitless, needs stateless design
Fig 3: Up = a bigger box. Out = more boxes behind a load balancer.

Now the full vocabulary, each with the same three questions answered: what it is, why you'd do it, and when / for which apps it makes sense.

Scaling · Vertical

Scaling Up (Vertical)

Give the same server more muscle — more CPU, RAM, or faster disk. One machine, just bigger.

Why Simplest possible fix. No code changes, no distributed-systems headaches.
When Early-stage apps, a heavy database, or workloads that are hard to split. Great until you hit the biggest machine money can buy — then you're stuck.
Scaling · Horizontal

Scaling Out (Horizontal)

Add more servers and spread the work across them with a load balancer. Ten small boxes instead of one giant one.

Why Near-limitless growth and fault tolerance — if one node dies, the others carry on.
When Web apps and APIs with growing or spiky traffic. Requires your app to be stateless (any node can handle any request).
Elasticity

Auto-Scaling

The system adds or removes machines automatically based on live demand — scale out at the morning rush, scale back in at night.

Why You pay for what you need, when you need it. Handles spikes without a human awake at 3 AM.
When Anything with uneven traffic — e-commerce sales, event ticketing, news sites. The payoff of building stateless and horizontal.
Deployment Model

Multi-Instance (Single-Tenant)

Each customer gets their own private copy of the whole app and database. Ten customers = ten separate, isolated deployments.

Why Maximum isolation and security — one customer's data can never touch another's. Easy to customise per client.
When Banks, healthcare, regulated enterprise, or anyone who contractually demands "our data lives alone." Costs more to run and maintain.
Deployment Model

Multi-Tenancy (Shared)

One app instance serves all customers; their data lives in the same database, separated by a tenant_id on every row and query.

Why Cheap and efficient at scale — one system to run, patch, and upgrade for everyone.
When Most modern SaaS (Slack, Notion, your typical startup). The catch: one missing WHERE tenant_id=? leaks everyone's data.
Design Prerequisite

Stateless vs Stateful

Stateless: a server keeps no memory between requests — any node can serve anyone. Stateful: a server remembers things locally (a session, a file).

Why Stateless is the unlock for scaling out and auto-scaling. Stateful breaks the moment you add a second node.
When Push state into a shared database, cache, or session store — then horizontal scaling actually works.

Still feels abstract? Here's the cheat sheet I wish someone had handed me — which approach fits which kind of app:

Your app is…Reach forWhy
A weekend MVP / few usersScale up (one box)Don't over-engineer. A single bigger server is fine — add complexity only when traffic demands it.
A growing SaaS productScale out + Multi-tenantCheap to run for many customers; horizontal nodes handle growth. Just scope every query by tenant.
Spiky traffic (sales, events)Auto-scaling + StatelessDemand swings wildly — let the platform add and remove nodes automatically so you pay for what you use.
Regulated / enterprise clientMulti-instance (single-tenant)Compliance and contracts often require hard data isolation. Each client runs in their own walled garden.
A heavy database / legacy coreScale up firstDatabases are hard to split. Vertical scaling buys time before you invest in sharding or replicas.
The mental model: Scaling answers "how do I handle more load?" — up (bigger box) or out (more boxes). Tenancy answers "how do I keep customers apart?" — shared with a tenant ID, or isolated in their own instance. Vibe-coded apps default to one box, one tenant — which is exactly why they crack the moment a second customer and a traffic spike arrive together.

Two People, Same Prompt, Very Different Endings

Here's the thing — I'm not telling you to stop using AI. I'm telling you the difference between the two people using it. They type the same prompt. One understands the output; one just accepts it. Watch where the paths diverge.

SAME PROMPT — TWO ENDINGS THE VIBE-ONLY PATH "Build me an app that does X" It runs. Ship it. Users arrive. It slows down. Data leaks. Bill spikes. 🔥 2 AM page, no idea why Accepts output · skips understanding THE ENGINEER'S PATH ★ "Build me an app that does X" It runs. Now — why does it run? Ask the 6 questions. Harden. Scope, audit, limit, test. Ship. 😴 Users grow, you sleep Uses AI to go faster · still understands
Fig 4: AI isn't the divide. Understanding is.

Notice what the engineer's path is not: it's not slower because they avoided AI. They used the exact same AI. The difference is one extra loop — "why does this work, and what did it skip?" — that turns a demo into a product.

Demo vs Production — The Same App, Two Worlds

If you remember one table from this whole post, make it this one. It's the mental checklist I run on anything before I'd put my name on it.

✗ Demo Reality

  • One user (you)
  • A handful of rows
  • Everyone's an admin
  • No second tenant to leak to
  • Errors? Just refresh
  • Costs nothing — no real traffic
  • Secrets hardcoded, who cares
  • "It works on my machine"

✓ Production Reality

  • Thousands of strangers, concurrently
  • Millions of rows, growing
  • Roles, permissions, least privilege
  • Every query scoped to its tenant
  • Errors logged, alerted, recoverable
  • Cost modeled per request, capped
  • Secrets in a vault, rotated
  • "It works for people I'll never meet"

Look at the prompts, too. The way you ask the AI is part of the skill. Here's the difference between a vibe and an instruction:

// The vibe prompt
"Make an API that lets users save and read their notes."

// The same request, asked like an engineer
"Make an API for notes. Each note belongs to a user.
 Every read and write MUST be scoped to the authenticated
 user — no user can access another's notes. Validate input,
 parameterize all queries, rate-limit the endpoints, and
 log who created or deleted each note with a timestamp."

Same feature. The second prompt bakes tenancy, security, and audit into the request itself. The AI is just as happy to write the safe version — but only if you know to ask for it. That knowing is the whole job now.

Real-World Problems → Real-World Solutions

Let's get concrete. These aren't hypotheticals — every one of these has happened to real teams, repeatedly, in the last couple of years as AI-built apps flooded the internet. The good news: 2026 has a mature, mostly off-the-shelf solution for every single one. You don't have to invent anything. You just have to know it exists.

⚠ Problem — Leaked secrets

The AI hardcoded your API key right in the source. You pushed it to a public GitHub repo. Within minutes, automated bots scanning GitHub found it and spun up crypto miners on your cloud account. You wake up to a $40,000 bill.

✓ Solution

Keep secrets out of code entirely — use environment variables locally and a secret manager in production (AWS Secrets Manager, Doppler, HashiCorp Vault). Add a pre-commit hook (gitleaks, git-secrets) and turn on GitHub Push Protection so a key can never leave your laptop in the first place. Never paste real keys into AI prompts either.

⚠ Problem — Runaway AI / cloud bill

Your app calls an LLM on every page load. It goes mildly viral, a retry loop kicks in, and there's no spending cap. The token meter runs all night. Success became the disaster.

✓ Solution

Set hard budget caps and billing alerts in your cloud and AI provider consoles on day one. Add per-user rate limits, cache repeated responses, pick the cheapest model that does the job, and cap max_tokens. Treat every external call as a line item you multiply by a million before shipping.

⚠ Problem — Cross-tenant data leak

Customer A logs in and sees Customer B's invoices. The AI-generated query fetched records by ID but forgot to also filter by the logged-in tenant. It was invisible in your single-user demo. Now it's a breach notification.

✓ Solution

Enforce isolation at the database layer, not just the app. Postgres Row-Level Security (RLS) — used by Supabase and others — makes the database itself refuse cross-tenant reads. Scope every query by tenant_id, and write an automated test that logs in as A and confirms it cannot see B.

⚠ Problem — Injection & bad input

The AI concatenated user input straight into a SQL string. Someone typed '; DROP TABLE users;-- into a search box and your data is gone. Or they pasted a script tag and now it runs in every visitor's browser.

✓ Solution

Always use parameterized queries or a reputable ORM (Prisma, Drizzle, SQLAlchemy) — never string-build SQL. Validate and sanitise all input at the boundary with a schema library (Zod, Pydantic). Put a WAF (Cloudflare) in front to catch the obvious attacks for free.

⚠ Problem — You found out from Twitter

The app was down for six hours. You had no logging, no error tracking, no uptime monitor. The first you heard of it was an angry customer post. You still don't know what broke.

✓ Solution

Wire up observability before launch, not after the outage. Error tracking (Sentry), uptime monitoring (UptimeRobot, Better Stack), and structured logs you can search. You can't fix what you can't see.

⚠ Problem — One bad migration, data gone

You asked the AI for a "quick schema change," ran it straight on production, and it silently dropped a column of real customer data. There were no backups. It's unrecoverable.

✓ Solution

Use a managed database with automated, point-in-time backups (most managed Postgres/MySQL offer this) — and actually test a restore once. Run migrations on a staging copy first. Never let an AI-suggested destructive command touch production unreviewed.

⚠ Problem — Home-rolled auth

The AI wrote you a custom login system. The password reset link never expires, sessions don't invalidate on logout, and there's no brute-force protection. Auth is the one thing you can least afford to get subtly wrong.

✓ Solution

Don't build auth yourself. Use a managed provider — Clerk, Auth0, Supabase Auth, Firebase Auth. They've already solved MFA, session handling, social login, and the dozen edge cases you'd miss. This is the highest-leverage "don't reinvent it" in the whole stack.

The Modern Vibe-Coder's Toolbox

One reason it's a genuinely great time to build is that the hard problems above mostly have a managed service that solves them for you. The skill isn't building these from scratch — it's knowing which concern maps to which tool and wiring them in. Here's my go-to reference map.

ConcernDon't build it — useWhy
Auth & usersClerk · Auth0 · Supabase AuthMFA, sessions, social login, password resets — all the edge cases solved.
DatabaseSupabase · Neon · PlanetScale · RDSManaged backups, scaling, and RLS so you don't run a server yourself.
PaymentsStripe · PaddlePCI compliance, fraud handling, subscriptions — never touch raw card data.
SecretsDoppler · AWS Secrets Manager · VaultKeeps keys out of code and rotates them safely.
Errors & logsSentry · Better Stack · AxiomYou learn about problems before your users tweet about them.
Edge / WAF / CDNCloudflare · FastlyFree DDoS protection, rate limiting, and caching at the edge.
Input validationZod · Pydantic · ValibotOne schema rejects malformed and malicious input at the boundary.
Background jobsInngest · Trigger.dev · queuesMove slow work off the request path so the app stays responsive.
Hosting / deployVercel · Render · Fly.io · RailwayPush to git, get auto-scaling, staging, and rollbacks for free.
Rule of thumb: if a problem is about auth, payments, security, or data durability, assume a battle-tested service already exists and reach for it. The companies behind these have spent years on the edge cases an AI won't think to mention. Your job is to assemble, understand, and own the result.

The Build Lifecycle — From Vibe to Production

Here's the part to actually bookmark. Vibe coding isn't wrong — it's a phase. The mistake is stopping at phase one. This is the path I'd walk anyone through, and where vibing freely is fine versus where you need to slow down and understand.

Phase 1

Prototype Vibe freely

Goal: prove the idea is worth building at all.

Go fast. Let the AI write everything. Don't worry about scale, tests, or security yet — you're validating that the thing is even useful. Speed beats polish here. Most ideas die at this stage, and that's fine; you don't harden what you're about to throw away.

Phase 2

Understand Slow down

Goal: actually comprehend what you built before others rely on it.

The moment a real second person will use it, stop adding features. Read the code. Trace how data flows from the user to the database and back. Run the six questions — scale, tenancy, governance, audit, cost, security — against every part. You can't own what you can't explain.

Phase 3

Harden Be deliberate

Goal: make it safe for strangers.

Move secrets to a vault. Add input validation and parameterized queries. Scope every query by tenant. Swap home-rolled auth for a managed provider. Add rate limits and budget caps. This is unglamorous and it's the difference between a toy and a product.

Phase 4

Instrument Make it observable

Goal: be able to see and recover when things go wrong.

Wire in error tracking, uptime monitoring, and structured logs. Turn on automated backups and test a restore. Add an audit trail for anything that changes data. You're building the instruments you'll desperately want during your first incident.

Phase 5

Launch small Roll out gradually

Goal: meet real load without betting everything at once.

Deploy to staging first. Release to a small group, watch your metrics and costs, then widen. Use a host that gives you instant rollback. A quiet, boring launch is the best kind.

Phase 6

Operate Keep owning it

Goal: run it responsibly over time.

Review costs monthly. Patch dependencies. Watch your error rates. Have a simple plan for "what do we do when it breaks." Shipping isn't the finish line — it's the start of ownership.

The one-line version: Vibe in Phase 1. Understand and harden in Phases 2–4. Most disasters are just someone who shipped Phase 1 straight to the world.

Do's and Don'ts — The Quick Reference

Pin this section. When you're deep in a build and not sure if you're about to do something you'll regret, this is the gut-check.

✓ Do

Read and understand the AI's output before you ship it.
Lean on managed services for auth, payments, and data.
Keep secrets in environment variables or a vault.
Use parameterized queries / an ORM for every DB call.
Validate all user input at the boundary with a schema.
Set budget caps and rate limits from day one.
Add error tracking and backups before launch.
Scope every query by tenant, and test that isolation.
Ask the AI to critique its own code for risks.
Test the unhappy paths: bad input, no network, two users at once.

✗ Don't

Don't ship the first thing that merely "works."
Don't roll your own auth, crypto, or payment handling.
Don't paste secrets into code — or into AI prompts.
Don't commit .env files or keys to git.
Don't trust user input — ever.
Don't run AI-suggested destructive commands on prod.
Don't give every user admin rights.
Don't ignore the cloud bill until it arrives.
Don't deploy straight to prod with no staging or backups.
Don't assume the AI considered scale or security unless you asked.

How to Vibe Code Responsibly (Without Killing the Magic)

I want to be clear: the answer is not "go learn five years of computer science before you're allowed to build anything." That's gatekeeping, and it's wrong. The answer is to keep the speed of AI and add a thin layer of deliberate understanding on top. Here's the checklist I'd hand to anyone building with AI today.

Before you call it "done" — run this list

Read the code the AI wrote. Not to nitpick — to understand. If you can't explain what a function does, you can't own it.
Find the database queries and ask "is this scoped to the right user?" This single habit prevents the worst category of breach.
Multiply your costs by a million. Every external call. If the number scares you, fix it now, not on the invoice.
Never trust user input. Ask the AI explicitly to validate and parameterize. Assume someone malicious is typing.
Add a "who did what, when" log for anything that changes data. Future-you will be grateful.
Get your secrets out of the code. Environment variables and vaults exist for a reason. Never commit a key.
Ask the AI to be your critic. "What are the security, scale, and cost risks in this code?" It often knows — if you ask.
The reframe: Don't think of AI as the developer. Think of it as an extremely fast, occasionally careless junior engineer. You'd never ship a junior's code without review. Same rule. The review is the senior skill — and now it's the only skill that's hard to fake.

Final Thoughts — Build Anyway, Just With Your Eyes Open

I genuinely love that more people can build now. The barrier falling is a gift. Some of the best products of the next decade will be built by people who, ten years ago, would never have written a line of code. I want that future.

But I also know that "it works" and "it's ready" are two very different sentences, and AI has made it dangerously easy to confuse them. The demo will always look done. The product is the part you can't see.

So build. Use every AI tool you can get your hands on. Ship fast. Just don't mistake the tip of the iceberg for the whole thing. Learn to ask the six questions. Learn to read what the machine wrote. Keep the speed — add the understanding.

The future doesn't belong to people who can prompt an AI. It belongs to people who can prompt an AI and still know what they're looking at.

That second part used to be the easy half. Now it's the whole game. And honestly? That makes it a pretty good time to be someone who actually understands what they're building.

Vibe CodingAI EngineeringSoftware ArchitectureSecurityScalabilityMulti-TenancyEngineering Culture