Commit graph

5 commits

Author SHA1 Message Date
Claude
6e082ce58f Stream D: Security hardening — 10 fixes from QA review
- SEC-05: Fail fast if SECRET_KEY is default 'change-me-in-production'
- SEC-06: CORS allow_credentials=False (Bearer tokens don't need it)
- SEC-08: Input validation on auth schemas (min/max length, username pattern)
- SEC-10: .dockerignore files (root, backend, mcp-connector)
- SEC-11: Hardcode ALGORITHM='HS256' as constant, remove from settings
- CQ-01: Gate crawl scheduler on CRAWL_ENABLED env var (default false)
- OS-02: CONTRIBUTING.md
- OS-03: CHANGELOG.md with v1.0.0 entry
- setup.ps1: Add API_TOKEN generation (Windows parity with setup.sh)
2026-06-21 23:13:53 +00:00
claude
5dd5d39ca6 Feature: nutrition module (keto macros + intermittent fasting + electrolytes)
Backend:
- models/nutrition.py: NutritionGoal, Fast, ElectrolyteLog tables
- schemas/nutrition.py: Pydantic schemas for new endpoints
- routers/nutrition.py: /api/nutrition/{today,goals,fasts,electrolytes}
- main.py: register router + migration for new tables + seed keto point rules

Frontend:
- pages/Nutrition.jsx: macro bars, fast timer, eating window, electrolyte quick-add
- App.jsx: /nutrition route + Keto nav tab
- api.js: nutrition endpoints

Points schema for fasts (tier-based partial credit):
16:8=25, 18:6=40, 20:4=60, 24h=200, 36h=350, 48h=500, 72h=1000

Defaults tuned for Scot: 135kg M 44yo strict keto, 12:00-20:00 window,
Asia/Bangkok timezone, 2400/2600 cal rest/training, 20g net carb cap.
2026-04-12 05:13:52 +00:00
claude
82c4533a96 Feature: expanded equipment, integration-aware sync, tooltips
1. Equipment (onboarding step 5):
   - Changed from 3 radio buttons to 14 multi-select chips
   - Bicycle, pool, free weights, squat rack, bench press, machines,
     resistance bands, pull-up bar, kettlebell, jump rope, yoga mat,
     treadmill, stationary bike, rowing machine
   - Backend: equipment_list JSONB field on profile model
   - Resource matcher updated to filter by specific equipment
   - Legacy equipment_access auto-derived for backward compat

2. Sync Strava/Polar (dashboard):
   - Fetches integration status on load
   - Shows 'Connect Strava/Polar' (dashed border) when not connected
   - Shows 'Sync Strava/Polar' only when connected
   - Connect button triggers OAuth flow
   - Sync shows loading state and result count

3. Tooltips:
   - Tip component: hover/click to show explanation bubble
   - Added to: goals, TTM stages, PAR-Q+, BREQ-2 items,
     equipment, rewards gate, daily points, activity checklist,
     weekly progress, integrations section
   - Science references: TTM, PAR-Q+, BREQ-2/RAI explained
2026-03-15 22:16:55 +00:00
claude
7846e3445d Fix: add future annotations to all files, fix date field name shadowing type in RewardRedeemRequest 2026-03-15 00:42:13 +00:00
claude
4db2b0846b Initial commit: full fitness-rewards app
Backend: FastAPI + PostgreSQL + SQLAlchemy async
- Auth (JWT), onboarding (PAR-Q+, TTM, BREQ-2), activities, food log
- Points engine with daily gate + weekly targets
- Strava + Polar OAuth integration
- Open Food Facts barcode lookup
- Resource recommendation engine
- 10 seeded Darebee/StrongLifts/YouTube programs

Frontend: React + Vite, mobile-first dark theme
- Login/Register, 8-step onboarding flow
- Dashboard with daily gate status
- Activity logger, food logger (manual + barcode scan + search)
- Reward shop with redemption
- Weekly summary view
- Settings (point rules, targets, integrations)

Deployment: Docker Compose for Coolify (Traefik)
2026-03-14 23:53:00 +00:00