WhatToCook — AI Recipes from What You Have

Project Info

  • Client Self-funded SaaS
  • Year 2026 → present
  • Category SaaS / AI Cooking
  • Stack Next.js 16 (App Router), React 19, TypeScript, Tailwind v4, Prisma 7 + Postgres (@prisma/adapter-pg), NextAuth v5 (JWT, Google + Credentials), Expo (mobile placeholder), WayForPay, npm workspaces monorepo
  • AI Claude Vision — receipt OCR, product extraction, and recipe generation in one pipeline

Project Description

WhatToCook is a credit-based SaaS that turns whatever's in your kitchen into recipes you can actually cook tonight. Users add ingredients three ways — snap a grocery receipt, photograph individual products, or just type them in — and the service returns personalized step-by-step recipe suggestions matched against a curated recipe database. Scanning is free; generating a recipe costs one credit. New accounts get three credits free, then top up with packs (10 / 50 / 100) via WayForPay.

Architecture: a TypeScript npm-workspaces monorepo with a Next.js 16 App Router app at apps/web, a shared packages/shared for cross-client types and constants, and an Expo placeholder under apps/mobile. All endpoints are Next route handlers (not server actions) so the same surface works for the web dashboard and a future mobile client — auth in API routes flows through a getUserId() helper that checks the NextAuth session first and falls back to a Bearer token. Persistence is Prisma 7 against Postgres via @prisma/adapter-pg.

The interesting parts: a single Claude Vision pipeline does both the OCR (extracting product names from receipts or photos) and the recipe synthesis, with the per-user pantry maintained as PantryItem rows that the recipe prompt reads at generation time. WayForPay integration uses the same HMAC-MD5-signed-callback pattern used in MyCalendar and BrandChecker, and a small cron endpoint (POST /api/cron/cleanup, protected by a shared secret) sweeps stale uploads and request records.

WhatToCook — AI recipe discovery from your ingredients