{"id":48470461,"url":"https://github.com/jacobstephens2/macrotracker","last_synced_at":"2026-04-07T06:05:13.312Z","repository":{"id":346168212,"uuid":"1188767462","full_name":"JacobStephens2/MacroTracker","owner":"JacobStephens2","description":"A self-hosted PWA for tracking daily macronutrients and calories, built as a MyFitnessPal replacement. Features meal logging, food search via Open Food Facts and USDA APIs, barcode scanning, recipe management, weight tracking, and CSV export — with a TypeScript/Vite frontend and a Node.js/Express/SQLite backend.","archived":false,"fork":false,"pushed_at":"2026-03-31T13:10:50.000Z","size":848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-31T15:12:43.023Z","etag":null,"topics":["barcode-scanner","calorie-tracker","express","macro-tracker","nodejs","nutrition","pwa","recipe-manager","self-hosted","sqlite","typescript","vite","weight-tracker"],"latest_commit_sha":null,"homepage":"https://macros.stephens.page","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JacobStephens2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-03-22T15:01:10.000Z","updated_at":"2026-03-31T13:10:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/JacobStephens2/MacroTracker","commit_stats":null,"previous_names":["jacobstephens2/macrotracker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JacobStephens2/MacroTracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobStephens2%2FMacroTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobStephens2%2FMacroTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobStephens2%2FMacroTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobStephens2%2FMacroTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobStephens2","download_url":"https://codeload.github.com/JacobStephens2/MacroTracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobStephens2%2FMacroTracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["barcode-scanner","calorie-tracker","express","macro-tracker","nodejs","nutrition","pwa","recipe-manager","self-hosted","sqlite","typescript","vite","weight-tracker"],"created_at":"2026-04-07T06:05:12.217Z","updated_at":"2026-04-07T06:05:13.305Z","avatar_url":"https://github.com/JacobStephens2.png","language":"TypeScript","readme":"# Macro Tracker\n\nA self-hosted macronutrient tracking PWA built to replace MyFitnessPal. Track daily carbs, protein, fat, and calories with per-meal breakdowns, food search, barcode scanning, recipe management, and weight tracking over time.\n\nLive at **https://macros.stephens.page**\n\n## Features\n\n- **Daily macro dashboard** — calorie ring, carbs/protein/fat progress bars with remaining totals, per-meal targets with color coding\n- **Meal logging** — breakfast, lunch, dinner, snacks with per-meal subtotals\n- **Food search** — combo search across Open Food Facts and USDA FoodData Central APIs\n- **Barcode scanner** — scan packaged foods using device camera\n- **Custom foods** — create your own foods with manual macro entry, auto-calculated calories\n- **Recipes** — build from ingredients or enter macros manually, custom serving units\n- **Weight tracking** — log weight with trend chart (Chart.js)\n- **Copy previous day** — one-tap meal duplication for repetitive diets\n- **Tap to edit, swipe to delete** — touch-friendly meal management\n- **CSV export** — download meal logs and weight data\n- **Dark mode** — automatic via `prefers-color-scheme`\n- **Email/password auth** — with email verification and password reset (Mandrill SMTP)\n- **PWA** — installable, service worker for fast loading, TWA-ready for Google Play\n\n## Tech Stack\n\n- **Frontend:** TypeScript, Vite, Chart.js, html5-qrcode, vite-plugin-pwa\n- **Backend:** Node.js, Express, better-sqlite3, JWT (httpOnly cookies), bcrypt, nodemailer\n- **Hosting:** Apache (reverse proxy), Let's Encrypt SSL, systemd\n\n## Development\n\n```bash\n# Frontend\nnpm install\nnpm run dev          # Vite dev server on :5173, proxies /api to :3457\n\n# Server\ncd server\nnpm install\nnpx tsc              # Compile TypeScript\nnode dist/index.js   # Runs on :3457\n```\n\nEnvironment variables for the server (set in systemd service or `.env`):\n\n| Variable | Description |\n|---|---|\n| `JWT_SECRET` | Secret for signing JWTs |\n| `PORT` | Server port (default: 3457) |\n| `SMTP_HOST` | SMTP server hostname |\n| `SMTP_PORT` | SMTP server port |\n| `SMTP_USER` | SMTP username |\n| `SMTP_PASS` | SMTP password |\n| `SMTP_FROM` | From email address |\n| `APP_URL` | Public URL (for email links) |\n| `USDA_API_KEY` | USDA FoodData Central API key |\n| `FATSECRET_CLIENT_ID` | FatSecret Platform API client ID |\n| `FATSECRET_CLIENT_SECRET` | FatSecret Platform API client secret |\n\n## Deploy\n\n```bash\n# Frontend\nnpm run build\nsudo cp -r dist/* /var/www/macros.stephens.page/\n\n# Server\ncd server\nnpx tsc\nsudo systemctl restart macros-api\n```\n\n## License\n\nPersonal project. Not licensed for redistribution.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobstephens2%2Fmacrotracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobstephens2%2Fmacrotracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobstephens2%2Fmacrotracker/lists"}