application-layer

Enforce Rust DDD application layer conventions for Axum web APIs.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/nftug/rust-ddd-book-manager --skill application-layer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: application-layer
Source: https://github.com/nftug/rust-ddd-book-manager/tree/main/.agents/skills/application-layer
Command: npx skills add https://github.com/nftug/rust-ddd-book-manager --skill application-layer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates inconsistent implementation and architectural leaks when writing code for the application crate of a Rust DDD web API project, ensuring all code adheres to the repository's established conventions for use case orchestration, DTOs, and dependency injection.

Core Features & Use Cases

  • Pattern Enforcement: Guides implementation of command/query services, DTOs, registries, and error handling to match existing codebase standards.
  • Scope Boundary Guidance: Clearly distinguishes application layer responsibilities from domain, infrastructure, and presentation layers to avoid cross-layer coupling.
  • Use Case: When adding a new book checkout command, this Skill ensures you follow the correct AuditContext setup, DTO validation, and error translation patterns used across the project.

Quick Start

Use the application-layer skill to implement a new query service for fetching paginated book lists in the application crate, following the existing DTO and registry patterns.

Frequently Asked Questions about application-layer

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

FAQPage Schema
How do I implement a consistent Rust DDD application layer for command and query services?

To implement a consistent Rust DDD application layer, enforce standardized patterns for command and query services, DTOs, and dependency injection registries. This aligns use case orchestration with repository-specific architectural conventions to prevent cross-layer coupling.

What is the best way to handle DTO validation and error translation in a Rust Axum web API?

The best way to handle DTO validation and error translation in a Rust Axum web API is using garde for validation and JsonSchema. Translate domain and persistence errors into a unified ApplicationError to maintain consistent error handling across the application crate.

How do I set up AuditContext and dependency injection registries in a Rust DDD application crate?

Set up AuditContext and dependency injection registries by following established architectural conventions for use case orchestration. This ensures the application layer correctly coordinates domain logic while maintaining strict boundaries from infrastructure and presentation layers.

Can I use this approach to separate application layer responsibilities from domain and infrastructure layers in Rust?

Yes, you can separate application layer responsibilities from domain and infrastructure layers in Rust. The approach provides clear scope boundary guidance to distinguish use case orchestration from domain logic and infrastructure implementation, avoiding architectural leaks and cross-layer coupling.

Why does my Rust DDD application crate have inconsistent architectural patterns when adding new use cases?

Inconsistent architectural patterns in a Rust DDD application crate occur when new use cases bypass established conventions. Enforcing standardized setup for command services, DTO validation, and unified error translation ensures all code additions align with existing repository standards.