dbastrikin
ddbc8e2bc0
feat: add onboarding flow with visual redesign
...
Introduce 6-step onboarding screen (Goal → Gender → DOB → Height+Weight
→ Activity → Calories) with per-step accent colors, hero illustration
area (concentric circles + icon), and white card content panel.
Backend user entity and service updated to support onboarding fields
(goal, activity, height, weight, DOB, dailyCalories). Router guards
unauthenticated and onboarding-incomplete users. Profile service and
screen updated to expose language and onboarding preferences.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-16 23:13:00 +02:00
dbastrikin
bfaca1a2c1
test: expand test coverage across diary, product, savedrecipe, ingredient, menu, recognition
...
- Fix locale_test: add TestMain to pre-populate Supported map so zh/es tests pass
- Export pure functions for testability: ResolveWeekStart, MapCuisineSlug (menu + savedrecipe), MergeAndDeduplicate
- Introduce repository interfaces (DiaryRepository, ProductRepository, SavedRecipeRepository, IngredientSearcher) in each handler; NewHandler now accepts interfaces — concrete *Repository still satisfies them
- Add mock files: diary/mocks, product/mocks, savedrecipe/mocks
- Add handler unit tests (no DB) for diary (8), product (8), savedrecipe (8), ingredient (5)
- Add pure-function unit tests: menu/ResolveWeekStart (6), savedrecipe/MapCuisineSlug (5), recognition/MergeAndDeduplicate (6)
- Add repository integration tests (//go:build integration): diary (4), product (6)
- Extend recipe integration tests: GetByID_Found, GetByID_WithTranslation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-15 22:54:09 +02:00
dbastrikin
6594013b53
refactor: introduce internal/domain/ layer, rename model.go → entity.go
...
Move all business-logic packages from internal/ root into internal/domain/:
auth, cuisine, diary, dish, home, ingredient, language, menu, product,
recipe, recognition, recommendation, savedrecipe, tag, units, user
Rename model.go → entity.go in packages that hold domain entities:
diary, dish, home, ingredient, menu, product, recipe, savedrecipe, user
Update all import paths accordingly (adapters, infra/server, cmd/server,
tests). No logic changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-15 22:12:07 +02:00