AI-powered πͺ calorie tracker π₯ for food, weight βοΈ, blood pressure β€οΈ, and recipe tracking π³ β built with React Native + Expo. Track your meals effortlessly with barcode scanning and AI photo recognition.
A modern, AI-powered food tracking app built with React Native and Expo. Track your meals effortlessly with barcode scanning and AI photo recognition.
- π Daily Food Logging - Track calories, protein, carbs, and fat
- π± Barcode Scanner - Scan food barcodes for instant nutrition lookup
- π€ AI Photo Recognition - Take a photo of your meal and AI identifies the food
- π Food Database Search - Search thousands of foods from Open Food Facts
- π Progress Tracking - Monitor your daily nutrition goals
- Node.js 18+
- npm or yarn
- Expo CLI
- iOS Simulator (Mac) or Android Emulator
-
Install dependencies
npm install
-
Start the app
npx expo start
-
Set up Supabase (local backend)
brew install supabase/tap/supabase # or: npm install -g supabase supabase login # first time only supabase start
The CLI uses
supabase/config.tomlandsupabase/migrationsto boot a local stack, apply migrations, and generate a.envfile with the API URL and anon key. Copy those values into your Expo env file (see below) asEXPO_PUBLIC_SUPABASE_URLandEXPO_PUBLIC_SUPABASE_ANON_KEY. Keep the Supabase services running in a separate terminal while developing. If you need to reapply schema changes, runsupabase migration up. -
Press
ifor iOS simulator orafor Android emulator
MagicMeal doubles as an ongoing AI-first development experiment. We lean on Cursor cloud agents for day-to-day implementation workβthey can open PRs, take ownership of GitHub issues, and update Supabase schemas by editing migrations directly from the repo. Copilot handles pull-request reviews for an automated second set of eyes, while comprehensive GitHub Actions checks keep merges safe. For database work, we spin up Supabase branches to preview schema changes end-to-end before shipping. This workflow lets us prototype quickly while keeping architectural decisions and quality controls auditable.
flowchart TD
Idea[Issue / Spec] --> Agent[Cursor cloud agent]
Agent --> Code[Code changes + Supabase migrations]
Code --> PR[GitHub PR]
PR --> CopilotReview[Copilot review]
PR --> Actions[GitHub Actions checks]
CopilotReview --> Merge{Merge?}
Actions --> Merge
Merge --> Release[Expo build & Supabase branch rollout]
The app includes a mock AI implementation for meal photo recognition. To enable real AI analysis, integrate one of these services:
Best accuracy for food recognition.
npm install openaiAdd to app/photo-scanner.tsx:
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
const analyzeImage = async (imageUri: string) => {
const response = await openai.chat.completions.create({
model: "gpt-4-vision-preview",
messages: [
{
role: "user",
content: [
{ type: "text", text: "Analyze this meal and provide: food items, calories, protein, carbs, fat for each item. Return as JSON array." },
{ type: "image_url", image_url: { url: imageUri } }
],
},
],
});
// Parse response...
};Good for general food detection.
npm install @google-cloud/visionSpecialized for food recognition.
npm install clarifaiFor offline, privacy-first recognition.
npm install @tensorflow/tfjs @tensorflow/tfjs-react-nativeCurrently uses AsyncStorage for local data persistence. For production:
npm install @supabase/supabase-js
# or
npm install firebasenpx expo install expo-sqliteCopy env.example to .env and fill in your keys:
cp env.example .env# Supabase backend (generated after `supabase start`)
EXPO_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_local_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_local_service_role_key
# For AI Photo Recognition
OPENAI_API_KEY=your_key_here
# Optional: Premium food database
EXPO_PUBLIC_NUTRITIONIX_APP_ID=your_id_here
EXPO_PUBLIC_NUTRITIONIX_APP_KEY=your_key_here
# Optional: Sentry monitoring (keep blank/false for public forks)
EXPO_PUBLIC_SENTRY_DSN=
EXPO_PUBLIC_SENTRY_ENVIRONMENT=development
EXPO_PUBLIC_SENTRY_ENABLE_LOGS=true
EXPO_PUBLIC_SENTRY_SEND_DEFAULT_PII=false
EXPO_PUBLIC_SENTRY_ENABLE_FEEDBACK=false
EXPO_PUBLIC_SENTRY_ENABLE_REPLAY=false
EXPO_PUBLIC_SENTRY_REPLAY_SAMPLE_RATE=0.1
EXPO_PUBLIC_SENTRY_REPLAY_ON_ERROR_SAMPLE_RATE=1- Daily calorie tracking
- Barcode scanner
- AI photo recognition (mock)
- Food search
- Real AI integration
- Meal favorites & templates
- Weight tracking
- Progress charts
- Custom food entry
- Recipe builder
- Water tracking
- Exercise logging
- Social features
- Meal planning
- Framework: React Native (Expo)
- Language: TypeScript
- Routing: Expo Router
- Storage: AsyncStorage
- Camera: expo-camera
- Barcode: Built-in barcode scanner
- Image Picker: expo-image-picker
- Food Database: Open Food Facts API (free)
Affero
Contributions welcome! This is an open-source project.
- Run
npm run commit(Commitizen) to get a guided prompt for the conventional commit message (type(scope): subject). Keep scopes aligned with top-level folders (e.g.,types,supabase,services) so shared types stay centralized intypes/index.ts. - Husky automatically runs
commitlintvia thecommit-msghook, so commits created outside Commitizen (Cursorβs commit composer, VS Code Source Control, etc.) are still validated. - Recommended editor add-ons: Conventional Commits and GitLens (VS Code/Cursor) for inline history + message templates, plus keep ESLint warnings visible before committing.
- Typical flow:
git pullβ build/test changes βnpm run lintβ stage files βnpm run commitβ push + open PR. Cursor users can also bind a custom slash command tonpm run commitfor quick access.
- When youβre ready to tag a build, open GitHub β Actions β Manual Release workflow β Run workflow. It inspects commits since the last tag, bumps the version, updates
CHANGELOG.md, and cuts a GitHub Release. - The workflow relies on Conventional Commit history, so feel free to reword commits before merging to keep the log clean.
- Release automation is disabled by defaultβno tags are created until you explicitly trigger the workflow_dispatch run.
Open an issue on GitHub for bug reports or feature requests.




