Skip to content

feat: migrating from ddd structure to internachi-modular - #73

Merged
danielhe4rt merged 28 commits into
3.xfrom
feat/heart-modular
Nov 2, 2025
Merged

feat: migrating from ddd structure to internachi-modular#73
danielhe4rt merged 28 commits into
3.xfrom
feat/heart-modular

Conversation

@Clintonrocha98

@Clintonrocha98 Clintonrocha98 commented Nov 1, 2025

Copy link
Copy Markdown
Member

This pull request removes several service provider, route provider, factory, exception, domain, and interface files across multiple modules (Authentication, Character, Feedback, Integrations, Meeting, and Provider). The changes indicate a major cleanup or refactor, likely to remove unused code, consolidate logic, or prepare for a new architecture.

The most important changes are:

Removal of Domain and Provider Registration:

  • Deleted all domain registration files such as CharacterDomain.php, FeedbackDomain.php, MeetingDomain.php, and IntegrationsDomain.php, which previously registered service and route providers for each module. [1] [2] [3] [4]

Removal of Service and Route Providers:

  • Removed all associated service providers and route providers, including those for authentication, character, feedback, meeting, and integrations (e.g., AuthenticationServiceProvider.php, CharacterServiceProvider.php, FeedbackRouteProvider.php, MeetingServiceProvider.php, TwitchIntegrationProvider.php). These files were responsible for binding interfaces to implementations and registering routes. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Removal of Factories and Exceptions:

  • Deleted factory files used for seeding and testing (e.g., PastSeasonFactory.php, MeetingTypeFactory.php) and custom exception classes (e.g., MeetingExceptions.php). [1] [2] [3]

Removal of Domain and Repository Interfaces:

  • Removed several domain-level interfaces such as TwitchService, TwitchOAuthService, and TokenRepository, which defined contracts for various services and repositories. [1] [2] [3]

Removal of Application Layer Logic:

  • Deleted application service files such as PaginateMeetings.php, which handled business logic coordination.

These changes represent a significant structural update, likely as part of a larger refactor or migration effort.

@Clintonrocha98
Clintonrocha98 marked this pull request as ready for review November 1, 2025 22:39
gvieira18 and others added 3 commits November 2, 2025 04:20
- Enhances user and meeting entities
- Add boolean cast for 'is_donator' in User entity
- Refactor UserEntity and remove unnecessary exception documentation
- Update request namespaces for feedback-related requests
- Improve test cases by using Mockery for stubbing
- Change ID fields to string type in various tests and entities
- Refactor meeting entity to handle DateTimeImmutable correctly
- Update routes to use BotAuthentication middleware
This pull request focuses on improving consistency, simplifying test
setups, and cleaning up module configurations across several modules
(`character`, `authentication`, and `feedback`). The most significant
changes include refactoring tests to use real repository implementations
instead of mocks for actions, unifying ID types to strings, simplifying
service provider boot methods, and cleaning up Composer autoload
configurations.

**Test Refactoring and Consistency Improvements:**

* Refactored unit and feature tests in the `character` module to use
actual repository implementations (via `Mockery`) instead of mocking
action classes directly, leading to more realistic and maintainable
tests. This includes changes in `ClaimCharacterBadgeTest`,
`ClaimDailyBonusTest`, `FindCharacterIdByUserIdTest`,
`GetCharacterByUserIDTest`, and `IncrementExperienceTest`. Test data
generation was also unified to use string IDs everywhere, and trait
helpers were improved for flexibility.

* Updated test route middlewares in both `character` and `feedback`
modules to use the `BotAuthentication::class` reference instead of the
string `'bot-auth'`, improving type safety and maintainability.

**Configuration and Module Cleanup:**

* Simplified the `boot()` methods in `AuthenticationServiceProvider` and
`CharacterServiceProvider` to empty methods, likely deferring route
loading to elsewhere or as part of a broader refactor.

* Cleaned up `composer.json` autoload sections for `authentication`,
`character`, and `feedback` modules by removing unnecessary or duplicate
entries, standardizing the structure.

**Other Notable Changes:**

* Removed an unused migration file for the `badge` module, reducing
clutter.

* Fixed namespace imports in `FeedbacksController` to correct the path
to request classes.

* Minor improvements and bug fixes in `DailyRewardEntity`, including
making the class non-final and fixing date handling logic.

These changes collectively improve code quality, consistency, and
maintainability across the project.
@danielhe4rt danielhe4rt changed the title feat/heart-modular feat: migrating from ddd structure to internachi-modular Nov 2, 2025
@danielhe4rt
danielhe4rt merged commit 02a91ee into 3.x Nov 2, 2025
5 checks passed
@danielhe4rt
danielhe4rt deleted the feat/heart-modular branch November 2, 2025 19:45
@igorfelipeduca

Copy link
Copy Markdown

lgtm
image

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.

4 participants