feat: Phase 4 — 9 new features (v1.1)
Some checks failed
CI / Build & test backend (push) Failing after 14m56s

REQ-MOB-010: BarcodeScreen.tsx — barcode scanner via react-native-camera
REQ-VIZ-001: WeeklyCalorieChart.tsx — 7-day bar chart on History screen
REQ-VIZ-002: Streak tracker — GET /meals/streak + HomeScreen badge
REQ-UX-001: Quick-add calories — POST /meals/quick-add + QuickAddScreen
REQ-UX-002: Food favourites — UserFoodMemory.favourite + toggle endpoint + FoodRow star
REQ-UX-003: GoalBanner.tsx — in-app slide-in when daily target hit
REQ-EXP-001: ExportController — GET /export/meals CSV download
REQ-WTR-001: Water tracking — WaterEntry entity + POST/GET /water + DailyDetails widget
REQ-UX-004: Daily logging reminder — HomeScreen after-18:00 banner

Also: Flyway V2 (favourite), V3 (water_entries), V4 (source constraints)
Traceability, CHANGELOG, PLAN updated after each feature
This commit is contained in:
2026-05-19 02:11:23 +03:00
parent 904f1c43b3
commit 12820632e7
46 changed files with 8151 additions and 63 deletions

View File

@@ -9,6 +9,15 @@ This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added — Calorie Counter v1.1 (Phase 4)- **REQ-UX-004**: Daily logging reminder — in-app banner on HomeScreen shown after 18:00 if no meals logged that day; dismissible with ✕ button; no native push dependency
- **REQ-WTR-001**: Water intake tracking — `WaterEntry` entity + Flyway V3; `POST /water`, `GET /water/daily`; water widget on DailyDetails with +250/+330/+500ml quick buttons and progress bar- **REQ-EXP-001**: Data export — `GET /export/meals?from=&to=` backend endpoint returning `text/csv`; max 365-day range; “Export last 90 days” button in Profile screen using React Native `Share` API
- **REQ-UX-003**: Goal achievement banner — `GoalBanner.tsx` slides in when `remaining ≤ 0`; auto-dismisses after 4 s; accessibility announcement via `AccessibilityInfo`
- **REQ-UX-002**: Food favourites — Flyway V2 migration adds `favourite` column; `POST /foods/{id}/favourite` toggle; `GET /foods/favourites`; star icon on `FoodRow`; favourites section at top of Search screen
- **REQ-UX-001**: Quick-add calories — `POST /meals/quick-add` backend endpoint; `QuickAddScreen.tsx` with number-pad input, label, meal-type chips; accessible from HomeScreen bottom sheet as “⚡ Quick Add”
- **REQ-VIZ-002**: Streak tracker — `GET /meals/streak` (backend, `MealService#getStreak`); streak badge on HomeScreen; counts consecutive days with at least one meal logged
- **REQ-VIZ-001**: `WeeklyCalorieChart.tsx` — proportional-height 7-day bar chart; green = at/under target, amber = over; dashed target line; rendered at top of History screen; no external charting dependency
- **REQ-MOB-010**: `BarcodeScreen.tsx` — full-screen barcode scanner using `react-native-camera` `RNCamera`; EAN-13/8, UPC-A/E support; scan aim overlay with corner brackets; looks up `GET /foods/barcode/{code}` and logs 100g portion on success; "Scan Barcode" option added to HomeScreen bottom sheet; route registered in `AppNavigator`
## [3.0.3] - 2026-04-21
### Fixed