An open source web3 cloud storage built with react-native and solidity

Grace Lungu
Coinmonks
3 min readJul 15, 2022

--

Cloud storage of private media such as photos, videos, contacts, and files from a mobile device to a centralized storage, has always been the most reliable way of storing and synchronizing files across devices. However, this service is sustained by providers charging a subscription fee to keep your files available and secure in a centralized storage.

With the rise of web3 technologies and the promotion of decentralized storage, a similar system can be conceived to be self-hosted on the blockchain with little to no monthly subscription and zero risks of being denied access to your own data.

As part of my journey into learning and building web3 apps, I decided to tackle the challenge and build an app somehow similar to apple’s iCloud, named Decloud.

The android mobile application is available on Google Play, but you must have a mobile wallet application like Metamask or similar installed, and some ETH on Ropsten to be able to test.

Decloud ecosystem

Decloud is an open-source project built to provide a decentralized cloud storage by uploading files to the IPFS and saving the record in a private smart contract.

The project is made of three main components, the smart contracts, the mobile application, and IPFS.

Decloud smart contracts

The smart contracts’ purpose is to host the metadata of the files uploaded to IPFS by providing methods to create and delete data with corresponding files and types.

The cloud contract is responsible for hosting and creating private cloud contracts and can be invoked publicly while serving as the main entry point.

The address cloud contract belongs to the initiator and is attached to his wallet, and can only be invoked by the owner for creating and deleting files.

The ownable contract is a basic contract to manage ownership with the above contracts, giving the possibility to the owners of transferring their contracts to a new address.

For the implementation, check out the repository of the contracts, and do not hesitate to raise issues or make contributions.

Decloud react-native mobile app

The mobile application is built with expo and heavily relies on the Walletconnect library to connect and talk to the smart contracts.

The mobile application can connect to a variety of wallet apps such as Metamask or Trustwallet in order to sign transactions when talking to the smart contracts.

To get started, the user must connect his wallet and create a private cloud to be used for storing the metadata. The creation of the private contract can be achieved after the user has uploaded files to the IPFS, which is done by clicking on the upload button and then synchronizing the metadata of the uploads to the private contract.

To contribute and have a look at the implementation check out the mobile app repository.

The IPFS cloud

The files are uploaded to the IPFS using Pinata, where the user is required to create an account and use the provided token for uploading his files. A setting page is provided in the mobile app, where the user can choose to use the default pinata account which is not private in this case, or use the token provided by Pinata.

What’s next?

This is a high-level overview of the project, an introduction to the concept, and the initial implementation. Moving forward, I will be publishing a series of articles going deeper into the concepts and the implementation of each component.

Feel free to contribute, raise issues and leave comments. 😁

New to trading? Try crypto trading bots or copy trading

--

--