Skip to content

recent-food: Encapsulate infra exports — export only factories #1404

@marcuscastelo

Description

@marcuscastelo

Summary

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

Part of #1403

Scope / Representative files

  • src/modules/recent-food/infrastructure/recentFoodRepository.ts
  • src/modules/recent-food/infrastructure/supabase/supabaseRecentFoodGateway.ts
  • src/modules/recent-food/infrastructure/supabase/supabaseRecentFoodMapper.ts
  • src/modules/recent-food/infrastructure/signals/recentFoodCacheStore.ts
  • src/modules/recent-food/infrastructure/supabase/realtime.ts

Deliverables

  • Implementation files export only factories (e.g., createRecentFoodRepository, createSupabaseRecentFoodGateway).
  • Internal helper functions removed from exports.
  • All call-sites import factories and use repository/gateway instances.
  • TypeScript/lint/tests pass for the module.

Acceptance Criteria

  • No named exports for internal helpers remain in the module infra files.
  • Call sites updated and compile cleanly.

Metadata

Metadata

Labels

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

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions