presentation-layer

Enforce Axum-based presentation layer conventions in Rust DDD web APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates inconsistent implementation of the presentation (API) layer in this Rust DDD book manager project by enforcing the repository's established Axum-based conventions, reducing architectural drift and boilerplate when adding or modifying API endpoints.

Core Features & Use Cases

  • Standardized Handler Implementation: Guides you to keep handlers free of business logic, only interacting with the AppRegistry to call application use cases and pass DTOs.
  • Consistent Auth and Error Handling: Provides patterns for implementing both required and optional OIDC authentication, plus centralized API error mapping to consistent HTTP responses.
  • Reference Implementation Templates: Includes concrete examples of existing book and user endpoint patterns to use as templates for new features. Use case: When adding a new endpoint to allow users to reserve books, this Skill ensures your implementation matches the existing patterns for routing, authentication, and error handling used by other endpoints like POST /api/books/{id}/checkouts.

Quick Start

Use the presentation-layer skill to implement a new authenticated endpoint for reserving books in the api crate following the repository's existing Axum and auth patterns.

Frequently Asked Questions about presentation-layer

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

FAQPage Schema
How do I structure Rust DDD API layers with Axum to keep handlers free of business logic?

To structure Rust DDD API layers with Axum, keep handlers free of business logic by using them only to interact with the AppRegistry. This invokes application use cases and passes DTOs, enforcing separation of concerns in the api crate.

How do I implement OIDC authentication extractors in an Axum web API?

Implement OIDC authentication extractors in an Axum web API by applying repository-specific patterns for both required and optional authentication. This enforces consistent auth handling across HTTP routers and request handlers in the presentation layer.

What is the best way to map application errors to consistent HTTP responses in Rust DDD?

The best way to map application errors to consistent HTTP responses in Rust DDD is using centralized API error mapping. This enforces consistent HTTP error response formatting across all request handlers in the api crate.

Does this Axum presentation layer skill configure OpenAPI schema definitions for new endpoints?

Yes, this Axum presentation layer skill configures OpenAPI schema definitions for new endpoints. It enforces repository-specific architectural conventions when adding or modifying HTTP routers and request handlers in the api crate.

How do I add a new authenticated endpoint to reserve books in a Rust DDD project?

To add a new authenticated endpoint to reserve books in a Rust DDD project, follow existing routing, authentication, and error handling patterns like POST /api/books/{id}/checkouts. This ensures implementation matches repository conventions.