This section defines how the backend is organized using Domain-Driven Design (DDD) layered architecture.
domain.md— entities, value objects, aggregates, domain services, and domain events.application.md— use cases, application services, transactions, and DTOs.infrastructure.md— persistence, external services, messaging, and configuration.interfaces.md— HTTP/CLI/event adapters, controllers, and input validation.api-conventions.md— response format, error codes, and versioning.database.md— database, migrations, and ID strategy.logging.md— logging, tracing, and masking.
- Read
domain.mdto understand where business rules live. - Read
application.mdbefore adding a new use case. - Read
interfaces.mdbefore adding a controller or handler. - Read
api-conventions.mdbefore designing an endpoint.
Business rules are isolated in the domain layer. All other layers depend on domain through abstractions. Infrastructure implements those abstractions. Interfaces adapt the application to the outside world.