python-fastapi-ddd-presentation-skill
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)
More from iktakahiro/python-fastapi-ddd-skill
python-fastapi-ddd-skill
Guides FastAPI backend design using Domain-Driven Design (DDD) and Onion Architecture in Python. Use when structuring a FastAPI app (routes/handlers, Pydantic schemas, Depends-based DI), modeling domain Entities/Value Objects, defining repository interfaces, implementing SQLAlchemy infrastructure adapters, or writing use cases, based on the dddpy reference.
32python-fastapi-ddd-testing-skill
Guides unit testing for Python DDD + Onion Architecture apps (Domain Entities/Value Objects and UseCases) using pytest and repository mocks, based on the dddpy reference. Use when adding tests, choosing what to mock, or structuring test folders for a DDD FastAPI project.
17commit
Prepare and create git commits in this repository using Conventional Commits; use when the user asks to commit or split commits for a task.
4git-flow-release
Create a release for this repository by tagging main with calendar versioning (optionally using git-flow if configured); use when the user asks to create a release or bump version.
2