When some time ago I started modernizing PoP's codebase to using Composer as its foundational framework for package management, I decided to also decouple PoP's codebase from WordPress, making it CMS-agnostic.
I have recently published an extensive account of it, split into 2 parts, for Smashing Magazine. If you need to:
👉 Migrate your WordPress PHP code to other platforms
👉 Or re-use your Gutenblock PHP code for Laravel, Drupal
👉 Or make your application code more understandable, dealing only with business logic
👉 Or you are simply interested to know how the abstraction is accomplished
...then check my articles on Smashing: