Chuyển đến nội dung

Mẫu Sức khoẻ & Thể hình

Morsel AI Calorie Tracker App

An Expo / React Native calorie and macro tracker: photograph a meal or describe it, review the AI estimate, log it, and follow a plan worked out from the person's answers. Runs on sample data until you connect Supabase.

  • 19 màn hình
  • iOS & Android
  • Dữ liệu mẫu
  • Cập nhật 4 thg 11, 2026
  • Bản phát hành đã kiểm tra

Sao chép miễn phí · Toàn bộ mã nguồn · Không cần thẻ

Màn hình

6 màn hình từ ứng dụng thực tế.

Có gì bên trong

  1. Meal photo, nutrition label and text estimates through Gemini, called from the included Supabase Edge Function
  2. Review screen before logging: confidence in words, editable portions, remove with undo, add foods
  3. Plan computed on the device (Mifflin-St Jeor): daily kcal, macros, goal date and a weekly projection
  4. Barcode lookup through Open Food Facts plus a built-in list of common foods for search
  5. Progress: weight trend against the goal, 7-day calories, macro averages, streak calendar, insights
  6. AI coach that answers from the person's last seven days (Pro only, enforced on the server)

Giới thiệu mẫu

Overview

Morsel is a calorie and macro tracker built on Expo SDK 57 and React Native with the FluxNative kernel. A person answers a short onboarding, gets a daily calorie and macro target worked out on the phone, then logs meals by photo, nutrition label, barcode, text description or search.

With .env blank the app runs in sample mode: a sample person six weeks into a plan, two weeks of meals with photos, weigh-ins and an 11-day streak. Sample AI answers come from the device and are labelled as samples. Setting the Supabase values switches every service to the backend with no code change.

Key features

  • Today: kcal left beside one ring, compact protein, carbs and fat tiles, the meals of the day with photos, water glasses and the streak

  • Scan tab: camera with meal, barcode and label modes, photo library, and a describe-in-words option; the free scans left are shown

  • Review meal: the dish, confidence (high, medium, low), kcal and macros, a short AI note, each food with a portion stepper, the meal slot

  • Meal and food detail: change a portion, swap a food for a close one, move to another meal, favourite, delete

  • Progress: weight line with the goal, a weigh-in sheet that updates the plan, calories against the target, a streak calendar

  • Coach: a chat that sends the last seven days of totals and dish names with the question

  • You: targets, units, meal and weigh-in reminders as local notifications, Pro status, Delete my data, About, Terms and Privacy

Screens

28 screens: Welcome, eight one-question onboarding steps with large option cards, Your plan, Pro paywall, Today, Progress with a log-weight sheet, Scan, Review meal, Meal, Edit food, Add food search, Describe a meal, the add-food sheet, Coach, You, Goals and targets, Reminders, About, Terms of Use and Privacy Policy. Light and dark schemes; iOS Liquid Glass chrome.

AI and backend

  • One Supabase Edge Function (ai) runs three tasks with Gemini: analyze-meal (2 units, photo or label), describe-meal (1 unit) and coach-reply (1 unit, Pro only)

  • Each request takes units from a daily allowance kept in Supabase; units are given back when a task fails

  • People are signed in anonymously; meals, meal items, weigh-ins and the profile live in Postgres tables with row-level security

  • Scanned meal photos are kept in a private storage bucket and shown through signed URLs

  • The app asks once before the first AI call and names what is sent; Delete my data removes the backend rows and AI files

  • Calorie and macro targets are arithmetic on the device; no AI is used for them

Monetisation

Morsel Pro is a subscription sold through the App Store and Google Play with RevenueCat (react-native-purchases): a yearly plan with a 3-day trial and a weekly plan. Pro raises the AI allowance and unlocks the coach and all insights. Without RevenueCat keys the paywall shows sample prices and the line "Subscriptions open in the App Store version" and never grants access. A RevenueCat webhook function writes Pro to Supabase so the server allowance follows the purchase.

Setup

  • Connect Supabase, apply the two migrations and enable anonymous sign-ins

  • Add GEMINI_API_KEY and deploy the ai function, with your own daily unit limits

  • Connect RevenueCat to sell Pro and deploy the webhook

  • Replace the name, icon, colours and legal pages

aicalorie trackermacro trackernutritionmeal scannergeminisupabaserevenuecatreact nativeexpoiosandroid

Bạn nhận được

  • Toàn bộ mã nguồn — Expo và React Native bằng TypeScript, là một ứng dụng trong không gian làm việc của bạn.
  • Xem trước trực tiếp — thử mọi thay đổi ngay trên trình duyệt hoặc điện thoại.
  • Bản phát hành đã kiểm tra — biên dịch được và mọi màn hình mở không lỗi.
  • Trợ lý AI — đổi mọi thứ bằng chat; mỗi thay đổi dùng credit.
  • Bản dựng và tải lên cửa hàng — bản dựng iOS và Android, gửi lên App Store và Google Play từ Xuất bản.
  • Sao chép không tốn credit — bản thân việc sao chép không mất credit nào.

Được làm bằng phiên bản FluxNative hiện tại.

Bạn cần

  • Tài khoản FluxNative — gói Free chứa tối đa 2 ứng dụng.
  • Không cần backend để bắt đầu — chạy bằng dữ liệu mẫu cho đến khi bạn kết nối backend của mình.
  • Gói Creator trở lên — để dựng bản native và tải lên cửa hàng.
  • Tài khoản cửa hàng — Apple Developer Program (99 USD/năm) và Google Play (25 USD một lần), để xuất bản.

Mã nguồn có gì

màn hình
19
file trong bản sao
382
dòng code viết riêng cho ứng dụng
7.828
component giao diện có sẵn
142

Ngôn ngữ trong ứng dụng: Tiếng Anh và Tiếng Việt

Công nghệ

Expo SDK
57.0.22
React Native
0.86.3
React
19.2.8
TypeScript
6.0.3
Expo Router
57.0.21
Supabase JS
2.112.3
RevenueCat
10.9.1

Từ package.json của bản phát hành này.

Hệ thống thiết kế

Tiêu đề
Phông hệ thống
Nội dung
Phông hệ thống
  • Chế độ sáng và tối
  • Liquid Glass
  • Nút bo tròn
  • Thẻ nổi

Thiết lập sau khi sao chép

Bản sao của bạn mở cùng trợ lý AI đã xây nó. Làm các bước theo thứ tự: kết nối những gì từng bước yêu cầu trong Máy chủ, rồi gửi từng câu lệnh.

  1. Connect Supabase

    Server › Backend › Supabase. Apply both migrations in supabase/migrations, turn on anonymous sign-ins in the Supabase dashboard, and write the project URL and anon key to .env. The app then reads and writes your database instead of the sample log.

    Câu lệnh cho AI

    Connect this app to my Supabase project from Server › Backend › Supabase. Write EXPO_PUBLIC_SUPABASE_URL and EXPO_PUBLIC_SUPABASE_ANON_KEY to .env. Apply supabase/migrations/20261019000000_ai_kit.sql and then supabase/migrations/20261019010000_morsel.sql. Remind me to turn on Authentication › Sign In / Providers › Allow anonymous sign-ins in the Supabase dashboard, because the app signs people in anonymously. Then check that Today loads with an empty log and that onboarding saves a row in profiles.

  2. Turn on the AI

    Server › API keys & secrets: add GEMINI_API_KEY, deploy the ai function and the webhook function Pro uses, and set AI_FREE_UNITS_PER_DAY and AI_PRO_UNITS_PER_DAY. Morsel's free plan is 6 units a day: 3 photo scans (2 units each).

    Câu lệnh cho AI

    Turn on Morsel's AI. Ask me to add GEMINI_API_KEY under Server › API keys & secrets, then set AI_FREE_UNITS_PER_DAY=6 (3 photo scans a day) and AI_PRO_UNITS_PER_DAY=500 there. Deploy the Supabase Edge Functions ai and revenuecat-webhook (revenuecat-webhook with JWT verification off) and push the secrets. Invoke ai with { "task": "usage" } as a test user to confirm it answers, then scan a meal in the app and confirm the review shows a real estimate instead of the sample line.

  3. Sell Morsel Pro

    Server › Monetization: create the yearly (3-day trial) and weekly products, the RevenueCat entitlement pro and an offering, add the public SDK keys, and set the webhook with REVENUECAT_WEBHOOK_SECRET so Pro reaches the server.

    Câu lệnh cho AI

    Set up Morsel Pro through RevenueCat from Server › Monetization. Create a yearly subscription with a 3-day free trial and a weekly subscription in App Store Connect and Google Play, an entitlement named pro and a current offering with both packages. Write EXPO_PUBLIC_REVENUECAT_IOS_KEY and EXPO_PUBLIC_REVENUECAT_ANDROID_KEY to .env. Save a long random REVENUECAT_WEBHOOK_SECRET under Server › API keys & secrets, push it to the revenuecat-webhook function, and tell me the webhook URL and Authorization header to enter in RevenueCat › Integrations › Webhooks. Update PLAN_PREVIEW in src/services/iap/index.ts to match my prices.

  4. Check the camera, barcodes and reminders on a phone

    The camera, barcode reading and reminder notifications run only in a phone build; the browser preview shows a labelled sample plate. Build once and try a scan, a barcode and a reminder.

    Câu lệnh cho AI

    Make a phone build of Morsel and walk me through checking the parts the browser preview cannot run: allow the camera and scan a meal, switch to Barcode and scan a packaged food (Open Food Facts lookup), photograph a nutrition label, and turn on a meal reminder in You › Reminders to confirm the notification permission prompt and a scheduled reminder.

  5. Set your icon, store IDs and legal pages

    Change the app name, bundle ID, icon, brand colour and legal pages: EXPO_PUBLIC_PRIVACY_POLICY_URL, EXPO_PUBLIC_TERMS_URL and EXPO_PUBLIC_SUPPORT_URL, and the in-app Terms and Privacy text.

    Câu lệnh cho AI

    Rebrand this Morsel template as my app. Change the name and slug in app.json and the bundle ID and Android package, replace assets/icon.svg and assets/adaptive-icon.svg with my icon and render the PNGs, and set brandSeed in src/theme/brand.ts to my colour (keep primary buttons ink). Write my EXPO_PUBLIC_PRIVACY_POLICY_URL, EXPO_PUBLIC_TERMS_URL and EXPO_PUBLIC_SUPPORT_URL to .env, and rewrite src/features/legal/TermsScreen.tsx and PrivacyScreen.tsx with my company's terms. Replace the word Morsel in on-screen copy, notifications and the AI prompts in the server's ai function (functions/ai/tasks.ts).

Cách dùng mẫu này

  1. Dùng mẫu để có một bản sao chỉnh sửa được, kèm mã nguồn, trong không gian làm việc của bạn (Mẫu).
  2. Nhờ trợ lý AI thay đổi những gì bạn muốn, bằng lời thường (Làm việc với trợ lý).
  3. Xem thử từng thay đổi trong bản xem trước trực tiếp, hoặc trên điện thoại (Xem trước).
  4. Từ gói Creator trở lên, build cho iOS và Android rồi gửi lên các cửa hàng (Tổng quan phát hành).

Giấy phép và hỗ trợ

Giấy phép

Ứng dụng được tạo cho bạn là của bạn; mã của mẫu vẫn thuộc InspireUI và được cấp phép để dùng trong các ứng dụng của bạn (Điều khoản › Sở hữu trí tuệ của chúng tôi).

Trợ giúp

  • Hướng dẫn về template, trợ lý và xuất bản.
  • Liên hệ hỗ trợ từ Trợ giúp; thường phản hồi trong 1–2 ngày làm việc.
  • Trong bản sao của bạn, hỏi trợ lý AI về bất kỳ màn hình hay tệp nào.

Do FluxNative tạo

Chính sách hỗ trợ

Câu hỏi

Có miễn phí không?

Sao chép template miễn phí không mất gì, kể cả credit; template Premium mua một lần cho mỗi website. Đổi bằng chat và bản dựng dùng credit.

Tôi sở hữu gì?

Bạn sở hữu ứng dụng được tạo cho bạn. Mã của template vẫn thuộc InspireUI và được cấp phép dùng trong ứng dụng của bạn (Điều khoản › Quyền sở hữu trí tuệ của chúng tôi).

Tôi có cần biết code không?

Không. Nhờ trợ lý đổi bằng lời thường; có toàn bộ mã nguồn khi bạn cần.

Có kèm backend không?

Không. Ứng dụng đầy đủ nêu backend cần dùng và bạn kết nối backend của mình trong Máy chủ; bản thiết kế chạy bằng dữ liệu mẫu.

Tôi đổi được thiết kế không?

Được. Tab Thiết kế đặt màu thương hiệu, màu sắc, phông chữ và bo góc mà không tốn credit; trợ lý đổi phần còn lại.

Cần gói nào để xuất bản?

Gói Creator trở lên dựng và tải lên cửa hàng, bằng tài khoản Apple và Google của bạn. Ứng dụng từ template Premium dựng được ở mọi gói khi đã kết nối website.

Tôi tải được mã nguồn không?

Được, bằng Tải mã nguồn hoặc Đẩy lên GitHub, khi không gian làm việc của bạn đã mua gói, credit hoặc template trả phí. Ứng dụng từ template Premium cũng cần kết nối website.

Nếu nó được tạo bằng FluxNative cũ hơn thì sao?

Bản sao của bạn vẫn chạy bình thường. Nhờ trợ lý cập nhật để có tính năng mới như ngôn ngữ và tiền tệ của ứng dụng; đó là bước thiết lập cuối.

Sẵn sàng biến mẫu này thành ứng dụng của bạn?

Bắt đầu từ Morsel AI Calorie Tracker App và thay đổi mọi thứ qua chat. Bản sao của bạn có đầy đủ mã nguồn.

Sao chép miễn phí. Không cần thẻ tín dụng.

Taking a little longer than usual…

Loading FluxNative