application-service
OfficialCreate and orchestrate application services
AuthorZoppy-crm
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a clear, consistent pattern for implementing Application Services in zoppy-api so developers can orchestrate business workflows without leaking infrastructure concerns and avoid common mistakes like reading companyId from requests or bypassing domain responsibilities.
Core Features & Use Cases
- Orchestration pattern: Standardizes the validate → persist → enqueue flow for write use cases and ensures Response DTOs are returned.
- Dependency injection & registration: Describes required constructor injections (domains, queue services, session, logService) and how to register providers and exports in ApplicationModule.
- Error handling and DTO conventions: Recommends NestJS exceptions for business errors, using response DTOs instead of entities, and when to call repositories directly.
- Use Case Example: Implement a CampaignApplication that validates feature flags, saves via CampaignDomain, enqueues a processing job, and returns a CampaignResponse DTO.
Quick Start
Create a new Application Service in src/application that validates business rules, persists via the appropriate Domain, enqueues any required jobs, returns a Response DTO, and registers the service in ApplicationModule.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: application-service Download link: https://github.com/Zoppy-crm/.github/archive/main.zip#application-service Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.