You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would you like?
I would love to see a modularisation for certain "parts" of the code.
In almost all of the Projects linked to previous WWDCs, Apple split their code into separate and local packages.
Creating modules for UI, Services, etc? Might be a good option.
Why is this useful?
Modularisation declutters code and makes it more accessible for testing, debugging and further development. The code is very clean and has a distinct purpose.
Alternatives considered
Leave the code as is. I'd be happy to split the code into modules. Feel free to drop further suggestions!
The codebase is already well-organized into Models/, Views/, ViewModels/, Services/, Core/, Extensions/. For the current project size (~15 source files), splitting into SPM packages would add build complexity without meaningful benefit.
When it makes sense: If PureMac grows to include a CLI target (#17), a menu bar agent, or a privileged helper — then extracting ScanEngine, CleaningEngine, and the model layer into a shared PureMacCore package would prevent duplication.
Not prioritizing this now, but open to revisiting if the project grows. If you want to prototype the package structure, feel free to submit a draft PR.
Appreciate the offer to help @scholzfuni! The Apple WWDC package pattern is a solid reference. If the CLI target (#17) moves forward, your help splitting out a shared core package would be really valuable.
Now at 25 source files with clear separation. Still not SPM packages, but the folder structure follows the pattern you suggested. When the CLI target is added, extracting a shared PureMacCore package will make more sense.
Thanks for the suggestion - it influenced how we organized v2!
Hey @scholzfuni! Just wanted to let you know - you're credited in the v2.0 README under the Acknowledgments section for your modularization proposal. The v2 folder structure was influenced by your thinking. Thanks!
Activity
momenbasel commentedon Apr 14, 2026
The codebase is already well-organized into
Models/,Views/,ViewModels/,Services/,Core/,Extensions/. For the current project size (~15 source files), splitting into SPM packages would add build complexity without meaningful benefit.When it makes sense: If PureMac grows to include a CLI target (#17), a menu bar agent, or a privileged helper — then extracting
ScanEngine,CleaningEngine, and the model layer into a sharedPureMacCorepackage would prevent duplication.Not prioritizing this now, but open to revisiting if the project grows. If you want to prototype the package structure, feel free to submit a draft PR.
momenbasel commentedon Apr 14, 2026
Appreciate the offer to help @scholzfuni! The Apple WWDC package pattern is a solid reference. If the CLI target (#17) moves forward, your help splitting out a shared core package would be really valuable.
momenbasel commentedon Apr 14, 2026
Hey @scholzfuni! v2.0 expanded the project structure significantly:
Logic/Scanning/ (AppPathFinder, Locations, Conditions, AppInfoFetcher, StringNormalization)
Logic/Utilities/ (Logger)
Models/ (Models, ScanError)
Views/Apps/, Views/Cleaning/, Views/Orphans/, Views/Settings/, Views/Components/
Services/ (ScanEngine, CleaningEngine, FullDiskAccessManager, SchedulerService)
Now at 25 source files with clear separation. Still not SPM packages, but the folder structure follows the pattern you suggested. When the CLI target is added, extracting a shared PureMacCore package will make more sense.
Thanks for the suggestion - it influenced how we organized v2!
momenbasel commentedon Apr 14, 2026
Hey @scholzfuni! Just wanted to let you know - you're credited in the v2.0 README under the Acknowledgments section for your modularization proposal. The v2 folder structure was influenced by your thinking. Thanks!