# Design a calorie tracking app like MyFitnessPal: system design interview question

> A large food catalog with portion conversions, stable meal history, and consistent edits across devices.

Source: https://sysround.com/questions/design-calorie-tracking-app-like-myfitnesspal
Updated: 2026-11-05


Difficulty: medium. Levels: Mid-level, Senior.

## How the interviewer opens it

"Design an app that lets users log meals, search for foods, and track daily nutrition goals. The app needs a large food catalog and consistent logs across devices."

## What to clarify first

- Scale
- Read and write mix
- Food catalog
- History and goals
- Consistency across devices
- Offline use
- Latency
- Retention and durability
- Dates and travel
- Scope and accounts

## Scope of a strong answer

Core requirements:

- Search for foods by name or brand
- Add, edit, and delete meal entries with a food amount
- Compare daily calories, protein, carbohydrates, and fat with daily goals
- Keep each user's logs consistent across devices

Usually out of scope:

- Food recognition from photos
- Recipe nutrition calculations
- Medical advice
- Wearable imports
- Account creation

## What interviewers probe

### Food amounts and past meals

Food records use different units and portions. Catalog corrections must not change nutrition in past meals.

### Changes from two devices

Retries can duplicate meals. Concurrent edits can erase changes that another device already saved.

### Daily totals and dates

Edits can affect two dates. Travel and time zone changes must not silently move meals or change past goals.

### Food search

Many foods have similar names and different portions. Search must handle incomplete text without separating results from valid catalog records.

## Common mistakes

- The design treats a serving as a universal unit instead of a food-specific amount.
- The server recalculates past meals from the latest catalog values.
- The server allows retries to create duplicate meal entries.
- The server silently overwrites edits from another device.
- The design adds asynchronous daily totals without a consistency rule or repair plan.
- The server uses the account's current time zone to assign dates to all past entries.

## The bar by level

- **Mid-level:** The candidate defines the food, entry, and goal models. The design calculates portions correctly and preserves past nutrition. The server uses conditional edits and calculates daily totals from committed entries.
- **Senior:** The candidate handles durable retries, delete conflicts, and goal history. The design separates search freshness from diary consistency. The candidate uses the storage estimate to justify partition choices.

Practice this question with an AI interviewer: https://sysround.com/practice/new?problem=nutrition-tracking


---
SysRound (https://sysround.com) is an AI practice tool for system design interviews. It has a voice or typed AI interviewer and a shared whiteboard. At the end, you get feedback on each skill and a model answer. The AI feedback can be wrong.
