This is a study repository on Domain-Driven Design (DDD) and Clean Architecture, exposing concepts in practice in a DDD forum application.
- TypeScript: Programming language used to write the application code.
- Vitest: Testing tool used to ensure code quality.
- ESLint: Linting tool to maintain code quality and consistency.
- Day.js: Library for date manipulation.
- Vite: Build and development tool.
- Domain-Driven Design (DDD): Software design approach that emphasizes collaboration between domain experts and developers to create a rich domain model.
- Clean Architecture: Software architecture that promotes separation of concerns and independence from frameworks, databases, user interfaces, and any other external concerns.
- Entities and Aggregates: Fundamental DDD concepts representing domain objects and their relationships.
- Domain Events: Events that represent significant changes in the domain state.
- Value Objects: Objects defined by their attributes and do not have their own identity.
- Repositories: Abstractions that encapsulate data access logic.
- src/core: Contains the core components of the application, such as entities, aggregates, domain events, errors, and utilities.
- entities: Contains the domain entities and aggregates.
- events: Contains the domain events.
- errors: Contains the domain-specific error classes.
- utilities: Contains utilities and helpers.
- src/domain/forum: Contains the domain logic specific to the forum context.
- application: Contains the application layer, including use cases and repositories.
- use-cases: Contains the use cases for the forum domain.
- repositories: Contains the repository interfaces for the forum domain.
- enterprise: Contains the enterprise layer, including entities and value objects specific to the forum domain.
- entities: Contains the entities for the forum domain.
- value-objects: Contains the value objects for the forum domain.
- application: Contains the application layer, including use cases and repositories.
- test: Contains test utilities and in-memory implementations for repositories.
-
Install dependencies:
pnpm install
-
Run tests:
pnpm test
-
Run lint:
pnpm lint
-
Run lint with automatic fix:
pnpm lint:fix
Feel free to contribute to this repository by submitting pull requests or opening issues.