{"id":46748265,"url":"https://github.com/phishy/magicmeal","last_synced_at":"2026-03-09T20:18:27.338Z","repository":{"id":326733802,"uuid":"1104997854","full_name":"phishy/magicmeal","owner":"phishy","description":"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.","archived":false,"fork":false,"pushed_at":"2025-11-30T20:59:24.000Z","size":3509,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-01T22:09:27.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://magicmeal-gold.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phishy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTs.md","dco":null,"cla":null}},"created_at":"2025-11-27T01:52:40.000Z","updated_at":"2025-11-30T20:59:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/phishy/magicmeal","commit_stats":null,"previous_names":["phishy/magicmeal"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/phishy/magicmeal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishy%2Fmagicmeal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishy%2Fmagicmeal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishy%2Fmagicmeal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishy%2Fmagicmeal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phishy","download_url":"https://codeload.github.com/phishy/magicmeal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishy%2Fmagicmeal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-09T20:18:26.502Z","updated_at":"2026-03-09T20:18:27.323Z","avatar_url":"https://github.com/phishy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍽️ MagicMeal - A Self-Hosted Alternative\n\nAI-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.\n\n## 📸 Screenshots\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"img/screen-01.png\" alt=\"MagicMeal logging view\"\u003e\n        \u003cimg src=\"img/screen-01.png\" alt=\"MagicMeal logging view\" width=\"19%\" /\u003e\u003c/a\u003e\n  \u003ca href=\"img/screen-02.png\" alt=\"MagicMeal nutrition summary\"\u003e\n        \u003cimg src=\"img/screen-02.png\" alt=\"MagicMeal nutrition summary\" width=\"19%\" /\u003e\u003c/a\u003e\n  \u003ca href=\"img/screen-03.png\" alt=\"MagicMeal meal insights\"\u003e\n        \u003cimg src=\"img/screen-03.png\" alt=\"MagicMeal meal insights\" width=\"19%\" /\u003e\u003c/a\u003e\n  \u003ca href=\"img/screen-04.png\" alt=\"MagicMeal goals screen\"\u003e\n        \u003cimg src=\"img/screen-04.png\" alt=\"MagicMeal goals screen\" width=\"19%\" /\u003e\u003c/a\u003e\n  \u003ca href=\"img/screen-05.png\" alt=\"MagicMeal progress trends\"\u003e\n        \u003cimg src=\"img/screen-05.png\" alt=\"MagicMeal progress trends\" width=\"19%\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## ✨ Overview\n\nA modern, AI-powered food tracking app built with React Native and Expo. Track your meals effortlessly with barcode scanning and AI photo recognition.\n\n## ✨ Features\n\n- **📊 Daily Food Logging** - Track calories, protein, carbs, and fat\n- **📱 Barcode Scanner** - Scan food barcodes for instant nutrition lookup\n- **🤖 AI Photo Recognition** - Take a photo of your meal and AI identifies the food\n- **🔍 Food Database Search** - Search thousands of foods from Open Food Facts\n- **📈 Progress Tracking** - Monitor your daily nutrition goals\n\n## 🚀 Get Started\n\n### Prerequisites\n\n- Node.js 18+\n- npm or yarn\n- Expo CLI\n- iOS Simulator (Mac) or Android Emulator\n\n### Installation\n\n1. Install dependencies\n\n   ```bash\n   npm install\n   ```\n\n2. Start the app\n\n   ```bash\n   npx expo start\n   ```\n\n3. Set up Supabase (local backend)\n\n   ```bash\n   brew install supabase/tap/supabase   # or: npm install -g supabase\n   supabase login                       # first time only\n   supabase start\n   ```\n\n   The CLI uses `supabase/config.toml` and `supabase/migrations` to boot a local stack, apply migrations, and generate a `.env` file with the API URL and anon key. Copy those values into your Expo env file (see below) as `EXPO_PUBLIC_SUPABASE_URL` and `EXPO_PUBLIC_SUPABASE_ANON_KEY`. Keep the Supabase services running in a separate terminal while developing. If you need to reapply schema changes, run `supabase migration up`.\n\n4. Press `i` for iOS simulator or `a` for Android emulator\n\n## 🧠 AI Development Experiment\n\nMagicMeal 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.\n\n```mermaid\nflowchart TD\n    Idea[Issue / Spec] --\u003e Agent[Cursor cloud agent]\n    Agent --\u003e Code[Code changes + Supabase migrations]\n    Code --\u003e PR[GitHub PR]\n    PR --\u003e CopilotReview[Copilot review]\n    PR --\u003e Actions[GitHub Actions checks]\n    CopilotReview --\u003e Merge{Merge?}\n    Actions --\u003e Merge\n    Merge --\u003e Release[Expo build \u0026 Supabase branch rollout]\n```\n\n## 📸 AI Photo Recognition Setup\n\nThe app includes a **mock AI implementation** for meal photo recognition. To enable real AI analysis, integrate one of these services:\n\n### Option 1: OpenAI Vision API (Recommended)\nBest accuracy for food recognition.\n\n```bash\nnpm install openai\n```\n\nAdd to `app/photo-scanner.tsx`:\n```typescript\nimport OpenAI from 'openai';\n\nconst openai = new OpenAI({\n  apiKey: process.env.OPENAI_API_KEY,\n});\n\nconst analyzeImage = async (imageUri: string) =\u003e {\n  const response = await openai.chat.completions.create({\n    model: \"gpt-4-vision-preview\",\n    messages: [\n      {\n        role: \"user\",\n        content: [\n          { type: \"text\", text: \"Analyze this meal and provide: food items, calories, protein, carbs, fat for each item. Return as JSON array.\" },\n          { type: \"image_url\", image_url: { url: imageUri } }\n        ],\n      },\n    ],\n  });\n  // Parse response...\n};\n```\n\n### Option 2: Google Cloud Vision API\nGood for general food detection.\n\n```bash\nnpm install @google-cloud/vision\n```\n\n### Option 3: Clarifai Food Model\nSpecialized for food recognition.\n\n```bash\nnpm install clarifai\n```\n\n### Option 4: Custom TensorFlow Lite Model\nFor offline, privacy-first recognition.\n\n```bash\nnpm install @tensorflow/tfjs @tensorflow/tfjs-react-native\n```\n\n## 🗄️ Data Storage\n\nCurrently uses AsyncStorage for local data persistence. For production:\n\n### Add Cloud Sync (Optional)\n```bash\nnpm install @supabase/supabase-js\n# or\nnpm install firebase\n```\n\n### Add SQLite for Better Performance\n```bash\nnpx expo install expo-sqlite\n```\n\n## 🔑 API Keys Required\n\nCopy `env.example` to `.env` and fill in your keys:\n\n```bash\ncp env.example .env\n```\n\n```env\n# Supabase backend (generated after `supabase start`)\nEXPO_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321\nEXPO_PUBLIC_SUPABASE_ANON_KEY=your_local_anon_key\nSUPABASE_SERVICE_ROLE_KEY=your_local_service_role_key\n\n# For AI Photo Recognition\nOPENAI_API_KEY=your_key_here\n\n# Optional: Premium food database\nEXPO_PUBLIC_NUTRITIONIX_APP_ID=your_id_here\nEXPO_PUBLIC_NUTRITIONIX_APP_KEY=your_key_here\n\n# Optional: Sentry monitoring (keep blank/false for public forks)\nEXPO_PUBLIC_SENTRY_DSN=\nEXPO_PUBLIC_SENTRY_ENVIRONMENT=development\nEXPO_PUBLIC_SENTRY_ENABLE_LOGS=true\nEXPO_PUBLIC_SENTRY_SEND_DEFAULT_PII=false\nEXPO_PUBLIC_SENTRY_ENABLE_FEEDBACK=false\nEXPO_PUBLIC_SENTRY_ENABLE_REPLAY=false\nEXPO_PUBLIC_SENTRY_REPLAY_SAMPLE_RATE=0.1\nEXPO_PUBLIC_SENTRY_REPLAY_ON_ERROR_SAMPLE_RATE=1\n```\n\n## 📱 Features Roadmap\n\n- [x] Daily calorie tracking\n- [x] Barcode scanner\n- [x] AI photo recognition (mock)\n- [x] Food search\n- [ ] Real AI integration\n- [ ] Meal favorites \u0026 templates\n- [ ] Weight tracking\n- [ ] Progress charts\n- [ ] Custom food entry\n- [ ] Recipe builder\n- [ ] Water tracking\n- [ ] Exercise logging\n- [ ] Social features\n- [ ] Meal planning\n\n## 🎨 Tech Stack\n\n- **Framework**: React Native (Expo)\n- **Language**: TypeScript\n- **Routing**: Expo Router\n- **Storage**: AsyncStorage\n- **Camera**: expo-camera\n- **Barcode**: Built-in barcode scanner\n- **Image Picker**: expo-image-picker\n- **Food Database**: Open Food Facts API (free)\n\n\n\n## 📄 License\n\nAffero\n\n## 🤝 Contributing\n\nContributions welcome! This is an open-source project.\n\n### 🧾 Conventional Commits \u0026 Workflow\n\n- 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 in `types/index.ts`.\n- Husky automatically runs `commitlint` via the `commit-msg` hook, so commits created outside Commitizen (Cursor’s commit composer, VS Code Source Control, etc.) are still validated.\n- Recommended editor add-ons: *Conventional Commits* and *GitLens* (VS Code/Cursor) for inline history + message templates, plus keep ESLint warnings visible before committing.\n- 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 to `npm run commit` for quick access.\n\n### 🚀 Manual Releases (semantic-release)\n\n- 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.\n- The workflow relies on Conventional Commit history, so feel free to reword commits before merging to keep the log clean.\n- Release automation is disabled by default—no tags are created until you explicitly trigger the workflow_dispatch run.\n\n## 📞 Support\n\nOpen an issue on GitHub for bug reports or feature requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphishy%2Fmagicmeal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphishy%2Fmagicmeal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphishy%2Fmagicmeal/lists"}