python-fastapi-ddd-presentation-skill

Installation
SKILL.md

FastAPI Presentation Layer (DDD / Onion Architecture)

This skill focuses on the Presentation layer only: FastAPI routes/handlers, Pydantic schemas, and HTTP error mapping. It assumes you already have Domain + UseCase layers and repository wiring.

Non-negotiables (Onion rule)

  • Presentation is the outermost layer: it can depend on UseCase and Domain types, but Domain must not depend on FastAPI/Pydantic.
  • Keep business rules inside Domain/UseCase. Presentation does:
    • request parsing/validation (shape, basic constraints)
    • conversion primitives → Value Objects
    • calling usecase.execute(...)
    • mapping Domain exceptions → HTTPException
    • conversion Entity → response schema

Recommended structure (per aggregate)

Related skills
Installs
9
GitHub Stars
2
First Seen
Feb 13, 2026