Prod System vs Demo: What Changes Between Demo and Production

By the InfiniSynapse Data Team · Last updated: 2026-07-03 · We build InfiniSynapse and write these notes like a builder posting after a Reddit thread—not a brochure for vibe-coded products moving to real APIs and data infrastructure.

Hero image for prod-system


Table of Contents

  1. TL;DR
  2. Key Definition
  3. Demo Stack vs Prod System
  4. Eight Layers That Change
  5. Migration Path
  6. Code and Config Patterns
  7. Architecture Sketch
  8. Readiness Scorecard
  9. 30-Day Cutover Plan
  10. Failure Modes
  11. Operating Model
  12. InfiniSynapse Connection
  13. Case Study
  14. Pre-Cutover Questions
  15. FAQ
  16. Conclusion

TL;DR

Direct answer: A prod system is not the demo with HTTPS—it is separate secrets, async boundaries, observability, and rollback owners so real users cannot trivially break or exfiltrate the vibe-coded UI you shipped in a weekend.

After reviewing recurring build-log threads in r/vibecoding, r/Cursor, r/devops, and r/SaaS (manual sample, 2024–2026—not a formal crawl), here is what separated teams that promoted a demo stack to a prod system without month-one outages from teams still debugging .env.local in production.

  • prod system = demo code paths replaced or gated: proxy, secret store, job queue, structured logs, health checks, on-call.
  • Same repo is fine; different env config and enforced boundaries are not optional.
  • Cutover is a checklist—not a Friday deploy and hope.
  • Pair with Production Ready minimum bar and Production Readiness Checklist.

Who this is for: founders who vibe-coded a working UI and need a prod system before beta users or buyers. What you'll learn: demo vs prod diff, migration, scorecard, metrics.

Key Definition

Key Definition: A prod system is the operational stack—hosting, secrets, auth, data boundaries, async execution, monitoring, and rollback—that runs the same product code as the demo but enforces reliability, security, and observability bars real users and credentials require.

prod system matters when the Loom demo uses production Stripe keys and the founder's laptop is the only "backup."

Reliability expectations align with Google SRE and the AWS Well-Architected Framework—not "it worked in Cursor."

Demo Stack vs Prod System

LayerDemo stackprod system
HostingDev tunnel / single regionProd region + staging mirror
Secrets.env.local, chat-pasted keysSecret manager; no client exposure
AuthShared password or open routeScoped tokens, session hardening
DataSeed JSON, prod DB "for speed"Tenant isolation, migrations tested
Long workawait fetch() in route handlerQueue + worker + progress UI
ErrorsStack traces to browserStable codes + request ID
Deploygit push to mainStaging → checklist → prod
OpsFounder DMsRunbook, on-call, status page

Teams skip building a prod system because the demo already "works"—then lose a weekend when webhooks double-charge and logs show nothing useful.

Compare minimum bar in Production Ready and full checklist in Production Readiness Checklist.

Eight Layers That Change

1. Environment separation

Staging mirrors prod topology; demo keys never touch prod data. prod system rule: separate Stripe, OAuth, and DB URLs per env—documented in runbook.

2. Secret management

Remove NEXT_PUBLIC_* vendor keys. Backend proxy holds credentials. Rotation tested once before beta.

Security maps to OWASP API Security Top 10 and NIST Cybersecurity Framework.

3. Auth and tenancy

Demo auth becomes session tokens, API keys per tenant, or SSO. Row-level security or tenant_id filter on every query—verified in CI.

4. Async and workers

Anything over five seconds leaves the request thread. prod system workers scale independently of the Next.js or Vite front end.

5. Observability

Structured logs, request IDs, error-rate alerts. OpenTelemetry on auth and top routes minimum.

6. Data and migrations

Forward-only or reversible migrations; backup before cutover. No "fix in prod SQL console" as default ops.

7. Deploy and rollback

Blue/green, feature flags, or revertible release tags. Rollback owner named—API can roll back without redeploying UI.

8. Compliance hooks

If agents call tools: OWASP LLM Top 10; if EU data: map retention and UK NCSC AI guidelines.

Each layer gets a pass/fail in the prod system cutover checklist—not "we'll harden later."

Migration Path

Demo stack          Transition              Prod system
-----------         -----------             -----------
localhost    -->    staging + secrets   -->  prod keys in vault
sync fetch   -->    queue stub          -->  workers + DLQ
console.log  -->    request ID          -->  alerts + dashboard
mock data    -->    contract tests      -->  tenant isolation CI
main push    -->    tag + checklist     -->  PRR sign-off

