|
|
12820632e7
|
feat: Phase 4 — 9 new features (v1.1)
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
|
2026-05-19 02:11:23 +03:00 |
|
|
|
904f1c43b3
|
feat: Raspberry Pi deployment — Dockerfile, CI/CD workflows, actuator
CI / Build & test backend (push) Failing after 13m38s
Backend:
- backend/Dockerfile: multi-stage build (local + ci-image targets)
- eclipse-temurin:21-jre-alpine runtime, non-root user caloriecounter
- DOCKER_BUILDKIT=0 + native JAR build pattern for ARM64 Pi runner
- pom.xml: add spring-boot-starter-actuator
- application.yml: expose /actuator/health (liveness probe for Docker healthcheck)
CI/CD:
- .gitea/workflows/ci.yml: Maven test on pi-runner (push + PR)
- .gitea/workflows/docker.yml: build + push calorie-counter-api:latest/:sha
- Triggers after CI passes (workflow_run) to avoid OOM on single-capacity Pi
- Docker login before Maven build (avoids daemon timeout after heavy CPU)
- Deploys immediately via docker.sock to /home/andris/homelab/calorie-counter/
Mobile:
- api.ts: update baseURL default to https://calories.amlab.dev
(LAN fallback: http://10.18.1.135:8085 via WireGuard)
Homelab changes pushed directly via Gitea MCP:
- homelab/calorie-counter/docker-compose.yml (port 8085, 120s start_period)
- homelab/calorie-counter/.env.example
- homelab/.gitea/workflows/deploy-calorie-counter.yml (cron every 10 min)
- homelab/backup/backup.sh (added calorie-counter pg_dump)
|
2026-05-18 23:58:44 +03:00 |
|
|
|
8a031b30b6
|
test: add high & medium priority tests — 48 tests total, 0 failures
Unit tests:
- JwtTokenProviderTest (7): round-trip, tampered sig, expired, wrong secret
- UserServiceTest (6): Mifflin-St Jeor BMR for lose/maintain/gain, manual override
- MealServiceTest (6): calorie calc, food-memory create/avg, IDOR ownership
Integration tests:
- ValidationIntegrationTest (12): 400s for invalid email, short password,
barcode pattern, food query length, history range >90 days
- ProfileAndMealIntegrationTest (11): profile CRUD, meal get/delete lifecycle,
history, cross-user IDOR (403 on GET and DELETE), data-leakage check
Fixes bundled:
- GlobalExceptionHandler: add ConstraintViolationException (400) and
MissingServletRequestParameterException (400) handlers
- AiService: remove unused spring-ai import (compile fix)
|
2026-05-18 22:44:53 +03:00 |
|
|
|
91cd18aec6
|
feat: initial implementation — all 35 requirements across phases 1-3
Backend (Spring Boot 3.2 / Java 21 / PostgreSQL):
- JWT auth with BCrypt password hashing
- User profile + Mifflin-St Jeor BMR calculator
- Food search + barcode via OpenFoodFacts API with local cache
- Meal CRUD with user data isolation and ownership checks
- AI photo analysis (OpenAI Vision) with confidence intervals
- AI correction feedback loop for personalisation
- Flyway DB migrations + RFC-7807 error responses
Mobile (React Native / TypeScript):
- Full navigation stack (Auth → Tabs → Home stack)
- Design tokens (WCAG 2.2 AA colours, 8px grid, 48px touch targets)
- 10 screens: Login, Register, Home, Search, Camera, AI Result, Edit Meal,
Daily Details, History, Profile
- Confidence-aware calorie display (kcal ± range)
- Repeat last meal shortcut + macro tracking
Docs:
- docs/PLAN-AND-REQUIREMENTS.md
- docs/traceability.csv (35 requirements, all Implemented)
|
2026-05-18 21:56:13 +03:00 |
|