You can follow a layered architecture like Clean Architecture where:
- The Domain layer holds business logic
- The Application layer manages commands/queries (e.g., using CQRS)
- The Infrastructure layer implements persistence, messaging, etc.
I recently created a [GitHub template](https://github.com/yourusername/CsharpDDDTemplate) for this exact pattern. It includes CQRS, DI setup, Docker, Kafka, and more. Might be a useful reference to see a working example.