Skip to content

Add DDD Layer Placement Guide to Contributing Documentation #79

@josecelano

Description

@josecelano

Add DDD Layer Placement Guide to Contributing Documentation

📋 Issue Information

🎯 Problem Statement

The project lacks clear guidelines on which code belongs in which DDD layer (Domain, Application, Infrastructure, Presentation). This has led to violations like the config module (#75) being placed in the domain layer when it clearly belongs in the application layer.

Without explicit documentation, contributors (including AI assistants) may:

  • Place DTOs in the domain layer
  • Mix infrastructure concerns (file I/O, HTTP) with domain logic
  • Create unclear boundaries between layers
  • Make code harder to maintain and test

💡 Proposed Solution

Create a comprehensive guide docs/contributing/ddd-layer-placement.md that clearly documents each layer's purpose, rules, red flags, examples, and includes a decision flowchart.

📝 Implementation Plan

See detailed specification: docs/issues/add-ddd-layer-placement-guide.md

✅ Acceptance Criteria

Note for Contributors: These criteria define what the PR reviewer will check. Use this as your pre-review checklist before submitting the PR to minimize back-and-forth iterations.

  • Document created at docs/contributing/ddd-layer-placement.md
  • All four layers documented with clear rules and examples
  • Nuanced guidance on serde usage included (entities vs DTOs)
  • Decision flowchart included for quick reference
  • Real code examples from the codebase
  • Linked from docs/contributing/README.md
  • Referenced in .github/copilot-instructions.md
  • All linters pass (markdownlint, cspell)
  • Document follows project markdown conventions

🏷️ Labels

documentation, enhancement, DDD, contributing-guide

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions