How to create a flexible backend software architecture