Tbh i feel like you are over-complicating things. I would look into open source alternatives and see if there is anything that might fit your use case.
There is an open source project, OpenCloud, that might be enough for what you desire to implement.