There are a few templates and things if you google 'saas boilerplate'. Most I've found are specific to languages and require a lot of setup. It's an ok idea, just needs to be executed correctly. Laravel really handles a lot of this well and they even developed a paid boilerplate that claims to do billing and other things easily
https://spark.laravel.com/