About Services Testimonials Blog Case Studies Careers Contact

Case Study: How We Turned a Vibe-Coded MVP Into a ProductionReady Product in 72 Hours

TL;DR: A founder came to us with a food nutrition tracker built entirely through AI prompts. It looked great in demos but broke in production. We fixed the architecture, scaled the infrastructure, and designed automations — turning it into a real product serving thousands of users. Here's exactly how.

The Problem

A solo founder had an idea: a PWA that lets users snap a photo of their food and instantly get calorie and macro breakdowns using AI vision. He did what everyone's doing in 2025 — he vibe coded it. Sat down with Claude, described what he wanted, and in a few hours had a working prototype. Camera captures, AI food recognition, nutrition tracking, charts, offline support — the whole thing. It looked incredible in the demo. Then real users showed up.

  • API keys were hardcoded in frontend JavaScript
  • The Claude Vision API was being called with no rate limiting — one viral tweet and the bill would be catastrophic
  • No error boundaries — one failed scan crashed the entire app
  • IndexedDB had no migration strategy — schema changes would wipe user data
  • The service worker cached aggressively but had no cache-busting — users were stuck on old versions
  • Auth tokens were stored with no expiry validation client-side
  • No input sanitization on the backend — every endpoint was an injection risk
  • Zero observability — when things broke, nobody knew why

The app wasn't bad. The architecture was. This is the gap that vibe coding creates. AI is exceptional at generating functional code. It is not exceptional at generating production-grade systems.

What We Did

We operate in three lanes: Fix, Scale, Automate. This project needed all three.

Lane 1: Fix — Security, Stability, and Data Integrity

Week 1. The foundation work nobody sees. Security audit and remediation:

  • Moved all API keys to server-side environment config with proper secret management
  • Added rate limiting (30 scans/hour per IP, sliding window)
  • Implemented input validation and sanitization on every endpoint
  • Added CORS restrictions — the wildcard * had to go
  • JWT tokens now validate expiry client-side before making requests
  • Added CSP headers, XSS protection, and secure cookie flags

Error handling overhaul:

  • Wrapped every API call in proper try/catch with user-friendly error messages
  • Added fallback states — camera permission denied? Show upload button. API down? Queue for retry.
  • Backend returns structured error responses instead of raw stack traces

Data layer hardening:

  • Built IndexedDB migration system — schema changes without data loss
  • Added data export/import for backup before any migration
  • Implemented optimistic UI updates with rollback on failure

The founder's reaction: "I didn't even know half of these were problems." That's the point. Vibe coded apps don't fail loudly. They fail at 2 AM when your biggest customer's data disappears.

Lane 2: Scale — From "Works on My Machine" to "Works for 10,000 Users"

Week 2. Making it real. Backend infrastructure:

  • Containerized the FastAPI backend with Docker — consistent deploys, zero "works on my machine" issues
  • Set up a proper CI/CD pipeline: push to main → run tests → build container → deploy to staging → promote to production
  • Added a CDN for static assets — the 250KB frontend now loads in under 1 second globally
  • Implemented Redis caching for OpenFoodFacts API responses — 80% of food searches hit cache, saving 400ms per request

Frontend performance:

  • Lazy-loaded Chart.js — only downloaded when user navigates to stats (saves 70KB on first load)
  • Implemented image compression pipeline: photos resize to 1024px and compress to JPEG 0.75 before upload — 85% reduction in upload size
  • Added service worker versioning with cache-busting — users always get the latest version within 24 hours

Database scaling:

  • Migrated from SQLite to PostgreSQL for the cloud sync backend
  • Added connection pooling and query optimization
  • Set up automated daily backups with point-in-time recovery

Monitoring and observability:

  • Structured logging with request tracing
  • Health check endpoints with dependency status
  • Error tracking with alerting — we know about issues before users report them
  • API response time dashboards — p50, p95, p99

The numbers after scaling:

Metric Before After
First load 3.2s 0.8s
Food scan (end-to-end) 8s 3.1s
API error rate \~12% 0.3%
Concurrent users supported \~50 10,000+
Monthly infrastructure cost $0 (broken) $47

Lane 3: Automate — Systems That Run Themselves

Week 3. The multiplier. This is where most agencies stop. Fix the code, scale the server, hand over the keys. We don't stop there because the founder is still a solo operator. If we leave, the system slowly degrades. So we build automations. Deployment automation:

  • Git push to main triggers the full pipeline — no manual deploys, ever
  • Staging environment auto-deploys on PR creation for testing
  • Database migrations run automatically with rollback capability

Content and data automation:

  • OpenFoodFacts database syncs nightly — new products available without manual updates
  • Nutrition data validation pipeline flags suspicious AI responses (e.g., a salad returning 2,000 calories) before they reach the user
  • Automated weekly data exports for analytics

Operational automation:

  • SSL certificates auto-renew
  • Log rotation and cleanup runs daily
  • Performance regression alerts — if p95 response time exceeds 5s, the team gets notified
  • Automated dependency updates with security scanning — vulnerabilities flagged within hours of disclosure

User lifecycle automation:

  • Inactive user re-engagement triggers (7-day, 14-day, 30-day)
  • Streak milestone notifications
  • Weekly nutrition summary generation

The founder now spends zero hours on infrastructure. The system monitors itself, heals itself, and alerts him only when a human decision is needed.

The Result

Before us: A impressive demo that couldn't survive contact with real users. After us: A production-grade product that runs autonomously, serves thousands, and costs less than a nice dinner per month to operate. The founder went from debugging server crashes at midnight to focusing entirely on growth and user feedback. He shipped three new features in the month after we finished — because he finally had a foundation that could support them.

The Bigger Picture

We're seeing this pattern every week now. Someone builds something remarkable with AI in a weekend. It genuinely works. The logic is sound, the UX is good, the idea has legs. But between "it works on my laptop" and "it works for paying customers" is a canyon. That canyon is what we bridge. Vibe coding isn't the problem. It's the most significant democratization of software creation we've ever seen. Non-technical founders are building things that would have cost $50K and taken three months — in an afternoon. But AI generates code the way a brilliant junior developer writes code. It solves the immediate problem well. It doesn't think about what happens when the database has a million rows, or when three users hit the same endpoint simultaneously, or when someone puts a <script> tag in the food name field. That's where experienced engineers come in. Not to replace the vibe coding — to elevate it.

What We Offer

  • Fix — Security audits, error handling, data integrity, code review for AI-generated codebases. We find the landmines before your users do.
  • Scale — Infrastructure design, CI/CD pipelines, performance optimization, monitoring. We take your prototype and make it handle real traffic.
  • Automate — Deployment automation, operational workflows, data pipelines, lifecycle triggers. We build systems that run without you.

We don't rewrite your code. We respect what AI helped you build. We make it production-grade. If you've built something with AI and you're wondering whether it's ready for real users — it probably isn't. But it's closer than you think. Let's talk. Captainweb We turn vibe-coded prototypes into production-grade products. Fix. Scale. Automate.