Development of AI Meal Planner for PatriEats by Patricia OsorioDevelopment of AI Meal Planner for PatriEats by Patricia Osorio

Development of AI Meal Planner for PatriEats

Patricia Osorio

Patricia Osorio

PatriEats

A personalised AI meal planner for plant-based eaters. Set your diet, goals, and preferences — the app generates a 7-day meal plan, tracks your pantry, and produces a shopping list for what's missing. Save any AI-generated meal you love with one click; future plans get smarter every time you do.

MVP Features

# Feature Description 1 Auth Sign in with Google via Firebase 2 Preferences Diet type, calorie target, excluded ingredients, free-text notes 3 Meal Plan Generator 7-day plan via Claude Sonnet, tabbed day view with nutrition strip 4 My Recipes Save any AI-generated meal with one click into your personal collection 5 Pantry + Shopping List Maintain pantry items; get a "what's missing" list on plan generation 6 Personalisation Behaviour signals feed a taste profile injected into every generation prompt

Stack

Layer Technology Frontend Next.js 15 (App Router), TypeScript strict, Tailwind CSS v4, ShadCN/UI, TanStack Query v5, Firebase Auth, React Hook Form + Zod Backend FastAPI, Pydantic v2, SQLAlchemy 2.0 async (asyncpg), Alembic AI — Generation Anthropic Claude Sonnet (vivid descriptions, strict JSON output) AI — Retrieval Gemini 2.0 Flash File Search (global + per-user recipe corpora) AI — Embeddings Gemini text-embedding-004 → pgvector (recipe semantic search only) Database PostgreSQL 16 + pgvector extension Cache Redis via Upstash (rate limiting) Auth Firebase Authentication (Google OAuth) Infra Google Cloud Run (API), Firebase Hosting (frontend), Cloud SQL, GCS, Secret Manager

Prerequisites

Python 3.12+
Node.js 20+
Docker + Docker Compose
A Firebase project with Google OAuth enabled
A Firebase service account JSON (download from Firebase console → Project Settings → Service Accounts)

Local Setup

1. Clone the repo


2. Backend environment


Edit backend/.env and fill in your values:

Place your Firebase service account file at backend/firebase-service-account.json (git-ignored).

3. Frontend environment


Edit frontend/.env.local:

4. Start the database


This starts PostgreSQL 16 with the pgvector extension available on localhost:5432.

5. Backend — install dependencies & run migrations


This creates all 9 tables and enables the vector extension:
Table Purpose users Created on first Firebase login user_preferences Diet type, calorie target, exclusions meal_plans Full 7-day plan JSON blobs generated_meals Individual meals flattened from each plan (queryable rows) user_recipes Saved recipes — bookmarked AI meals (+ pgvector embedding column) pantry_items User's pantry shopping_lists Auto-generated "what's missing" lists user_signals Append-only behaviour event log (powers personalisation) user_taste_profiles Materialised taste profile rebuilt from signals; injected into every Claude prompt

6. Frontend — install dependencies


Running Locally

Option A — separate processes (recommended for development)

Option B — Docker Compose (full stack)

Then open:

Project Structure


Database Migrations


API Overview

All endpoints require Authorization: Bearer {firebase_id_token}.

Build Status

Phase Status Phase 1 — Foundation (auth, health, DB, login page) ✅ Done Phase 2 — Data layer (all tables, migrations, preferences, pantry) 🔄 In progress Phase 3 — AI core (retrieval, generation, personalisation pipeline) ⬜ Pending Phase 4 — Meal plan UI (cards, tabs, bookmark flow) ⬜ Pending Phase 5 — Recipes, shopping, full signal coverage ⬜ Pending Phase 6 — Production deploy (Cloud Run, Cloud SQL, Firebase Hosting) ⬜ Pending
Like this project

Posted Apr 10, 2026

Developed a personalized AI meal planner app for plant-based diets.