What problem does it solve?
Building backend business logic in Webiny requires following a strict architectural pattern: single-method UseCase classes with dependency injection, typed Result-based error handling, and CMS-backed repositories. This Skill provides the exact patterns and rules so generated code compiles, registers correctly in the DI container, and handles errors consistently.
Core Features & Use Cases
- UseCase Implementation: Create UseCase classes with
execute methods returning Result<T, E>, registered via createImplementation with correctly ordered DI dependencies.
- Error Handling: Define domain errors extending
BaseError, typed error unions via IErrors interfaces, and proper Result.ok/Result.fail flows.
- CMS Repositories & Decorators: Build repositories that persist data through CMS entry use cases, map entries to domain entities, and add cross-cutting concerns (authorization, logging) via decorators.
- Use Case: When adding a new feature like "CreateEntity" to a Webiny extension, generate the abstractions, use case, repository, mapper, and feature registration following the framework's conventions.
Quick Start
Implement a new Webiny UseCase with a CMS-backed repository and authorization decorator for my entity feature.