Week 0–1: secrets off client, staging env, health endpoint.
Week 2: async path for slowest feature, structured errors.
Week 3: alerts, runbook, rollback drill.
Week 4: Production Readiness Checklist score ≥ 40, cutover.

Do not big-bang rewrite—incrementally strangle demo paths behind feature flags until production paths serve 100% of traffic.

Staging fidelity checklist

Staging should fail for the same reasons production would—not because it is a toy environment:

Staging requirementWhy it matters
Same major versions (Node, Postgres, queue)"Worked in staging" must mean something
Anonymized copy of prod schemaMigration surprises surface early
Synthetic load test monthlyFind connection pool limits
Secrets distinct from prodPrevents accidental prod writes

Cutover week is the wrong time to discover staging used SQLite while production uses Postgres.

Feature flags for strangling demo code

Use flags like USE_PROD_WAREHOUSE_PATH default false in staging, true only after checklist pass. Remove the demo branch in the same PR that flips the flag in production—dead code rots and gets re-enabled by accident during the next vibe-coding sprint.

Code and Config Patterns

Env guard (fail deploy if demo secrets in prod)

// lib/env.ts
if (process.env.NODE_ENV === "production") {
  if (process.env.NEXT_PUBLIC_STRIPE_KEY) {
    throw new Error("prod system: client Stripe key forbidden");
  }
}

Route: demo path disabled in prod

export async function POST(req: Request) {
  if (process.env.USE_DEMO_MOCK === "true" && process.env.NODE_ENV === "production") {
    return Response.json({ code: "misconfigured" }, { status: 500 });
  }
  return realHandler(req);
}

Health check for prod system gate

export async function GET() {
  const checks = {
    database: await pingDb(),
    queue: await pingQueue(),
    secrets: !process.env.DATABASE_URL?.includes("localhost"),
  };
  const ok = Object.values(checks).every(Boolean);
  return Response.json({ ok, checks }, { status: ok ? 200 : 503 });
}

prod system CI should fail if health check passes while pointed at localhost dependencies.

Architecture Sketch

                    [Users]
                       |
              [CDN / edge TLS]
                       |
         +-------------+-------------+
         |                           |
    [Web app UI]              [API / BFF layer]
    (no secrets)              auth + validation
         |                           |
         |                    +------+------+
         |                    |             |
         |               [Sync API]    [Job queue]
         |                    |             |
         |                    +------+------+
         |                           |
         |                    [Workers / agents]
         |                           |
         +-------------+-------------+
                       |
            [Logs + metrics + alerts]
                       |
              [Prod DB / object store]
         (staging mirror for pre-prod)

The prod system boundary is the BFF: UI never talks to vendors or raw DB with demo credentials.

Readiness Scorecard

Rate demo → prod system cutover (1 point each):

CheckPass?
Staging env matches prod topology
Zero secrets in client bundle
Health check probes real deps
Async for slowest user path
Structured errors + request ID
Error-rate alert configured
Tenant isolation test in CI
Runbook + on-call named
Rollback tested once
Demo mock flags off in prod
Contract or smoke tests on deploy
Checklist score ≥ 40

10–12: cutover to prod. 7–9: limited beta on prod system with waivers. Below 7: stay on staging.

30-Day Cutover Plan

Weekprod system focus
1Secret store, staging, remove client keys, health
2Queue worker, migrate slowest route, structured logs
3Alerts, tenant tests, runbook, rollback drill
4Checklist sign-off, Production Readiness Review, DNS/traffic cutover

Cutover day: feature flag flips traffic to prod system paths; demo mocks disabled; on-call watches error budget for 24h.

Failure Modes

Failure 1: "Prod" is demo + custom domain

Same keys, same SQLite, no alerts. Fix: env separation layer 1.

Failure 2: Staging skipped

First prod bug hits paying users. Fix: staging mirrors prod; smoke tests on promote.

Failure 3: Async bolted on without DLQ

Failed jobs vanish. Fix: dead-letter + replay runbook in prod system queue layer.

Failure 4: Logs still printf debugging

Cannot trace user report to request. Fix: request ID middleware day one of cutover.

Failure 5: Rollback = revert UI only

API migration left prod DB incompatible. Fix: forward-only migration plan or dual-write window.

Operating Model

One prod system owner (can be founder):

  • Maintain cutover checklist in git; re-run on major releases
  • Weekly: staging vs prod config diff review
  • Block prod deploy if health check or contract tests red
  • After cutover: ten-minute error budget review daily for two weeks

InfiniSynapse Connection

For prod system paths that include long data-agent jobs, route analysis to InfiniSynapse Server API (SSE, workspace downloads) while your prod BFF keeps auth, rate limits, and task status—demo stack never calls InfiniSynapse with embedded keys in the browser.

See API Data Integration.

Case Study: Analytics Copilot Cutover

A vibe-coded analytics copilot ran entirely in one Next.js app: warehouse credentials in a server env file copied from Notion, synchronous SQL in route handlers, no staging.

prod system cutover over 28 days:

  • Staging on same host tier; secrets in Doppler; client bundle audit clean
  • Slow queries → Inngest worker + poll UI; p95 route time 8.4s → 420ms at edge
  • Request IDs + Axiom alerts; on-call rotation (founder + contractor)
  • Read-only warehouse role; tenant_id enforced in query wrapper + CI test
  • Demo USE_MOCK_DATA flag false in prod; health check fails if mock true

Results 30 days post-cutover:

  • Prod Sev-1 incidents: 3 (cutover week) → 0 (week 4)
  • User-visible timeouts (>30s): ~22/day → <2/day
  • Mean time to diagnose from user report: ~4h → ~18min (request IDs)
  • Warehouse cost from runaway queries: $1,840/mo spike → $290/mo (guards + async)
  • Beta NPS: 31 → 52
  • Checklist score at cutover: 43/48

Two weeks on staging felt slow; one untracked warehouse bill would have cost more than the delay.

Post-cutover monitoring window

Treat the first fourteen days after traffic moves to the production stack as elevated scrutiny:

  • Daily error budget review (even if informal)
  • Compare staging vs production config diff before each deploy
  • Freeze non-critical feature work—ops bandwidth goes to unknown unknowns
  • Document every incident in the runbook, even "user error," for pattern detection

Founders who skip this window often revert to demo habits ("hotfix in prod") under pressure.

Cost and capacity planning

Production stacks expose real bills: warehouse compute, object storage for uploads, queue workers. Before cutover, load-test the slowest path at 2× expected beta concurrency and read the invoice—not just the latency chart. Demo stacks hide cost until the first viral signup.

Document autoscaling limits in the runbook: max worker count, max warehouse slots, and who approves raising caps when marketing runs a launch promo.

Pre-Cutover Questions

Questionprod system pass
Can I diff staging vs prod env vars?Yes, documented
What happens if queue dies?Health 503 + alert
Demo mocks disabled in prod?Verified in CI
Who is on-call cutover night?Named
Rollback without DB corruption?Tested on staging

Frequently Asked Questions

Rewrite or same repo?

Same repo is normal—prod system is config, boundaries, and ops layers around existing vibe-coded code.

When is demo stack enough?

Internal-only, no customer data, no payments—until any of those flip, start prod system migration.

Serverless-only prod system?

Yes—queues at edge (Inngest, SQS), secrets in platform env, health on serverless functions; async still required.

Prod system vs production ready?

Production Ready is the API minimum bar; prod system is the full stack including workers, staging, and ops for the whole product.

First step today?

Create staging; move one secret off the client; add /health that fails on localhost DB URL.

Rotate API keys through a secret manager—never embed credentials in demo videos or client bundles.

Rotate API keys through a secret manager—never embed credentials in demo videos or client bundles.

Rotate API keys through a secret manager—never embed credentials in demo videos or client bundles.

Conclusion

A prod system is what lets the vibe-coded UI survive contact with real users: not prettier components—secrets, queues, logs, rollback, and a checklist you actually run.

Priority order: staging + secrets, health + async, alerts + runbook, checklist score, then traffic cutover.

Explore Production Readiness Checklist and this migration guide before the beta invite—not after the first outage thread.

Keep a printed cutover checklist during DNS flip night—laptop notifications fail when Slack is down.

Communication during cutover

Tell beta users the maintenance window, status page URL, and expected behavior if async jobs pause briefly. Silence during DNS flips generates support noise that drowns real incident signal— even a short post in your changelog channel reduces "is it down?" pings by half in our experience.

Prod System: Build Guide for AI Products