project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

codstorage

Store your git repositories in IPFS, IPLD and commits on Ceramic

codstorage

Created At

HackFS 2022

Winner of

3️⃣ IPFS/Filecoin — Web3 it!

Project Description

My idea is to create an equivalent to web3.storage, but for git repositories. Yet, I want to make the code, and its history, completely integrated with IPFS, using IPLD.

My project consists of a web server where people can push their code to. The server automatically saves the data into IPFS and the whole history tree in IPLD. This way, we can navigate through the repo state by just using IPFS!

In order to use it you just create a repo and push code to the endpoint of the deployed application, like so:

$ git init --initial-brach main $ git remote add codstorage https://codstorage.herokuapp.com/your-repo-name $ git push codstorage

You should see the hash for the repo and the IPLD structure, like so:

remote: Resolving deltas: 100% (269/269), done. remote: remote: IPLD: bafyreigzsj5muwrjxhlttpkcv2pi3uchvjqz4sd5vjcnttj2y25vhatu44 remote: IPFS: QmZo9Qy9sVf65MgWo55QhRV4qgFgGh1YdmX8GJbwGK8MQQ remote:

You can also clone the repo using the IPFS hash. Doing the following should work

$ git clone https://codstorage.herokuapp.com/QmZo9Qy9sVf65MgWo55QhRV4qgFgGh1YdmX8GJbwGK8MQQ

As future improvments, I'd like to include IPNS, in order to have a static address for the repos. Also, I'd like to make the service more robust. Right now, it is very fragile.

How it's Made

This project make heavy use of IPFS/IPLD. It is the backbone of the proejct. The data is stored in both ways. Raw, the git repo itself. Structured, where I save all commits, hashes and the tree structure in IPLD. In few words, I take the repository stored in disk and convert it in a way that can be stored in IPFS. The files are stored normally, but the whole git history, commits, branches, etc. is stored with IPLD.

Ceramic was used to store user related information. For example, liked repositories. This approach can be further developed to include user profiles, making use of the "basicProfile" schema, for example.

XMTP was used to create "sharing" interactions. In order to allow users to share hashes in the git structure with friends.

background image mobile

Join the mailing list

Get the latest news and updates