Skip to content

Conversation

@Maselkov
Copy link
Owner

@Maselkov Maselkov commented Oct 18, 2025

The source of lack of any development anytime recently was my burnout - and that, in turn, was caused in no small degree due to the mess the codebase had become

The whole project wasn't designed from the ground up to grow so big, and I never really changed that.

One of the biggest problems was the mixin hell I created, with tight couplings between them. It works, but it's a mess, and no editor can provide any type hints for it. The methods were also strewn about quite randomly, with little structure to them.

So, here is the work in progress refactoring.

Pros:

  • Type hints work now! Editor autocomplete, whatever.
  • Pylance doesn't complain at every opportunity anymore
  • Structure that makes sense

Cons:

  • .. Maybe overcomplicating it?

As one might notice, this was done with the help of co-pilot. It's my first time using it to this scale, and I thought it'd be interesting to learn as well.
I wouldn't really call it vibe-coding in this case, as much as vibe-shifting-existing-code-around.

If you have any feedback regarding this architecture, feel free to share.

The current draft is fully functional, using both the old mixins and the new architecture at the same time

- Added `guildwars2.core.services` package to encapsulate application logic.
- Implemented `AccountService` for account-related operations.
- Created `AchievementsService` to handle achievement calculations.
- Developed `CharactersService` for character data retrieval and attribute calculations.
- Established `InventoryService` for inventory management and item location searches.
- Introduced `KeyService` for centralized API key management.
- Added `Gw2Repository` for database interactions with MongoDB collections.
- Updated `WalletMixin` to improve wallet functionality and embed generation.
- Refactored image processing in `Build` class to use updated PIL methods.
- Removed deprecated `discord-py-interactions` from requirements.
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.

2 participants