Case study — Cooksy

From photo to plate.

A full-stack cooking platform built solo, end to end — web, mobile, Postgres backend, and a server-side AI gateway. Shipped to a real domain, not a demo.

Next.js 15FlutterSupabaseClaude
518Recipes live
138Cuisines
113Countries
SoloWeb + mobile + backend
Shakshuka in a cast-iron pan — from photo to plate
01 — Problem

Recipe apps are either a dead recipe dump or a diet tracker wearing a chef's hat.

Nobody combines hands-free guided cooking, a real global recipe library, and AI that turns "here's a photo" or "here's my fridge" into something cookable tonight — plus a pantry that plans your week and writes the shopping list for you.

Cooksy does all four on one data model: web on Next.js 15, mobile in Flutter, Supabase Postgres underneath, and every AI call routed through a server-side gateway.

02 — The product

Five things it
actually does

Cooksy Guided Cook Mode — full-screen step view with a built-in timer
01

Guided Cook Mode

Full-screen, one step at a time, so the phone stays out of your hands while the pan is hot.

  • Built-in multi-timer — pasta and sauce running concurrently.
  • Live serving-size scaling across every ingredient.
  • One step on screen at a time, hands-free by design.
Cooksy AI Dish-from-Photo — camera capture identifying cacio e pepe with a 96% match
02

AI Dish-from-Photo

Snap a food photo and Claude identifies the dish, states its confidence, and returns a complete structured recipe with timed steps.

  • Dish identification with an explicit confidence value.
  • Full structured recipe, not a text blob.
  • Timed steps that feed straight into Cook Mode.
Cooksy AI Recipes-from-Ingredients — pantry ingredient picker
03

AI Recipes-from-Ingredients

Give it what is in your kitchen plus constraints — time, diet, cuisine — and get three to five ranked ideas back.

  • Ranked results rather than one take-it-or-leave-it answer.
  • Missing-ingredient callouts on every suggestion.
  • Constraints for time, diet and cuisine.
Cooksy Pantry & AI Weekly Planner — 7-day meal grid with money saved and pantry stats
04

Pantry & AI Weekly Planner

"Plan my week with AI" builds a 7-day breakfast, lunch and dinner grid from your actual pantry, prioritizing ingredients about to expire.

  • Shopping list derived by subtracting what you own from what the week needs.
  • No hallucination in the list — it is computed in SQL from the plan.
  • Daily digest push when tomorrow's meal is missing an ingredient.
Cooksy Community & World Recipes — six-continent recipe feed
05

Community & World Recipes

Publish, save, rate and follow, on top of a curated global library rather than an empty feed waiting for users.

  • 518 recipes live across 6 continents.
  • 138 cuisines, 113 countries.
  • FCM push on Android, iOS and web.
03 — How I work

Plan, generate,
implement, audit

Solo across product decisions, architecture, data model, UI/UX, and both codebases — built AI-accelerated, as a repeatable method rather than a gimmick.

01Written planFeature spec, architecture doc and data model, written before any code.
02Prompt seriesDesign system → screens → payments, notifications and motion spec.
03Design systemTokens and components generated as a production system, not a mockup.
04ImplementBuilt against that system directly in both codebases with Claude Code.
05Self-auditProduct and security review across gateway, mobile, web and Supabase.
Closing the loop

I run my own audits. A self-directed product and security review across the AI gateway, mobile, web, and Supabase advisors turned into a 17-task tiered fix plan — fully executed.

Design output gets the same treatment. Iteration runs on named feedback — "this reads as a generic SaaS table, make it editorial" — rather than accepting first-pass output.

04 — Under the hood

The gateway is
the whole trick

Every AI call is a Next.js API route — never a client-side key. The pipeline below is what makes the AI features trustworthy and cheap to run, not just impressive.

AI gateway pipeline
01JWT verifiedServer-side route; no AI key ever reaches the client.
02Quota enforcedPlan-aware, via ai_quota_remaining() in Postgres.
03CacheIdentical requests served from cache rather than regenerated.
04GenerationAgainst a strict JSON schema — OpenAI primary, Claude fallback.
05Zod validationOne retry on schema violation before failing.
06LoggedEvery user-facing AI call recorded.

Week planning fans out on top of it: one whole-week planning call plus seven parallel per-day recipe calls, assembled server-side.

Postgres + RLS throughout

Security-definer functions audited and fixed after a linter pass; foreign-key indexes added for performance.

Background jobs on pg_cron

Hourly missing-ingredient reminders, daily expiry checks, daily renewal notices — verified firing in production, not just scheduled.

One analytics contract

The Flutter app mirrors the web event funnel event-for-event into a single PostHog dashboard.

Deployed for real

Next.js on a VPS behind Docker, nginx and TLS via Cloudflare DNS-01 and certbot, custom domain, ~20s deploy through a small Python/paramiko script.

Regional payments

Free tier with AI quotas; Pro paid through eSewa and Khalti — Nepal's dominant mobile wallets — rather than a copy-paste Stripe integration.

05 — Post-launch

Three things found
after shipping

01
Everyone was on the paid planRevenue leak

A stale test migration had silently put every user on the paid plan with no expiry — both a revenue and an AI-cost leak.

Fix — Found and reverted the migration.

02
A seed script that could not re-runSchema drift

The seed script could never be safely run a second time, making environment rebuilds unreliable.

Fix — Made it idempotent so re-seeding is a non-event.

03
A view with no migration behind itSchema drift

A security-definer view existed only in the live database, with nothing in version control that would recreate it.

Fix — Brought it back under migration so the live schema and the repo agree.

06 — Real numbers

Live, and counted

518Recipes live
138Cuisines
113Countries
6Continents
Live on a real domain

Next.js on a VPS behind Docker, nginx and TLS. Not a preview link.

Push verified on device

Android build signed and FCM push confirmed landing on a physical device.

Payments for the actual market

eSewa and Khalti, because that is who the market is.

07 — What's next

What's shipped and what isn't, stated plainly.

Payments completionThe eSewa and Khalti flows are integrated; the full paid-tier loop is not finished.
Recipe photographyThe library needs real photography rather than placeholder imagery.
App store submissionThe Android build is signed and verified on device; store submission is still ahead.

From photo to plate, end to end.