Repository navigation
Conversation
An exercise library the coach builds plans from, with injury-aware filtering; set-by-set strength logging with PRs; calorie burn from intensity and heart rate, calibrated per person against the weight trend; strength levels from OpenPowerlifting; and progression that takes nutrition and sleep into account.
GRIT launches globally, so the Phase 5 food import takes the full Open Food Facts set (needing Supabase Pro), and regional depth (local dishes, names and units) goes where users' searches miss, measured per country, instead of starting with West Africa.
Adds 5J, a trust and safety baseline that runs first (SDK audit, AI consent naming Microsoft, Azure Data Zone, EU AI disclosure, 18+ gate, calorie floors, eating-disorder safeguards, privacy notices), and a wider health import (HRV with source, resting HR, VO2max, cycle data). Nutrition gains dish-level regional data with local names and units, Smart log confidence badges and a cooking-oil question, caffeine and alcohol tracking, write-back to the phone's health app and a public accuracy page. Fitness gains voice and offline set logging, supersets and calculators, plans that run by session order, movement patterns that keep history across swaps, a cycle-aware weight trend and evidence-based deficit and protein rules in the progression engine. Race predictions move to a later endurance package, data consent is split into separate default-off settings, and the timeline is now about 18 weeks for one developer or 11 for two.
5 Quick wins and safety: trust and safety baseline, Smart log accuracy badges and checks, caffeine and alcohol, search and correction recording, the exercise library and library-based coach plans. 6 Strength logging and health data: sets, PRs, voice and offline logging, progression rules, wider health import, heart-rate calories and nutrition write-back. 7 GRIT's own food database: schema, imports, local search and barcodes, micronutrients from measured values. 8 Data quality and regional foods: contributions, quality scores, duplicate merging, regional dishes, names and units. 9 ML and research: evaluation, name matcher, portion defaults, micronutrient estimator, accuracy page, burn calibration, cycle-aware trend and strength levels. The research's later phases are renumbered 10-12.
AI features (Smart log, the coach, plan building) now ask first, in a sheet naming Microsoft's Azure OpenAI as Apple requires; the server refuses them without consent, and it can be withdrawn in Privacy. The coach is labelled as an AI and its instructions refuse diagnosis, medication advice and under-eating, and route crisis language to help. GRIT is now 18+: onboarding starts at 18, the server refuses younger dates of birth, and users without an age (Google or Apple sign-in) see a short check first. Calorie targets have floors by sex (1,500 kcal for men, 1,200 otherwise) and planned loss is capped at 1% of body weight a week, in onboarding, adaptive suggestions and typed targets. A new onboarding question about eating disorders turns off weight-loss goals and steers the coach; pro-eating-disorder display and challenge names are refused. Four separate data-use permissions, all off by default, sit in Privacy. docs/TRUST_AND_SAFETY.md records the SDK audit (no ad or analytics SDKs; push text reaching Expo is flagged), the Azure steps for the account owner, and drafts of the health privacy notice and impact assessment for a lawyer.
Each item now shows where its numbers came from and how confident the reading is, and items whose protein or fat is out of range for their kind of food (grilled chicken at 2 g protein, rice at 40 g fat) are marked "check this". Instead of guessing cooking oil, the reading now says when it can't tell, and the app asks "Cooked in oil or butter?" and adds the oil itself. Readings also carry caffeine and alcohol per 100 g, which are logged with each item and remembered with the user's foods.
Food logs now carry caffeine and alcohol, read from Open Food Facts labels (caffeine in grams, alcohol as % vol) and from Smart log. A row of drink shortcuts logs coffee, tea, beer, wine and spirits with typical values, the Food tab shows the day's caffeine and alcohol, and the coach sees them. Food searches now record what was picked, or that nothing was, with the phone's country and language, and editing a logged food's numbers marks it as corrected. Together these give the baseline for GRIT's own food database and show where searches miss.
GRIT now has an exercise library of 876 exercises from free-exercise-db (public domain), loaded automatically on first start and reloaded when the tagging rules change. Each exercise gets a movement pattern, so swaps can keep progression history, and tags for what it stresses (impact, spinal load, overhead, deep knee bend, wrists). A library screen searches and filters it, with pictures and instructions. Coach plans are now built only from the library: the model picks ids from a shortlist already filtered for where the user trains, their level and any injury in their coach notes (a sore knee keeps out squats, lunges, step-ups and running), and the strict schema makes anything else impossible. Plan exercises open their instructions. Logging a workout now asks how hard it was, and calories use light, moderate or vigorous values; moderate keeps the previous numbers.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 of the plan in docs/PLAN_PHASES_5_TO_9.md, the first and easiest of Phases 5–9. It also carries the market research behind that plan:
reports/andresearch_notes/.20261107120000_phase5_safety_libraryand20261107130000_food_memory_caffeine_alcoholare already applied to Supabase (20 of 20 recorded). Both are additive.packages/backend/data/exercises.json(free-exercise-db, public domain). It reloads when the tagging version changes. No manual step.5.1 Trust and safety
POST /food/parse,POST /ai/messageandPOST /workout-plan/generatewith403 { code: "ai_consent_required" }, and the nudge falls back to fixed text;ProfileGatesends users without an age or wellbeing answer to/welcome-check, which turns away under-18s and offers account deletion.5.2 Smart log accuracy
5.3 Caffeine, alcohol and search data
POST /food/search-events: records what was picked, or nothing, with the phone's country and language.FoodLog.corrected. This is Phase 7's baseline.5.4 Exercise library and coach plans
GET /exercisesandGET /exercises/:id, and a library screen.Testing