Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdeltwabmf/devault
A decentralized alternative to proprietary and centralized cloud storage.
https://github.com/abdeltwabmf/devault
beamer blockchain cryptocurrency cryptography dapp ethersjs hardhat ipfs latex metamask network nextjs nodejs p2p-network solidity thesis wallet web3
Last synced: 7 days ago
JSON representation
A decentralized alternative to proprietary and centralized cloud storage.
- Host: GitHub
- URL: https://github.com/abdeltwabmf/devault
- Owner: AbdeltwabMF
- License: gpl-3.0
- Created: 2022-04-09T07:06:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T01:25:55.000Z (over 1 year ago)
- Last Synced: 2024-08-20T15:06:00.700Z (3 months ago)
- Topics: beamer, blockchain, cryptocurrency, cryptography, dapp, ethersjs, hardhat, ipfs, latex, metamask, network, nextjs, nodejs, p2p-network, solidity, thesis, wallet, web3
- Language: JavaScript
- Homepage: devault.vercel.app
- Size: 24.4 MB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE-OF-CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Devault
A Blockchain-based, self-hosted, and end-to-end encrypted cloud storage.
*If you have any improvements, do not hesitate to post an [issue](https://github.com/AbdeltwabMF/devault/issues/new/choose) or make a [pull request](https://github.com/AbdeltwabMF/devault/pulls).*
*Your support is very much appreciated!* [star on GitHub](https://github.com/AbdeltwabMF/devault/stargazers)
:warning: Active development. Unstable. Breaking changes. You get the point. :warning:## :scroll: Table of Contents
* [About the Project](#tada-about-the-project)
* [Screenshots](#camera-screenshots)
* [Color Reference](#art-color-reference)
* [Tech stack and Tools](#hammer_and_wrench-tech-stack-and-tools)
* [What is Devault](#microphone-what-is-devault)
* [Why Devault](#mag-why-devault)
* [The Problem with Traditional Cloud Storage](#-1-the-problem-with-traditional-cloud-storage)
* [Solution with Devault](#1-the-solution-with-devault)
* [Features](#see_no_evil-features)
* [How Devault Works](#closed_lock_with_key-how-devault-works)
* [Source Code Directory Structure](#ladder-source-code-directory-structure)
* [Getting Started](#biking_man-getting-started)
* [Prerequisites](#yellow_circle-prerequisites)
* [Package Manager](#package-package-manager)
* [Environment Variables](#key-environment-variables)
* [Run for Development](#wrench-run-for-development)
* [Run the Tests](#syringe-run-the-tests)
* [Deployment | Hosting](#sparkles-deployment--hosting)
* [Usage](#thinking-usage)
* [FAQ](#bulb-faq)
* [Future Work](#rescue_worker_helmet-future-work)
* [Community](#hearts-community)
* [Acknowledgements](#gem-acknowledgements)
* [Softwares](#lollipop-softwares)
* [Engineers](#construction_worker-engineers)
* [Tutorials](#books-tutorials)
* [Contributors](#hatching_chick-contributors)
* [License](#warning-license)## :tada: About the Project
`Devault` stands for DEcentralized VAULT
### :camera: Screenshots
| | |
|:---------------------------------------------:|:---------------------------------------------:|
| ![landpage](/public/screenshots/landpage.png) | ![landpage](/public/screenshots/thevault.png) |### :art: [Color Reference](https://coolors.co/palette/264653-2a9d8f-e9c46a-f4a261-e76f51)
## :microphone: What is Devault
Devault is a decentralized, self-hosted, and end-to-end encrypted alternative to proprietary and centralized cloud storage.
### :mag: Why Devault
#### :-1: The Problem with Traditional Cloud Storage
* Data loss
* Data hack
* Data surveillance#### :+1: The Solution with Devault
* No third party can access your files or prevent you from accessing them.
* It prevents the censorship of the data.
* It's nearly impossible to hack AES-256-CBC encryption or even the blockchain.
* It prevents the data from being tampered with.
* It breaks apart the users’ files and distributes them across multiple nodes on the network.
* The smart contract is upgradeable, so the data is never lost when there is a bug fix.#### :see\_no\_evil: Features
* Decentralized
* Blockchain based
* End-to-end encryption/decryption
* Self-hosted
* Open-source### :closed\_lock\_with\_key: How Devault Works
**When you upload a file:**
* The file gets encrypted using AES-256-CBC encryption.
* The encrypted file is split into pieces.
* The chunks are distributed across the network nodes.
* The root hash will be stored in your wallet on the blockchain.**When you download a file:**
* The root hash will be retrieved from your wallet on the blockchain.
* The root hash will be used to retrieve the file chunks.
* The retrieved chucks will be combined and decrypted to represent the original file.### :hammer\_and\_wrench: Tech Stack and Tools
The tools used in this project.
| | Tool | Description |
|:--------------------------------------------------------------------:|:------------------------------------------:|:------------------------------------------------------------------------------:|
| | [Neovim](https://neovim.io/) | IDE |
| | [Next.js](https://nextjs.org/) | Full stack framework |
| | [Hardhat](https://hardhat.io) | Framework for developing, testing, linting and deploying smart contracts |
| | [Solidity](https://docs.soliditylang.org/) | The smart contract language |
| | [Metamask](https://metamask.io/) | Web3 provider |
| | [Ethers.js](https://docs.ethers.io/) | Library for interacting with the Ethereum blockchain |
| | [Ropsten](https://ropsten.etherscan.io/) | Testnet for deploying smart contracts |
| | [Infura](https://infura.io/) | Blockchain node as a service to deploy the smart contracts through it |
| | [IPFS](https://ipfs.io/) | Storing, retrieving and sharing the encrypted files |
| | [Jest](https://jestjs.io/) | Unit testing and code coverage |
| | [Etherscan](https://etherscan.io/) | Verifying transactions and blocks |
| | [Vercel](https://vercel.com/) | Production deployment |
| | [Docker](https://www.docker.com/) | Deploying and shipping the app for production |## :ladder: Source Code Directory Structure
A quick look at the top-level files and directories:
```sh
.
├── __tests__
├── artifacts
├── components
├── contracts
├── docker-compose.yml
├── Dockerfile
├── docs
├── hardhat.config.js
├── jest.config.js
├── next.config.js
├── out
├── package.json
├── pages
├── public
├── scripts
├── SECURITY.md
├── styles
├── .github
└── utils
```* 1. \_\_tests\_\_: contains all the unit tests
* 2. artifacts: produced by hardhat after compiling the smart contracts and containing smart contracts ABIs.
* 3. components: contains all the React components.
* 4. contracts: contains all the smart contracts source code.
* 5. docker-compose.yml: docker-compose file for serving the production build.
* 6. Dockerfile: docker file for building and running next.js app used by docker-compose
* 7. docs: contains all the source code documentation.
* 8. hardhat.config.js: hardhat config file
* 9. jest.config.js: jest config file
* 10. next.config.js: next.js config file
* 11. out: produced by `npm run build2` and contains a static site.
* 12. package.json: npm package manager config file
* 13. pages: contains all pages routes
* 14. public: contains all the assets (ex. images, fonts...)
* 15. scripts: contains all the scripts used to automate the development process (ex. deploy, logger...)
* 16. SECURITY: defining which version receives updates.
* 17. styles: contains all page styles.
* 18. .github: contains automated workflows (CI/CD).
* 19. utils: contains all javascript functions used by other components.## :biking\_man: Getting Started
### :yellow\_circle: Prerequisites
#### :package: Package Manager
This project uses `npm` as a package manager
```sh
pacman -S npm
```#### :key: Environment Variables
To run this project, you will need to add the following environment variables to your `.env` file
`PRIVATE_KEY`
`ROPSTEN_URL`To generate those keys you will need to:
* 1. create infura account
* 2. create a new Ethereum node
* 3. copy the private key to .env
* 4. copy ropsten url to .env`SMART_CONTRACT_ADDRESS_ROPSTEN`
This variable will be set later by the deployment script
### :wrench: Run for Development
* Clone the repo
```sh
git clone https://github.com/AbdeltwabMF/devault.git
cd devault
```* Install dependencies
```sh
npm ci
```* Run the development server and local blockchain node.
```sh
npm run deploy localhost
```* Navigate to `http://localhost:3000`
:green\_circle: *Now you're good to go*
#### :syringe: Run the Tests
* Run the smart contracts test
```sh
npx hardhat test
```* Generates a code coverage report for smart contracts test
```sh
npx hardhat coverage
```* Run the whole project tests
```sh
npm run test
```### :sparkles: Deployment | Hosting
* Deploy using source code and docker
```sh
git clone https://github.com/AbdeltwabMF/devault.git
cd devault
``````sh
docker-compose up --build --force-recreate -d
```* Deploy using official docker image hosted on docker hub
```sh
docker container run -p 3000:3000 -d abdeltwabmf/devault
```* Deploy using vercel
```sh
npm i -g vercel
``````sh
vercel --prod
```* Deploy using static site generation
The generated static site will be in the `out` directory (ex. use `nginx` to serve it)
```sh
npm run build2
```## :thinking: Usage
* 1. Create an Ethereum wallet using [metamask](https://metamask.io/) extension.
* 2. Open [devault website](https://devault.vercel.app/).
* 3. Click connect wallet and follow the steps.
* 4.
Make sure you're on the ropsten network. (settings > advanced > show test networks)
* 5.
Go to ropsten faucet and paste your address to get some ethers. (used for transactions)
* 6. Navigate to [The Vault](https://devault.vercel.app/vault) tab.
* 7. Pick a file and press upload.
* 8. Give a passphrase to encrypt the file. (you can use different passphrases for different files).
* 9. Once the file is successfully uploaded it will appear on the same page with the option to download.
* 10. When downloading give the same passphrase you entered when uploading the file.
* 11. The file is now being downloaded.
## :bulb: FAQ
Why metamask?
- It's the most popular wallet out there, and it's the only wallet supported by the current version of devault.
Is it possible to upload files without ethers?
- No, you should have some ethers to be able to write files' metadata to the blockchain.
What happens when I switch to another account
- The files that is related to that account will be retrieved instead of the previous one.
## :rescue\_worker\_helmet: Future Work
* \[ ] Arabic version.
* \[x] Client-side encryption/decryption.
* \[x] Upload a file.
* \[x] Delete a file.
* \[x] Download a file.
* \[x] Secure file sharing.
* \[ ] Delete selected files.
* \[ ] Search files.
* \[ ] Change passphrase.
* \[ ] Compress files before uploading.
* \[ ] Sort files based on (date, size, name...)
* \[ ] Upload folders.
* \[ ] Download selected files.
## :hearts: Community
The `Devault` community can be found on:
* [Telegram](https://t.me/+OeH3hX00HqxmZDc8)
* [Matrix](https://matrix.to/#/#devault-community:matrix.org)
Where you can ask questions, suggest new ideas, and get support.
## :gem: Acknowledgements
### :lollipop: Softwares
* [eslint](https://eslint.org/)
* [ale](https://github.com/dense-analysis/ale)
* [remix](https://remix.ethereum.org/)
### :construction\_worker: Engineers
* [Osama El-Zero](https://www.youtube.com/c/ElzeroInfo/)
* [Web Dev Simplified](https://www.youtube.com/c/WebDevSimplified/)
* [Patrick Collins](https://www.youtube.com/c/PatrickCollins/)
* [3blue1brown](https://www.youtube.com/c/3blue1brown/)
* [Savjee](https://www.youtube.com/c/Savjee/)
## :books: Tutorials
View
-
How Blockchain works
- Blockchain 101 - Visual demo
- Blockchain 101 - Public / Private keys
- How does a blockchain work
- But how does bitcoin actually work?
- البلوكتشين خطوة بخطوة - مرحلة بناء بلوكتشين وعملة رقمية
- Building a blockchain with Javascript
- Blockchain 101 Tutorial - شرح بالعربي تقنية البلوك تشين
- Awesome Blockchain
-
Understanding the cryptographic part of the Blockchain
-
Data structures used in Blockchain
-
Acronyms and glossaries
-
The smart contract development & security
- Cryptozombies
- Ethereum Official Documentation
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript
- Upgrading your Smart Contracts | A Tutorial & Introduction
- Solidity 0.8
- Solidity Applications
- Security
- Awesome solidity
- Awesome solidity patterns
-
The front end (JavaScript & React)
-
The IPFS protocol
- Welcome to the IPFS docs
- IPFS and the Permanent We
- InterPlanetary File System (IPFS) Tutorial - Building the Distributed Web
- Upload 10000 NFTs to IPFS
- Awesome IPFS
## :hatching\_chick: Contributors
## :warning: License
Licensed under the [GPL-v3](LICENSE) License.