About MacroIndex
MacroIndex is built for fast daily macro tracking. Log food quickly, set goals once, and keep your progress visible without extra clutter.
Daily macro tracking with goal history.
Quick add, saved foods, and meal logging.
OCR label scanning with confidence indicators.
AI-assisted nutrition lookup and voice logging.
Legal
Wellness estimate disclaimer
MacroIndex provides general nutrition estimates for wellness and educational use. It is not medical advice, does not diagnose or treat conditions, and does not replace care from a licensed clinician or dietitian.
Add to Home Screen
iPhone / iPad (Safari)
- Open MacroIndex in Safari.
- Tap the Share button.
- Select "Add to Home Screen", then tap Add.
Android (Chrome)
- Open MacroIndex in Chrome.
- Tap the menu (three dots).
- Select "Install app" or "Add to Home screen".
Changelog
Current release: v1.5.8
v1.5.8 · 2026-02-27
Added
- Sentry logging and profiling controls for Flask app startup:
- Added
SENTRY_ENABLE_LOGStoggle (defaults to enabled whenSENTRY_DSNis set). - Added
SENTRY_PROFILE_SESSION_SAMPLE_RATEfor profiling session sampling. - Added
SENTRY_PROFILE_LIFECYCLEwith validated values (trace/manual, defaulttrace).
Changed
- Updated Sentry documentation and environment examples:
.env.examplenow includes logging + profiling environment variables.README.mdnow documents Sentry logs/profiling settings and sample values.
v1.5.7 · 2026-02-27
Added
- Optional Sentry monitoring integration for the Flask app factory.
- Initializes only when
SENTRY_DSNis configured. - Uses conservative defaults (
send_default_pii=false,traces_sample_rate=0.05). - Supports
SENTRY_ENVIRONMENT,SENTRY_TRACES_SAMPLE_RATE,SENTRY_MAX_REQUEST_BODY_SIZE, and optionalSENTRY_RELEASE. - AI/OCR observability upgrades across Ask AI, Voice, and OCR scan routes:
- Added handled-error reporting hooks to Sentry for Ask AI/Voice/OCR fallback and error paths.
- Added OCR operation status/latency/request-size/error metadata in
ocr_scan_logs. - Expanded OCR metadata to include
engine_version,attempt_count,result_completeness,http_status,normalized_request_bytes,original_request_bytes, andfailure_code. - Switched OCR log storage to metadata-only and removed raw provider payload persistence (
provider_response) fromocr_scan_logs. - Added Sentry event scrubbing for common sensitive fields (
query,transcript,details, tokens, emails). - Added custom Sentry route tags + transaction names for
ask_ai_submit,voice_command, andscan_post. - Added automatic release fallback to
RENDER_GIT_COMMITwhenSENTRY_RELEASEis not set. - Added optional
APP_VERSIONSentry tag to correlate events with changelog versions.
Changed
- Added
sentry-sdkto Python dependencies. - Updated voice-command error responses to avoid leaking raw exception text to users.
- Updated docs/env examples for Sentry +
APP_VERSIONusage. - Set
SENTRY_ENVIRONMENT=productioninrender.yamlfor production deployments.
v1.5.6 · 2026-02-26
Changed
- Ask AI page UI alignment and action styling updates:
- Query actions now align right with
Clearleft ofAsk AI. - Result action rows are right-aligned.
- Renamed
Quick add itemstoQuick-add. Quick-addnow uses the same purple treatment asAsk AI.Save as Foodswitched to white button styling.Quick-addremains the far-right action in save rows.- Ask AI assumptions presentation:
- Converted assumptions list to a collapsed expansion panel.
- Label updated to
AI assumptions. - Ask AI state and submit UX:
- Entering Ask AI from another page now clears stale prior query/result state unless intentionally prefilled.
- Starting a new Ask AI query now hides previous results immediately while processing.
- Ask AI live progress visibility:
- Added SSE progress endpoint for Ask AI stage updates (
/foods/ask-ai/progress/<progress_id>). - Purple loading indicator now shows server-driven progress stages for
query,estimate, andretryactions. - Existing POST + redirect behavior is preserved (no functional flow change to save/finalize paths).
- Today log Ask AI sheet parity improvements:
- Updated Ask AI sheet controls and button ordering to match Ask AI page styling patterns.
- Added live SSE stage text to the sheet’s purple loading indicator.
- Right-aligned sheet action rows and ensured
Quick-addis the far-right action. - Ask AI result action buttons in the Today sheet now stay on a single horizontal row on mobile (no stacked/piled layout).
- Added a collapsed
AI assumptionsexpansion panel in the Today sheet to match Ask AI page reasoning/caret behavior.
v1.5.5 · 2026-02-25
Added
- In-app feedback intake system for authenticated users:
- Added submission flow at
/feedback/newwith minimal fields (type,description, optional screenshot). - Added user history page at
/feedback/minewith mobile-first card layout and status visibility. - Added admin triage pages at
/admin/feedbackand/admin/feedback/<id>for filtering, review, and status updates.
Changed
- Admin management and discoverability:
- Centralized admin management on
/admin. - Moved invite-only signup controls and invite whitelist management to the admin page.
- Moved admin API key generation/revocation controls to the admin page.
- Added
Adminnavigation links (desktop nav, mobile nav panel, and mobile more-actions sheet). - Added an
Open admin settingsshortcut on the profile page for admins. - Updated admin page information architecture and styling so access controls, API keys, and feedback triage are grouped in one place.
- Simplified feedback schema and UX to remove low-signal end-user fields:
- Removed title, repro steps, expected behavior, actual behavior, severity, feature-use-case, who-it-helps, and usage-frequency from active feedback workflow.
- Admin search now targets feedback description + user email.
- Ask AI and Voice quantity handling is now app-driven and more reliable:
- Guardrail scope detection now better accepts counted food phrases (for example:
5 olives,2 pieces of toast) while preserving strict out-of-scope blocking for non-nutrition intents. - Voice transcript forwarding now preserves richer dictated text so Ask AI receives the intended phrase content.
- Ask AI item cards now display
Serving usedso users can verify quantity pickup before saving. - Updated Ask AI save behaviors for quantity-aware workflows:
Save as Foodnow stores foods as one-serving definitions while keeping macros scaled to the requested quantity for that saved record.Save as Mealcontinues to persist item-level serving multipliers in meal breakdowns.- New
Quick add itemsaction now creates each parsed item as a food and immediately logs separate entries to Today with the requested multi-servings applied.
Removed
- Removed legacy profile-based admin POST endpoints:
/profile/api-keys/new/profile/api-keys/<id>/revoke/profile/invite-only/profile/invite-emails/add/profile/invite-emails/<id>/remove- Removed stale README guidance that said admin options were in profile.
Database
- Cleaned
app_feedbackpersistence model to keep only active fields: - Retained: user linkage, type, description, status/priority, metadata, screenshot path, admin notes/response, timestamps.
- Removed legacy feedback columns no longer used by the app flow.
Testing
- Verified admin behavior and permissions after consolidation:
pytest tests/test_admin.py->2 passed- Verified Ask AI + voice + quick-add quantity flow behavior:
pytest tests/test_ai.py->15 passedpytest tests/test_foods.py tests/test_tracking.py->5 passed
v1.5.4 · 2026-02-16
Changed
- OCR scan flow now uses server-only image normalization for all browsers.
- Removed client-side file rewriting/compression in
/scanto avoid Safari-specific upload fragility. - Large image normalization now resizes only when needed and preserves OCR fidelity by using PNG for transformed images.
- OCR retry classification narrowed to transient failures instead of broad runtime exceptions.
Fixed
- Fixed OCR strict-ceiling behavior so request threads are no longer vulnerable to blocking on executor shutdown after timeout.
- Improved calorie fallback parsing to avoid selecting unrelated large numbers (for example sodium/mg values) when calorie labels are ambiguous.
- Added Google Vision provider response size capping/sanitization before persistence to reduce log bloat and over-retention risk.
- Added lightweight OCR route diagnostics (
request_id, preprocess metrics, provider/confidence, failure class) to improve Render incident visibility.
Testing
- Expanded OCR reliability coverage with explicit tests for
429, slow OCR ceiling handling, and malformed OCR output behavior. - OCR test suite now passes with the new scenarios:
pytest -q tests/test_ocr.py->9 passed.
Investigated
- Investigated reported AI instability and latency concerns during this cycle; no app-side regression was identified in the touched OCR/scan paths.
- Current evidence suggests the observed AI inconsistency was upstream model behavior rather than an application logic fault.
v1.5.3 · 2026-02-16
Added
- Comprehensive QA/testing harness and documentation:
- New pytest suite across auth, foods, meals, tracking, AI, OCR, API, admin, security, and performance smoke.
- Offline-first stubs and network guard for OpenAI/OCR test isolation.
- Session-spooling load tooling and hobby-plan simulation reporting under
docs/testing/. - Request correlation IDs in app responses via
X-Request-IDfor easier production incident tracing.
Changed
- AI/OCR reliability hardening:
- Bounded retry with exponential backoff + jitter for idempotent upstream AI/OCR operations.
- Strict request-thread ceilings with graceful fallback behavior when upstream calls are slow/unavailable.
- Added route-level AI/OCR abuse controls:
- Per-user and global rate limits for
/foods/ask-ai,/foods/voice-command, and/scan.
Fixed
- Fixed concurrent Ask AI cache write races by making cache upserts conflict-safe on
chatgpt_foods.canonical_query. - Reduced likelihood of long blocking requests on AI/OCR routes causing degraded user experience under upstream timeout/429 scenarios.
v1.5.2 · 2026-02-16
Added
- SEO foundation for public pages:
- Dynamic meta description, canonical URL, Open Graph, and Twitter cards in the base template.
- Structured data (
WebSite+SoftwareApplication) on the landing page. - Public crawler endpoints:
/robots.txtand/sitemap.xml.
Changed
- Voice capture flow now stays active until the user taps Stop listening.
- Voice submission flow now sends captured transcript on stop (including buffered interim transcript text when available).
- Public-page SEO metadata now defaults to indexable settings while authenticated/private app surfaces default to noindex.
- Schema sizing updated for user-generated content:
foods.name->VARCHAR(512)meals.name->VARCHAR(512)food_tags.name->VARCHAR(255)chatgpt_foods.reason_not_verified->TEXT
Fixed
- Fixed Ask AI cache writes that could 500 due to long
reason_not_verifiedstrings exceeding column limits. - Added defensive truncation/normalization on AI cache string writes to match DB limits for title/source fields.
- Added Postgres startup column-type migration steps so deployed databases auto-align to updated field sizes.
- Reduced SEO discoverability gaps by adding canonical/metadata and crawl directives to public routes.
v1.5.1 · 2026-02-15
Added
- Profile data portability tools:
Download my data (JSON)export action scoped to the signed-in user.Delete account and all dataaction with explicit typed confirmation (DELETE MY ACCOUNT).- Backend export payload builder for user-owned records (foods, logs, meals, goals, water/weight, supplements, OCR/AI logs, OAuth identities, and related metadata).
- Backend hard-delete flow for account removal that clears user-linked data and logs the user out.
Changed
- Profile page now includes a dedicated Your data section and a Danger zone section for privacy-control actions.
/todayinstall card visibility handling now toggles thehiddenattribute in addition to CSS class toggling to prevent spacing artifacts.
Fixed
- Fixed OCR calorie parsing for labels where calories are followed by serving text and percent markers (example pattern:
Calories 1 package 110 % Daily Value). - Fixed desktop top-spacing inconsistency on
/todayafter interacting with install prompt UI. - Fixed residual vertical gap caused by hidden install-card elements participating in section spacing utilities.
v1.5.0 · 2026-02-15
Added
- Public marketing landing page for logged-out users with feature sections and real product screenshots.
- Dedicated legal document pages and markdown-driven legal content loader (
Terms,Privacy,AI Disclosure,Cookie Notice). - Persistent policy assent capture on signup/onboarding, including acceptance timestamps, versions, IP, and user-agent metadata.
- Desktop authenticated nav actions for
Ask AIandScanwith icon affordances. - One-time Postgres cleanup script for legacy OpenAI payload columns:
scripts/drop_openai_payload_columns.py.
Changed
- OpenAI transaction logging is now metadata-only (status, latency, byte counts, provider request id, token usage).
- About page reorganized into clearer sections (product overview, legal, install guidance, and changelog).
- Today page install prompt UX refined (smaller card, dismiss button, "do not show again", and install guidance link).
- PWA standalone behavior now repurposes bottom-bar Voice slot to open Ask AI flow.
- Landing screenshots now display in phone-style frames with lightbox expansion and no image cropping.
Fixed
- Supplements bulk action now preserves clicked submit button intent during AJAX (
Mark all taken/Clear all). - OCR entry-point copy now reflects camera support (
Browse files + take a photo). - In-product AI/OCR/voice disclosure coverage expanded to avoid missing compliance context in key flows.
- Desktop top-nav overflow adjusted so Ask AI and Scan remain visible at common widths.
v1.4.0 · 2026-02-15
Added
- Google OAuth sign-in flow with OIDC callback handling and account identity linking.
- Password reset system with one-time expiring tokens, forgot/reset screens, and Resend email delivery.
- OAuth link confirmation step for existing email/password users (requires password before linking Google).
- Profile "Connected accounts" section with Google linked/not-linked status.
- Today page Ask AI bottom-sheet experience with save-to-food/save-to-meal logging back into Today.
- Global scan-label bottom-sheet from the mobile toolbar across authenticated surfaces.
- First-log coachmark guidance (
log first food!) for onboarding-to-first-entry handoff. - Onboarding "Target setup" toggle with Assisted goals vs Set your own goals.
- Onboarding custom macro fields plus optional water-goal and supplements capture.
- Release-grade smoke test script:
scripts/smoke_test_release_1_4_0.py.
Changed
- Login and signup pages now support Google sign-in entry points when Google OAuth is configured.
- Apple OAuth is now gated by
APPLE_OAUTH_ENABLEDso it can stay off by default until intentionally enabled. - Ask AI trigger on Today now uses modal trigger semantics instead of tab semantics.
- Onboarding submit now locks on first submit and shows
Saving...to prevent duplicate submissions. - Docker Compose runtime now includes password-reset mail env vars (
RESEND_API_KEY,MAIL_FROM,APP_BASE_URL,PASSWORD_RESET_TOKEN_MINUTES). - Onboarding copy/flow now emphasizes immediate logging and includes non-medical wellness-estimate framing.
- Assisted onboarding target math now factors current weight, goal weight, and activity level more directly.
- Foods and Meals top sections were aligned for a more consistent header/action layout pattern.
- Ask AI sheet interaction polish: clearer loading state and better action sequencing back to Today.
Fixed
- Corrected Google link behavior so existing password accounts are not silently linked.
- Fixed password reset delivery path in Docker runtime by forwarding required env vars to the web container.
- Resolved Resend API
403 error code: 1010behavior in runtime requests by sending explicit API headers. - Improved first-link QA reliability by exposing OAuth link state in Profile and expanding reset script cleanup coverage.
- Prevented voice-trigger usage while users are still in onboarding flow.
- Fixed coachmark visibility/positioning issues across mobile and desktop, including interaction-driven hide/show behavior.
v1.3.2 · 2026-02-12
Added
- Header brand update: replaced text wordmark with the horizontal MacroIndex logo in the top toolbar.
- Ask AI source links now render as compact source chips with readable host labels and external-link affordance.
- Weight progress now reflects progress toward goal using start-to-goal journey math (supports both gain and loss goals).
Changed
- Updated README Latest Release pointer to
v1.3.2. - Water consumed slider accent color now matches the Fat macro color token (
#9fb3d9) for visual consistency. - Voice overlay helper copy simplified by removing the microphone permission status line under the voice bubble.
- Quick-add suggested foods (empty search) now returns a shorter top list (3 items) for faster selection.
- Toolbar logo asset updated with transparent background to avoid navbar color mismatch.
Fixed
- Accessibility semantics improved across key templates (label/input bindings, keyboard behavior, and dialog handling).
- Added destructive-action confirmation coverage for entry/meal/profile management flows.
- Improved mobile/overlay interaction quality with better focus management and escape handling.
- Mobile overflow issues caused by long names were hardened across Today entries, supplements, meals, meal detail, and Ask AI item rows.
- Weight logging now overwrites the existing value for the same day instead of creating duplicate same-day entries.
v1.3.1 · 2026-02-12
Added
- Voice logging overlay with start/stop controls, transcript preview, and confirmation flow.
- Two-step voice confirmation for all voice actions before any data is written.
- Combined voice action support in one utterance:
- saved food + tracking updates (water and/or supplements)
- quick add macros + tracking updates
- Desktop voice trigger button in the top navigation.
- Animated voice ring feedback while listening/speaking.
- Auto-run Ask AI lookup when voice-confirmed redirect is selected.
Changed
- Mobile sticky action bar behavior and spacing for better usability and reduced overlap.
- Bottom action active-state logic now syncs with route/hash changes more reliably.
- Voice confirmation copy now uses a cleaner, human-style action summary (removed confidence diagnostics from UI).
- Voice parser prompt/schema expanded to extract multiple action slots in a single pass.
- Supplement-only voice phrases are now treated as valid in-scope nutrition logging commands.
Fixed
- Voice stop/start no longer reuses prior transcript or stale pending confirmations.
- Improved microphone permission handling and error messaging for browser/OS edge cases.
- Food fuzzy matching now has stricter guardrails to prevent incorrect same-brand matches.
- Serving extraction now avoids misreading unrelated numbers (for example water ounces) as servings.
- Ask AI redirect from voice now immediately starts processing after navigation.
v1.3.0 · 2026-02-09
Added
- Ask AI nutrition flow powered by OpenAI Responses API with structured JSON output and optional web search.
- Per-request OpenAI audit logging in
openai_transaction_logs, including successful calls, failures, and preflight-blocked requests. - Multi-item Ask AI UX improvements:
- item-level macro chips for each returned item,
- item include/exclude checkboxes,
- live macro/name recalculation for selected items,
- save as
Food(aggregate) orMeal(individual foods + meal container). - Rejected Ask AI queries now render a clear red-tinted user message for inappropriate/out-of-scope requests.
- New read-only admin API endpoints:
/api/meals/api/meal_items/api/ocr_scan_logs/api/openai_transaction_logs/api/chatgpt_foods- Render deployment support and runbook artifacts (
render.yaml,RENDER_CUTOVER_RUNBOOK.md) plus migration/smoke scripts for PostgreSQL cutover.
Changed
- Rebranded app/product naming from MacroLedger to MacroIndex across app UI, templates, docs, and metadata.
- Docker/runtime updated for production-style startup with Gunicorn (
--preload) and managed PostgreSQL-first deployment. - Ask AI fallback behavior simplified to OpenAI-first flow, with explicit estimate confirmation when official verification is unavailable.
- Food creation/editing standardized to fixed serving text (
1 serving) while keeping optional grams/ounces amount inputs. - Meal editing flow simplified to implicit
1.0servings per meal item and cleaner meal edit UI. - Navbar/mobile navigation refined for better density and high-traffic access (including mobile
Foodsaction).
Removed
- Open Food Facts integration and related scheduler/import/API/runtime/UI paths.
- Nutrition adapter subsystem from active runtime and codebase:
- removed adapter resolver files and smoke script,
- removed adapter model/bootstrap hooks.
- Ask AI stale-cache manual refresh button from UI and its now-unused route handler.
- Legacy/duplicate utility paths and stale code branches superseded by current Ask AI flow.
Fixed
- Improved reliability around startup schema races by preloading app before worker fork.
- Hardened migration robustness for SQLite -> PostgreSQL copy with safer table ordering and FK sanitization behavior.
- Ask AI response normalization and blocked-request handling consistency.
v1.2.2 · 2026-02-08
Added
- Today page customization dropdown under the calendar to hide/show Weight, Water, and Supplements per user.
- Per-user persistence for Today section visibility.
- Meals: create meals and add foods with servings.
- Food notes and optional grams/oz fields.
- Loading indicators for Today AJAX updates and food search.
- Meals list search, mobile card layout, and macro totals display.
- Meals in Today search with logging as a single meal entry.
- Meal entries tracked in logs with
meal_id.
Changed
- Today entry edit control now uses a stable toggle + inline form instead of the details element.
- Quick lookup layout tightened to prevent horizontal expansion.
- Meals navigation moved under Foods and sub-nav added to Foods/Meals pages.
- Base font size set to 16px for consistent typography.
- Docker Compose port binding limited to localhost while keeping container host binding open.
- Meal builder uses plus buttons to add foods and logs as a single meal entry.
Docs
- Updated deployment notes in the README.
v1.2.1 · 2026-01-31
Added
- API endpoints for weight, water, and food tags.
Changed
- Docker image base moved to Python 3.10.
Fixed
- App startup tolerates SQLite lock during imports.
v1.2.0 · 2026-01-27
Added
- Weight tracking with persistent goal weight and inline edit on Today.
- Water tracking with daily goal, slider + numeric input, and goal edit flow.
- Mobile Foods page cards with search-first results and reduced scrolling.
- Admin page logout button.
Changed
- Calendar dots and macro progress bars now use goal-based status colors.
- Post actions on Today page refresh in-place without scroll jumps.
- Login and root routes now land on Log Macros.
- Docker Compose exposes the app on port 8005 for LAN access.
- Docker image now uses Python 3.10.
Fixed
- Consistent action button styling across Foods and Today log results.
v1.1.0 · 2026-01-20
Fixed
- Supplement checkmarks now persist across days and are stored correctly.
- Supplement toggle UI now works under CSP (no inline event handlers).
- Food deletion no longer removes historical log entries.
- Container startup error fixed in API datetime import.
Added
- Smooth in-page refresh for Today actions to prevent scroll jumps.
- Edit servings for today’s log entries (mobile + desktop).
- Tag autocomplete for quick add and food form using existing tags.
- Delete action added to the Foods list with confirmation.
- Food list and log entry actions now use consistent Edit/Delete buttons.
- Log-from-foods now shows the 3 most recent foods by default.
- About page changelog section that auto-loads versioned entries.
- Eastern-time logging utilities with exact entry timestamps.
log_daterecorded for food logs, supplement logs, and goal history.- Lightweight auto-migration to add/backfill
log_datecolumns.
Changed
- All model timestamp defaults now use Eastern time.
- Transaction timestamps now record exact entry time; future/past entries use
midnight for the transaction date with
log_datecapturing entry time.