← All templates

Calorie Counter

Health & Fitness · React + Node (Express) · 18 @molecule/* packages

MyFitnessPal-like calorie tracker with food database, barcode scanning, macros, and daily nutrition goals — with built-in Stripe-backed subscription tiers

Open in Molecule

What is inside

  • auth
  • search
  • notifications
  • charts
  • date-range
  • subscriptions

Screens (15)

  • Landing /
  • Login /login
  • Signup /signup
  • ForgotPassword /forgot-password
  • ResetPassword /reset-password
  • Today /today (signed in)
  • LogFood /log (signed in)
  • FoodDetail /food/:id (signed in)
  • Progress /progress (signed in)
  • Goals /goals (signed in)
  • Settings /settings (signed in)
  • Recipes /recipes (signed in)
  • RecipeDetail /recipes/:id (signed in)
  • WeightTracking /weight (signed in)
  • Onboarding /onboarding (signed in)

Data model (9 tables)

  • devices — id, createdAt, updatedAt, userId, name, pushPlatform, pushSubscription, hasPushSubscription
  • diary_entries — id, user_id, date, meal_type, food_id, food_name, servings, serving_unit, …
  • foods — id, user_id, name, brand, category, barcode, calories, protein, …
  • nutrition_goals — id, user_id, calories, protein, carbs, fat, fiber, sodium, …
  • payments — id, createdAt, updatedAt, userId, transactionId, productId, platformKey, data, …
  • saved_meal_items — id, meal_id, food_id, servings, serving_unit, sort_order, created_at
  • saved_meals — id, user_id, name, total_calories, total_protein, total_carbs, total_fat, created_at, …
  • weight_logs — id, user_id, weight_kg, recorded_at, notes, created_at, updated_at
  • notification_preferences — id, user_id, meals, water, streak, weekly, created_at, updated_at

API (7 handlers)

  • diary api/src/handlers/diary.ts
  • foods api/src/handlers/foods.ts
  • goals api/src/handlers/goals.ts
  • meals api/src/handlers/meals.ts
  • notification-preferences api/src/handlers/notification-preferences.ts
  • nutrition api/src/handlers/nutrition.ts
  • weight api/src/handlers/weight.ts

Subscription tiers

free / pro / team — gated by: maxDiary, maxFoods, maxGoals, maxMeals, maxNutrition, advancedFeatures, canExport, retentionDays

Built from 18 @molecule/* packages

Browse all @molecule/* packages →

Required secrets

  • DATABASE_URL PostgreSQL connection string
  • MEILISEARCH_API_KEY Meilisearch API key
  • VAPID_PUBLIC_KEY VAPID public key for push notifications
  • VAPID_PRIVATE_KEY VAPID private key for push notifications

The @molecule/* packages are Apache-2.0. The app you build from this template is yours to export and self-host. Licensing