Skip to main content

MoMeals

"The Food Log" — "I remember what you ate"

Status: ❌ Future

MoMeals will handle meal logging and food diary functionality.


Purpose

  • Log meals and snacks
  • Search food database
  • Scan barcodes
  • Save favorite meals
  • Track meal timing

Data Model

interface MealLog {
id: string;
userId: string;
date: Date;
mealType: MealType;
time: string; // "12:30"

foods: FoodItem[];

// Totals
totalCalories: number;
totalProtein: number;
totalCarbs: number;
totalFat: number;

notes: string | null;
createdAt: Date;
}

interface FoodItem {
id: string;
foodId: string; // Reference to food database
name: string;
servingSize: number;
servingUnit: string;

calories: number;
protein: number;
carbs: number;
fat: number;
fiber: number | null;
}

type MealType =
| 'breakfast'
| 'lunch'
| 'dinner'
| 'snack'
| 'pre_workout'
| 'post_workout';

Features

Quick Add Methods

MethodUse Case
SearchFind food by name
BarcodeScan packaged foods
RecentQuick re-log recent foods
FavoritesSaved frequent meals
RecipesMulti-ingredient meals

Food Database

Sources:

  • USDA FoodData Central
  • Open Food Facts
  • User-submitted foods

Planned API Endpoints

EndpointMethodDescription
/api/mealsGETGet meals for date
/api/mealsPOSTLog a meal
/api/meals/:idPATCHUpdate meal
/api/meals/:idDELETEDelete meal
/api/foods/searchGETSearch food database
/api/foods/barcode/:codeGETLookup by barcode

Implementation Tasks

  • Design meals and food_items tables
  • Integrate food database API
  • Build meal logging UI
  • Implement barcode scanner
  • Create favorites/recent system
  • Build recipe builder