yweb-ddd-architecture

Guide YWeb DDD layered architecture and API design standards.

3|2|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/yafo-ai/yweb-core --skill yweb-ddd-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yweb-ddd-architecture
Source: https://github.com/yafo-ai/yweb-core/tree/main/.cursor/skills/yweb-ddd-architecture
Command: npx skills add https://github.com/yafo-ai/yweb-core --skill yweb-ddd-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to implementing the YWeb DDD layered architecture and API design principles, ensuring consistency and best practices in web application development.

Core Features & Use Cases

  • Layered Architecture Guidance: Understand and apply the API → Service → Domain layered structure.
  • API Design Standards: Follow best practices for creating lean APIs, handling DTOs, and managing responses.
  • Use Case: When building a new feature, consult this Skill to ensure your API routes, service logic, and domain models adhere to the YWeb framework's DDD principles, leading to maintainable and scalable code.

Quick Start

Refer to the YWeb DDD Architecture & API Design guide to structure a new API endpoint.

Frequently Asked Questions about yweb-ddd-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a layered domain model using DDD in a web application?

Structure your DDD domain model using an API → Service → Domain layered architecture, ensuring separation of concerns. This approach isolates business logic in domain models, coordinates operations in the service layer, and exposes endpoints via lean APIs.

What is the best way to design DTOs and format API responses in a DDD service layer?

Design DTOs in the DDD service layer by keeping APIs lean and using dedicated DTOs for data transfer. Format API responses consistently across endpoints to decouple internal domain models from external API contracts and maintain data integrity.

When do I need to define a service layer instead of putting logic directly in API routes?

Define a service layer when complex business logic spans multiple domain models or requires orchestration. Keeping APIs lean and delegating operations to the service layer prevents duplicated logic and maintains strict DDD boundaries.

How to build a new API endpoint following DDD layered architecture guidelines?

Build a new API endpoint by routing requests through the API layer, orchestrating operations in the service layer, and executing business rules in the domain layer. Consult DDD architecture guidelines to enforce consistent development workflows and proper DTO usage.

Does YWeb DDD architecture require specific documentation paths for understanding development workflows?

Yes, YWeb DDD architecture enforces adherence to specific documentation paths for comprehensive understanding. Following these designated paths ensures developers correctly implement API design standards, DTO usage, and layered architecture workflows.

Why should APIs be kept lean in a DDD layered architecture?

APIs should be kept lean in a DDD layered architecture to prevent business logic from leaking into the presentation layer. Delegating heavy operations to the service and domain layers maintains scalability and strict separation of concerns.