wild-workouts-go-ddd-example
wild-workouts-go-ddd-example copied to clipboard
How would you transform this architecture into Microservices?
sup, Im currently struggling to find an appropriate architecture for building Microservices in Go. Everyone says something different - no crystal-clear standardization.
It'd be great if you can show me how you would transform this approach to Microservices, bc I pretty like this architecture
Hey -
So for the most part the code base is already split into services..
You have
internal/Trainings internal/Trainer internal/Users
There's absolutely nothing stopping you from copying this three layers and spliting them up into single repositories and or layers. In fact that's the benefit of using something like DDD-lite because you're effectively serpeating your business logic by domain boundary whether your making microservices or not.
In general though, you should be using what ever standardisation is best for you, or your company. DDD / DDD-lite / Ports & Adapters / Hexagonal aren't sliver bullets. Start of simple, refactor when needed.
Sounds coherent ty. I've found my way of structuring my project and it's pretty clean in my opinion. If you're interested, check it out: https://github.com/NicoMarksman/go-license-v2. I also use the workspace feature in VSCode to separate them.