Skip to content

Zero-trust file custody platform where even the platform cannot misuse data — and suspicious access is detected in real time.

Notifications You must be signed in to change notification settings

Mihirmaru22/vaultZero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

VaultZero Backend

VaultZero Backend is the API server for the VaultZero platform, enabling secure file upload, encryption, and decentralized storage using IPFS. Built with Node.js and Express, it allows users to upload .zip files, which are encrypted and stored both locally and on IPFS. Files can be securely downloaded and decrypted on demand.

Features

  • Upload .zip files via REST API
  • AES-256 encryption of uploaded files
  • Secure file storage and retrieval
  • Decentralized file storage using IPFS
  • Unique download links for each file
  • Automatic cleanup of invalid uploads

Project Structure

VaultZero/
└── vaultzero-backend/
    ├── decrypted/
    ├── encrypted/
    ├── file-encryption/
    │   ├── decryptFile.js
    │   ├── deriveKey.js
    │   ├── encryptFile.js
    │   └── utils.js
    ├── lib/
    │   └── ipfs/
    │       └── uploadToIPFS.js
    ├── metadata/
    ├── uploads/
    ├── package.json
    ├── server.js
    └── README.md

Getting Started

Prerequisites

  • Node.js (v16+ recommended)
  • IPFS daemon running locally (ipfs daemon)

Installation

Clone the repository:

git clone <repo-url>
cd vaultzero-backend

Install dependencies:

npm install

Running the Server

Start the server:

node server.js

The server will run on http://localhost:8000 by default.

API Endpoints

Upload

POST /upload

  • Upload a .zip file (multipart/form-data, field name: file)
  • Response includes:
    • uuid: Unique file identifier
    • ipfsHash: IPFS CID of the encrypted file
    • ipfsUrl: Public IPFS gateway URL
    • downloadUrl: Local download endpoint

Download

GET /download/:uuid

  • Downloads and decrypts the file with the given UUID

Environment Variables

No environment variables are required by default. If you wish to customize directories or secrets, edit the relevant files in file-encryption and server.js.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Zero-trust file custody platform where even the platform cannot misuse data — and suspicious access is detected in real time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published