Repository navigation
Merged
Conversation
- Colors now answers from the current palette (dark or a new light one tuned for contrast on white), so screens pick up the theme as they render. Styles that were computed once at load (sheet inputs, profile cards, buttons, settings rows, trend tabs, the scanner) are read at render instead. - Settings → Account → Appearance: System (follows the phone, live), Light or Dark, saved on the device. Changing it redraws the app and returns to the same screen. The status bar and screen backgrounds follow, and app.json now reports the phone's setting.
Competitive landscape, category gaps and ranked moat candidates, with sources. It sets the Phase 4 priorities: AI meal logging grounded in a food database and the user's history, adaptive calorie targets, and a coach with memory that acts across nutrition, training, habits and friends.
- iOS: Apple's native sheet (expo-apple-authentication) with a hashed nonce, exchanged with Supabase via signInWithIdToken; the name Apple shares on first sign-in is saved to the account. - Android and web, and Google everywhere: Supabase's sign-in page in a browser session (expo-web-browser), returning to /auth-callback with a one-time code. The Supabase client now uses the PKCE flow; the password reset screen already handled codes. - "Continue with Apple / Google" on the login screen and the onboarding sign-up step, shown only for providers switched on in Supabase (read from its public settings), so nothing appears until they're set up. The old "coming soon" buttons are gone. - Every sign-in method now finishes the same way (afterSignIn): create the backend user, named from the provider's profile, and save any onboarding answers.
- iOS reads Apple Health through @kingstinct/react-native-healthkit; Android reads Health Connect through react-native-health-connect (both read-only). Workouts, daily step totals, sleep and weigh-ins from the last two weeks, then incrementally, when the app opens or comes to the foreground (at most every 15 minutes). - POST /health/import stores them idempotently: workouts by the health app's ID (new activity_logs.externalId), days and weigh-ins by date. New health_days table for steps and sleep. - Step challenges count, per day, the larger of the phone's total and the steps on logged workouts, so nothing is counted twice. The coach sees today's steps and last night's sleep. - Settings → Apple Health / Health Connect: connect, sync now, what's come in. Web explains it syncs from the phone apps. Overlapping sleep from a watch and a phone counts once; awake time is removed. - App config: the HealthKit entitlement and read-permission text, the Health Connect read permissions and SDK 36.
- Works out what someone actually burns from what they logged and how their weight moved: a least-squares fit through the weigh-ins (no lag, steady against water swings) against average intake on days logged fully enough to trust, blended toward the profile's formula estimate while data is thin. Needs 14 days, 10 logged days and 4 weigh-ins. - Suggests a target for the goal and pace, moving at most 200 kcal per check-in, never below 1,200, and only when the change is at least 50. After a change it waits a week; "Not now" snoozes for a week. - GET /targets/adaptive, POST /targets/adaptive/apply and /snooze. The Sunday check-in alert includes the suggestion. - Stats: a "Your metabolism" card with the estimate, confidence, the inputs behind it and the suggestion; before there's enough data, it shows what's still needed.
Smart log reads a typed, dictated or photographed meal into separate items with portions, including the oil, butter and sauces trackers usually miss. Each item's nutrition comes from the user's own past confirmations first, then the food database for branded items, then a sanity-checked estimate, and every item is shown with its source for review before anything is logged. Confirmed items are remembered per user (nutrition and usual portion), so the next reading of the same food starts from their numbers. Settings lists what has been learned and can forget it. Readings are capped at 30 a day; a failed reading doesn't count.
The coach now takes short notes when a message holds something that matters for future coaching (an injury, foods avoided, when they can train) and replaces notes that go out of date. Notes are used in every chat, shown in the chat as they're taken, and can be seen, added to and deleted under What your coach knows. The coach's context also gains the week's averages over logged days and the adaptive estimate. A daily 1pm check-in looks for a logging gap, a run of missed workouts, low protein against target, or a weight plateau while cutting, and sends the first that applies. Each kind goes at most once a week, never on Sundays, and only with progress alerts on.
|
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 4 of the roadmap (docs/ROADMAP.md). The features come from new competitor research (docs/MARKET_RESEARCH.md): its three "build first" picks, plus the platform work that was asked for.
Stacked on #6 (Phase 3). The base is
phase-3, so this diff shows only Phase 4. Merge #6 first; this PR then moves tomain.20261106120000to20261106150000are already applied to Supabase. They only add tables and columns, so servers running earlier code keep working.grit://auth-callbackand the web app's/auth-callbackto the allowed redirect URLs. The buttons stay hidden until a provider is on.@kingstinct/react-native-healthkitandreact-native-health-connectplugins,expo-build-properties, Health Connect read permissions, camera/photo permission text,expo-apple-authenticationandexpo-web-browser.The research's three "build first" features
POST /food/parse,POST /food/parse/log): type, dictate or photograph a meal.FoodMemory), and their names go to the model so it reuses them. Users see them, and can forget any, in "Foods GRIT knows".GET /targets/adaptive,apply,snooze):/ai/memories).Platform
/auth-callbackcode exchange everywhere else.POST /health/import,GET /health/recent):ActivityLog.externalIdand days byHealthDay.Testing
Not testable here: real-device HealthKit and Health Connect sync, the camera, and native Apple sign-in.