[PR #56] [MERGED] NEXT GEN UPDATE: Major project structure refactor, UX Enhanced #81

Closed
opened 2026-10-13 19:46:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/56
Author: @Glitchy-Sheep
Created: 8/5/2025
Status: ✅ Merged
Merged: 8/10/2025
Merged by: @Glitchy-Sheep

Base: dev ← Head: refactor/major-project-structure-refactor


📝 Commits (10+)

  • b5251e1 refactor: 🚚 Initial attempt to create a better project structure
  • fbac343 refactor: ♻️ Fix / Optimize import paths
  • be3de02 refactor: ♻️ Define domain models for downloading posts and represent its different parts
  • 815f18c feat: ✨ Add a more robust exception system for the file downloader
  • 1af5148 feat: ✨ Introduce a better HTML generator which is independent of boosty/domain related stuff
  • c8d366f refactor: ♻️ Big a$$ commit (large structure refactor)
  • e62ecc5 fix: 🐛 Fix file downloading process with signed_query attached
  • ce3e894 feat: ✨ Use basic rich reporter implementation
  • 4df753f fix: 🐛 Fix downloading progress advancing, integrate caching layer
  • eba2098 feat: ✨ Add error handling with clean up

📊 Changes

97 files changed (+3662 additions, -1179 deletions)

View changed files

📝 boosty_downloader/main.py (+236 -151)
📝 boosty_downloader/src/application/__init__.py (+0 -0)
📝 boosty_downloader/src/application/di/__init__.py (+0 -0)
➕ boosty_downloader/src/application/di/app_environment.py (+114 -0)
➕ boosty_downloader/src/application/di/download_context.py (+32 -0)
📝 boosty_downloader/src/application/exceptions/__init__.py (+0 -0)
➕ boosty_downloader/src/application/exceptions/application_errors.py (+54 -0)
➕ boosty_downloader/src/application/filtering.py (+49 -0)
➕ boosty_downloader/src/application/mappers/__init__.py (+30 -0)
➕ boosty_downloader/src/application/mappers/external_video.py (+20 -0)
➕ boosty_downloader/src/application/mappers/file.py (+16 -0)
➕ boosty_downloader/src/application/mappers/html_converter.py (+71 -0)
➕ boosty_downloader/src/application/mappers/image.py (+13 -0)
➕ boosty_downloader/src/application/mappers/link_header_text.py (+156 -0)
➕ boosty_downloader/src/application/mappers/list.py (+69 -0)
➕ boosty_downloader/src/application/mappers/ok_boosty_video.py (+38 -0)
➕ boosty_downloader/src/application/mappers/post_mapper.py (+67 -0)
📝 boosty_downloader/src/application/ok_video_ranking.py (+27 -27)
📝 boosty_downloader/src/application/use_cases/__init__.py (+0 -0)
➕ boosty_downloader/src/application/use_cases/check_total_posts.py (+62 -0)

...and 77 more files

📄 Description

📌 NEXT GEN UPDATE: Major Project Structure Refactor, UX Enhanced

📝 Description

This is a milestone update for the project.

I’ve rethought the overall project design, moving toward a more DDD-like architecture to make the codebase cleaner, modular, and maintainable.

Ambiguous imports are now resolved, and the infamous god-object-manager pattern is gone.

The new structure is more extensible, and it allowed me to implement upcoming features more smoothly - this is no longer a personal MVP, it's now becoming a usable tool. (I hope, lol)

Also introduces new features, caching improvements, and a better UX overall.

⚠ This update includes breaking changes.


🔄 Changelog

✨ Features

  • 🔔 Automatic update checker
    You'll now be notified when a new version is available on PyPI.

  • 📦 Improved caching layer

    • Caches only requested parts (e.g. videos, files) to avoid unnecessary re-downloads.
    • Post cache is invalidated automatically on update.
    • More robust and accurate cache behavior.
  • 🎨 Enhanced HTML generation

    • Support for headings and lists.
    • post_content now shows images and videos.
    • New HTML generator engine with Dark/Light mode support.
  • 📊 Improved CLI UX

    • Better help descriptions and structured option grouping.
    • Improved post counter: now shows accessible/inaccessible posts with names.
    • Enhanced logging and error handling.
  • 🧱 New project structure

    • Modular DDD-like layout.
    • Removed legacy god-objects and monolithic managers.
    • Imports are clearer and more maintainable.
  • 🔃 Retry Logic

    • If post download fails, it will be retried up to 5 times with exponential backoff.
    • After 5 failed attempts, the post will be skipped and not cached.

🐛 Fixes

  • Fixed duplication problem #12 (now posts are cached by UUID and have it as part of the filename, so duplication is no longer an issue)
  • Fixed HTML generation for posts with no content.
  • Fixed newline glitches in HTML output.
  • Proper handling of Ctrl+C interruption with clean ups.
  • Prevented creation of empty directories for posts with no downloadable content.

🔄 Changed

  • Internal logic and APIs adjusted to new architecture.
  • Refactored core components for better separation of concerns.

🗑 Removed

  • Legacy god-object-style post managers.
  • Old structure not aligned with current modular goals.
  • BURN IT WITH FIRE AHAHAHA

📷 Screenshots

New project structure overview

image

✅ Checklist

  • Locally tested (make test and manual check)
  • Documentation updated
  • Code follows style guide (make lint && make format)

⚠ Notes

  • This update contains breaking changes
  • Cache from 1.0.1 is now incompatible with 2.0.0+

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/56 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 8/5/2025 **Status:** ✅ Merged **Merged:** 8/10/2025 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `dev` ← **Head:** `refactor/major-project-structure-refactor` --- ### 📝 Commits (10+) - [`b5251e1`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/b5251e114483c22be536916f03b19a301d96f606) refactor: :truck: Initial attempt to create a better project structure - [`fbac343`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/fbac34359685fa10ff9f6fb56ab3cea03829d893) refactor: :recycle: Fix / Optimize import paths - [`be3de02`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/be3de029b006d0faf986de5e8badc7467f4dfb91) refactor: :recycle: Define domain models for downloading posts and represent its different parts - [`815f18c`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/815f18c5d4899ca81925737f38d1a6a89ef63301) feat: :sparkles: Add a more robust exception system for the file downloader - [`1af5148`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/1af5148f78052a5827135dc29e4fa6be24c4d40a) feat: :sparkles: Introduce a better HTML generator which is independent of boosty/domain related stuff - [`c8d366f`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/c8d366ffaff5e31f09975f5dec6c4339d4bccc5f) refactor: :recycle: Big a$$ commit (large structure refactor) - [`e62ecc5`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/e62ecc5e0bfe545ed8471454014049fccacd7612) fix: :bug: Fix file downloading process with signed_query attached - [`ce3e894`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/ce3e894bdc4b929fc151e417c05dac720b467694) feat: :sparkles: Use basic rich reporter implementation - [`4df753f`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/4df753f27a84d9fb1bf1143c2f5a62ca1995ffd7) fix: :bug: Fix downloading progress advancing, integrate caching layer - [`eba2098`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/eba20984f49a604afb0a8ce5af44ae7d2aad1b13) feat: :sparkles: Add error handling with clean up ### 📊 Changes **97 files changed** (+3662 additions, -1179 deletions) <details> <summary>View changed files</summary> 📝 `boosty_downloader/main.py` (+236 -151) 📝 `boosty_downloader/src/application/__init__.py` (+0 -0) 📝 `boosty_downloader/src/application/di/__init__.py` (+0 -0) ➕ `boosty_downloader/src/application/di/app_environment.py` (+114 -0) ➕ `boosty_downloader/src/application/di/download_context.py` (+32 -0) 📝 `boosty_downloader/src/application/exceptions/__init__.py` (+0 -0) ➕ `boosty_downloader/src/application/exceptions/application_errors.py` (+54 -0) ➕ `boosty_downloader/src/application/filtering.py` (+49 -0) ➕ `boosty_downloader/src/application/mappers/__init__.py` (+30 -0) ➕ `boosty_downloader/src/application/mappers/external_video.py` (+20 -0) ➕ `boosty_downloader/src/application/mappers/file.py` (+16 -0) ➕ `boosty_downloader/src/application/mappers/html_converter.py` (+71 -0) ➕ `boosty_downloader/src/application/mappers/image.py` (+13 -0) ➕ `boosty_downloader/src/application/mappers/link_header_text.py` (+156 -0) ➕ `boosty_downloader/src/application/mappers/list.py` (+69 -0) ➕ `boosty_downloader/src/application/mappers/ok_boosty_video.py` (+38 -0) ➕ `boosty_downloader/src/application/mappers/post_mapper.py` (+67 -0) 📝 `boosty_downloader/src/application/ok_video_ranking.py` (+27 -27) 📝 `boosty_downloader/src/application/use_cases/__init__.py` (+0 -0) ➕ `boosty_downloader/src/application/use_cases/check_total_posts.py` (+62 -0) _...and 77 more files_ </details> ### 📄 Description # 📌 NEXT GEN UPDATE: Major Project Structure Refactor, UX Enhanced ## 📝 Description This is a milestone update for the project. I’ve rethought the overall project design, moving toward a more **DDD-like architecture** to make the codebase **cleaner, modular, and maintainable**. Ambiguous imports are now resolved, and **the infamous *god-object-manager* pattern is gone.** The new structure is more **extensible**, and it allowed me to implement upcoming features more smoothly - this is no longer a personal MVP, it's now becoming a usable tool. (I hope, lol) Also introduces new features, caching improvements, and a better UX overall. > ⚠ **This update includes breaking changes.** --- ## 🔄 Changelog ### ✨ Features - **🔔 Automatic update checker** You'll now be notified when a new version is available on PyPI. - **📦 Improved caching layer** - Caches only requested parts (e.g. `videos`, `files`) to avoid unnecessary re-downloads. - Post cache is invalidated automatically on update. - More robust and accurate cache behavior. - **🎨 Enhanced HTML generation** - Support for **headings and lists**. - `post_content` now shows **images and videos**. - New HTML generator engine with **Dark/Light mode** support. - **📊 Improved CLI UX** - Better help descriptions and structured option grouping. - Improved post counter: now shows accessible/inaccessible posts with names. - Enhanced logging and error handling. - **🧱 New project structure** - Modular DDD-like layout. - Removed legacy god-objects and monolithic managers. - Imports are clearer and more maintainable. - 🔃 **Retry Logic** - If post download fails, it will be retried up to 5 times with exponential backoff. - After 5 failed attempts, the post will be skipped and not cached. ### 🐛 Fixes - Fixed duplication problem [#12](https://github.com/Glitchy-Sheep/boosty-downloader/issues/12) (now posts are cached by UUID and have it as part of the filename, so duplication is no longer an issue) - Fixed HTML generation for posts with no content. - Fixed newline glitches in HTML output. - Proper handling of `Ctrl+C` interruption with clean ups. - Prevented creation of empty directories for posts with no downloadable content. ### 🔄 Changed - Internal logic and APIs adjusted to new architecture. - Refactored core components for better separation of concerns. ### 🗑 Removed - Legacy god-object-style post managers. - Old structure not aligned with current modular goals. - ~~BURN IT WITH FIRE AHAHAHA~~ --- ## 📷 Screenshots ### New project structure overview <img width="1481" height="1799" alt="image" src="https://github.com/user-attachments/assets/01ff9af2-731f-49bc-90b0-87410cc639d5" /> --- ## ✅ Checklist - [x] Locally tested (`make test` and manual check) - [x] Documentation updated - [x] Code follows style guide (`make lint && make format`) --- ## ⚠ Notes - This update contains **breaking changes** - Cache from 1.0.1 is now incompatible with 2.0.0+ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:46:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#81
No description provided.