Skip to main content

Backend Application Layer

The application layer contains use-case services and repository contracts.

Main Responsibilities

  • Implement business workflows independent of transport (GraphQL/HTTP).
  • Encapsulate transactional operations through UnitOfWork.
  • Depend on interfaces, not ORM-specific implementations.

Key Directories

  • src/application/services/**: use-case services.
  • src/application/repositories/**: repository interfaces.
  • src/application/entities/**: business entities used across services.
  • src/application/uow/**: UnitOfWork contract.

Service Design Rules

  • One service should represent one business capability area.
  • Service methods should return stable domain-level result objects.
  • Data access should be injected via repository interfaces.
  • Side effects (email/push/workflow transition) should be explicit.

API Reference Entry Points

  • API root
  • Use search within API docs for: AuthService, ListingService, ListingRepository, UnitOfWork.