
GitHub as Cloud Storage
Im sure im not the first consider this approach, but i would like to share a demo for clarity and transparancy. No need to debug, its far from finished and there is much to do.
Im working on a P2P messaging app and generally up until recently i thought in such a system, if a peer is offline, you cant send a message... It wouldnt be "decentralized" if there was some central queue of messages.
It took embarassingly long, but then it hit me... git... just regular git is a decentralized database. Github isnt decentralized, but git can have multiple remotes that can act as redundencies.
In my setup i need the ability for others to be abe to read and only i should be able to write to it. That functionality is out-of-the-box in git.
Git is also pretty standardized so there are many providers if users want to move away from Github.
The storage requirements for my project are fairly small. Typically small text messages. The data itself thats publicly readable would be encrypted (aiming to keep aligned to Kerkhoffs principles).
- code: https://github.com/positive-intentions/git
- demo: https://positive-intentions.github.io/git/demo/gui/git/storage
There is much more to improve and consider there for things like encrypting the data at rest.
I have concerns around if providers like GitHub, Codeberg and Gitlab might see the way my app works as fundamentally violating their terms-of-service.
IMPORTANT DISCLAIMER: This is open source for transparency, testing and demo purposes only. it is still a work in progress and far from finished. you should not use it on any sensitive repositories. There WILL BE breaking changes. Use responsibly.