Pulling a service out of a monolith is a distributed systems problem and a refactoring problem at once, and the refactoring is what determines whether the result is any good.
src/
Billing/ ← everything billing, including its own models
Domain/
Http/
Infrastructure/
Ordering/
Shared/ ← the only thing both may import
the rule, enforced in CI:
Billing may not reference Ordering except through
OrderingContracts
Once the boundary holds as a namespace rule with something enforcing it, extracting the service is mostly deployment work — and if the boundary cannot hold in one process, it will not hold across a network either. The failure mode of skipping this is well documented: a service is extracted, the coupling comes with it, and now the coupling is over HTTP with a timeout attached.