Hello! I'm looking into designing a modular monolith project. On researching it appears as though its best practice to also try decouple the data layer? I was wondering what other peoples opinions on this were.
I've seen a lot of talk about keeping things modular in the services, modules etc but not a huge amount when it comes to selecting data from the db etc. One post I saw mentioned using schemas or separate databases to split out each modules/service data to keep things decoupled. This might help if there's a future requirement to split out into dedicated microservice projects?
It seems a bit backward to go to lengths on decoupling your domains but share a single db. I've also seen some people decouple the services with event driven stuff over directly calling each service.
I feel like this has probably been reposted in 100 different ways on this discord server D: Sorry if this is a duplicate, I did have a quick search but found nothing related to the terms
Thanks!