Skip to content

diet/recipe: Encapsulate infra exports — export only factories #1406

@marcuscastelo

Description

@marcuscastelo

Summary

Refactor the diet/recipe module infrastructure to encapsulate implementation details: export only factory functions and keep helper functions file-local.

Part of #1403

Scope / Representative files

  • src/modules/diet/recipe/infrastructure/recipeRepository.ts
  • src/modules/diet/recipe/infrastructure/supabase/supabaseRecipeGateway.ts
  • src/modules/diet/recipe/infrastructure/supabase/supabaseRecipeMapper.ts
  • src/modules/diet/recipe/infrastructure/signals/recipeCacheStore.ts
  • src/modules/diet/recipe/infrastructure/supabase/realtime.ts

Deliverables

  • Export only factories (e.g., createRecipeRepository, createSupabaseRecipeGateway).
  • Update call-sites to use returned instances.
  • Ensure TypeScript/lint/tests pass.

Acceptance Criteria

  • No internal helper functions are exported from infra files.

Metadata

Metadata

Labels

backendBackend-specific issue or changecomplexity-mediumMedium implementation complexityrefactorCode refactoring requiredsubissue

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions