When constructing the backend architecture for a system, keep the concerns separated. This is a general principle followed in containerized designs, but holds true down to smaller components. Even if the component isn't far away and different, keep responsibilities relegated to separate files or directories.