- Table of Contents
- Demo
- Introduction
- Members
- Background
- What Vault Offers
- Implementation
- Architecture
- Design
- Tech Stack
- How to run locally
- Currently Available Features
- Future Plans
Vault is a revolutionary decentralized dapp that empowers users to have full control over their data, specifically files. This repository contains the backend implementation of the dapp. The frontend repository can be found here.
- Karume Daniel - Backend and Frontend
- Peaches Njenga - Frontend
The motivation for decentralized app storage arises from mounting concerns surrounding data theft, the utilization of personal data for AI training, and the monopolistic control exerted by tech giants over data. In today's digital landscape, centralized data storage poses significant risks, including vulnerability to unauthorized access, data breaches, and manipulation for commercial or political purposes. These concerns have underscored the urgent need for alternative storage solutions that prioritize data security, privacy, and user control.
Vault stands out for its commitment to user-friendliness, ease of use, and seamless file sharing capabilities. By prioritizing these aspects, Vault aims to provide a hassle-free and efficient experience for users.
Vault offers a robust solution to address the pressing need for secure and decentralized data storage. By leveraging blockchain technology, Vault ensures data security and decentralization, mitigating concerns related to data security and centralized control.
Users initiate their journey by connecting their wallet addresses through MetaMask. They can then upload their files to Vault, where they are securely stored using IPFS via Pinata. Notably, only the hash value (CID) for each file is stored on the blockchain, as direct file storage comes with a high cost in terms of blockchain gas fees. This approach strikes a balance between data security and cost-effectiveness.
- Entities
- Tags (enum)
- OTHER
- EDUCATION
- HEALTH
- FINANCE
- BUSINESS
- FAMILY
- RANDOM
- File (struct)
- id (uint)
- owner (address)
- dateUploaded (uint)
- dateModified (uint)
- dateAccessed (uint)
- isFavourite (bool)
- isArchived (bool)
- cid (string)
- name (string)
- description (string)
- extension (string)
- size (string)
- tag (Tags)
- Files (mapping)
- MyVault (mapping)
- AccessList (mapping)
- PreviousAccess (mapping)
- Tags (enum)
- uploadFile: Handles file uploads
- getId: Generates a unique ID for each uploaded file
- getFiles: Retrieves files for the connected wallet address
- getFilesByTag: Retrieves files based on the provided tag
- getFilesMarkedAsFavourite: Retrieves files marked as favorites
- shareVault: Share your Vault with another address
- unshareVault: Unshare your Vault with another address
- getTags: Retrieve available tags
- getUsersWithAccess: Retrieve users with access to your Vault
The backend is deployed locally with Hardhat, and a MetaMask connection is made to the locally deployed contract. The frontend is also deployed locally. The backend is linked to the Pinata API using API keys defined in the .env file.
Below is the mockup for our single-page application. The app consists of two primary containers: the sidebar and the content being displayed. Clicking on the sidebar displays different content on the right side.
- Below are steps to follow in order to run Vault locally.
-
Clone the backend repository:
git clone https://github.com/Karume-lab/Vault-BE
-
Navigate to the backend directory:
cd Vault-BE
-
Install dependencies:
npm install
-
Start the backend server:
npm run start
-
Copy one of the private keys generated and add the account to Metamask. You can find more information here.
-
Deploy the smart contract from the backend repository:
npm run deploy
- Obtain a Pinata API key. You can find more information here.
-
Clone the frontend repository:
git clone https://github.com/Peachy-Njenga/Vault-FE
-
Navigate to the frontend directory:
cd Vault-FE
-
Install dependencies:
npm install
-
Create a
.env
file for the frontend from the.env.example
file and fill in the first three variables for local development. -
Copy the generated contract address from running
npm run dpeloy
in the backend repository to the.env
file in the frontend repository. -
Start the frontend server:
npm run start
-
Uploading Files to the Blockchain: Users can upload their files directly to the blockchain through the Vault dapp. This process ensures that the files are securely stored on the decentralized network, providing immutability and tamper-proofing.
-
Connecting Wallet Addresses from MetaMask: The integration with MetaMask enables users to connect their Ethereum wallet addresses to the Vault dapp. This connection is necessary for interacting with the blockchain, such as uploading files, accessing stored files, and managing account settings.
-
Downloading Uploaded Files to the Local Computer: Users have the ability to download their uploaded files from the blockchain to their local computer. This feature ensures that users can retrieve and use their files outside of the Vault dapp as needed.
-
Marking Files as Favorites: Users can mark specific files as favorites within the Vault dapp. This feature allows users to quickly access and identify their most frequently used or important files.
-
Uploading Files with Specific Tags for Faster Retrieval: Users can assign specific tags to their uploaded files to categorize and organize them. Tags enable faster retrieval of files based on relevant keywords or categories, enhancing the user experience and efficiency of file management.
-
Searching, Filtering, and Sorting: This involves enhancing the user experience by implementing functionality that allows users to search for specific files, filter files based on criteria like tags or upload date, and sort files in different orders (e.g., alphabetical, chronological).
-
Subscriptions and Freemium Model: The team plans to introduce subscription-based features using a freemium model. Freemium refers to offering basic services for free while charging for premium features. This could involve different tiers of subscription plans with varying levels of access or features. Limits may be imposed on daily activities like file shares and uploads for users on the free plan.
-
Improved UI Responsiveness: Enhancing the responsiveness of the user interface ensures that the application adapts well to different screen sizes and devices. This includes optimizing layout, design, and interactions to provide a seamless experience across desktop and mobile platforms.
-
Multiple Tags for Files: Allowing files to have multiple tags enables users to categorize and organize their files more effectively. This flexibility enhances search and retrieval capabilities, as files can be associated with multiple topics or categories.
-
Collecting More User Details: Gathering additional user details during the wallet connection stage can enhance user profiles and provide valuable insights for personalization and targeted features. This may include preferences, usage patterns, and demographic information.
-
Rewarding Users with Ethers: Implementing a rewards system where users earn ethers (cryptocurrency) for sharing Vaults via the platform incentivizes user engagement and promotes growth. Users may receive ethers based on various criteria, such as the number of shares or the popularity of their shared content.