Settings & Preferences

Targets, appearance, AI vision health & local database backups

Goals & TDEE Calculator

Mifflin-St Jeor metabolic target estimation

2.0 g/kg
Target Daily Nutrition2333 kcal
Protein

150g

Fat

65g

Carbs

287g

Fiber

33g

Adherence-Neutral Analytics

Active & Non-judgmental

Surplus calorie and macronutrient intake is represented as neutral scientific data. Exceeding daily targets never triggers red alert borders, shaming badges, or penalties.

Offline Storage & Privacy

Hybrid IndexedDB + Turso DB

Entries cache locally in browser IndexedDB for instant offline use and automatically sync to your central Turso (libSQL) database across devices.

Theme & Appearance

Dark, light, or match system

Central Database Sync

Cross-device Turso (libSQL) & local IndexedDB cache

For persistent Vercel hosting, add free-tier Turso env vars in Vercel or .env.local: TURSO_DATABASE_URL and TURSO_AUTH_TOKEN. Local dev falls back to macroai.db.

AI Vision & OCR Service

Server-configured OpenAI-compatible model

Configured safely via server environment variables (.env.local): AI_BASE_URL, AI_API_KEY, AI_MODEL, and optional AI_CUSTOM_HEADERS. Client browsers never store or expose credentials.

Data Backup & Restore

Versioned local JSON export and atomic import

Export Backup
Download a portable snapshot of logs, cached foods, recipes, and goals
Import Backup
Restore data from a valid macroai-backup.json file
Merge mode: Safely upserts logs and recipes by ID, and resolves user goals by updatedAt timestamp.