Skip to content

Feat/ddd - #1

Open
CarlosSimon02 wants to merge 7 commits into
masterfrom
feat/ddd
Open

Feat/ddd#1
CarlosSimon02 wants to merge 7 commits into
masterfrom
feat/ddd

Conversation

@CarlosSimon02

Copy link
Copy Markdown
Owner

DDD Implementation

Overview
Implement Domain‑Driven Design (DDD) across Finora core domains to centralize business logic, improve testability, and increase maintainability.

Why

  • Business logic was scattered and duplicated.
  • Adding features risked breaking unrelated areas.

What changed (high level)

  • Domain layer created: value objects and entities for Transaction, Pot, Budget, Income, and shared types.
  • Value objects: 19 self‑validating VOs (Money, IDs, Names, MaximumSpending, etc.).
  • Entities: 5 aggregates with business logic (Transaction, TransactionCategory, Pot, Budget, Income).
  • Use cases refactored: 37 use cases now thin orchestrators using domain objects.
  • Documentation: 5 docs added (DDD guides, before/after, quick reference).

Benefits / Impact

  • Centralized business logic and validation
  • Safer, unit‑testable domain code (DB not required for domain tests)
  • Reduced validation duplication (≈93% reduction)
  • API contracts, DB schema, and repository interfaces unchanged

Backward compatibility

  • No breaking changes: public APIs and DB schema unchanged; repo interfaces preserved.

Notes for reviewers

  • Focus on src/core/entities/ and src/core/valueObjects/ (validation and invariants).
  • Review refactored use cases in src/core/useCases/ for thin orchestration.
  • See docs/ for patterns, examples, and migration notes.

Next steps / opportunities

  • Use domain events for notifications, analytics, payment integrations, and outbox patterns.

Summary: Centralized domain logic with DDD — safer, cleaner, and easier to extend. Ready for review.

… including Transaction, TransactionCategory, and related value objects for enhanced domain modeling
…validation for transaction IDs and improving pagination parameter checks
…gement, enhancing domain modeling and validation
…anced domain modeling and validation, including creation and update logic
… before & after code examples, quick reference guide, and scaling strategies to enhance understanding and implementation of DDD principles
@vercel

vercel Bot commented Nov 9, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
finora Ready Ready Preview Comment Nov 10, 2025 1:59am

…in entity validation and enhancing data handling, improving overall code quality and maintainability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant