fadblock icon indicating copy to clipboard operation
fadblock copied to clipboard

[Feat] Refactor repo with build tools

Open gund opened this issue 1 year ago • 1 comments

Closes #6 Closes #5

Following the conversation regarding the maintainability of this codebase, here are changes that address them all:

  • Reuse as much code as possible between different extensions (core logic is fully reused, only small "glue" code is left per each extension)
  • Introduce a build step to be able to reuse code (using rspack as a fast build tool for both service worker and UI builds)
  • Refactor UI into components to split the code and make it more maintainable in the long run
  • Use NX monorepo to manage code (extensions are built as apps and reusable code is in libs)
  • Add MIT license to the repo

There are many changes so I would advice you to carefully review at least the main logic files in libs/core.

I would also strongly suggest adding a CI (Continuous Integration) to be able to constantly build extensions here in Github Actions and maybe even add an auto-release workflow to publish extensions automatically to respective stores. And maybe adding some unit tests at least for the core logic would be great too.

For the future improvements I would also suggest dropping jQuery from UI and replacing it with something more modern like Bootstrap or similar. Also it is probably a good idea to move out all the classes for adblocking into a config which could be fetched remotely so the extension does not have to be updated to pickup new config.

Please have a look and let me know what do you think. Cheers!

gund avatar Oct 22 '23 06:10 gund

That looks awesome!

I'll review the changes once the weekend is over.

0x48piraj avatar Oct 22 '23 08:10 0x48piraj