ResShare: A Decentralized File Sharing Network Built on ResilientDB and IPFS

 

ResShare - Decentralized File Sharing Application with AI ChatbotResShare is a decentralized file sharing application that allows users to securely store, share, and manage their files using Resili...

ResShare - Decentralized File Sharing Application with AI Chatbot

ResShare is a decentralized file sharing application that allows users to securely store, share, and manage their files using Resilient DB technology. The application now features an AI-powered chatbot that can answer questions about your uploaded documents using Retrieval-Augmented Generation (RAG).

Motivation

With the rapid advancement of personal computing hardware, modern users now routinely own devices equipped with hundreds of gigabytes—or even multiple terabytes—of local storage. However, in practice, a significant portion of this storage capacity remains underutilized. For most users, less than half of their available disk space is actively used, leaving a vast amount of idle storage resources scattered across personal computers worldwide.

At the same time, existing cloud storage solutions rely heavily on centralized infrastructures, which introduce concerns related to cost, scalability, data ownership, single points of failure, and long-term sustainability. Users are required to entrust their data to centralized providers, often with limited transparency or control over how their data is stored, replicated, or accessed.

The core motivation behind ResShare is to bridge this gap by transforming unused local storage into a collectively shared, decentralized storage network. Instead of letting idle disk space go to waste, ResShare enables users to contribute their surplus storage capacity to a peer-to-peer ecosystem, where storage is shared, replicated, and managed in a decentralized and fault-tolerant manner.

By building on ResilientDB for reliable metadata management and IPFS for content-addressed distributed storage, ResShare aims to create a storage system that is not only efficient and scalable, but also resilient to failures and censorship. In this model, storage becomes a shared community resource rather than a centralized service, aligning incentives across users while preserving data ownership and privacy.

Ultimately, ResShare envisions a future where personal devices collaboratively form a decentralized storage backbone—leveraging existing, underutilized resources to provide a more sustainable, trustworthy, and user-centric alternative to traditional cloud storage systems.

Features

Core Features

  • User Authentication (Sign up, Login, Logout)
  • File Upload and Download
  • Folder Creation and Management
  • File Sharing between Users
  • Secure File Storage using IPFS
  • User Account Management

AI Document Assistant

  • Intelligent Document Q&A: Ask questions about your uploaded files
  • Multi-format Support: Works with PDF, DOCX, and TXT files
  • Semantic Search: Finds relevant information across all your documents
  • Privacy-First: Your data stays isolated and secure
  • Source Attribution: See which documents were used to answer your questions

Tech Stack

  • Frontend: React.js with Material-UI
  • Backend: Python Flask
  • Storage: ResilientDB for Metadata storage and IPFS for File Storage
  • Authentication: Session-based authentication
  • AI/ML:
    • Sentence Transformers for embeddings
    • FAISS for vector search
    • Gemini GPT (optional) or local models for response generation
    • LangChain for text processing

Prerequisites

  • Python 3.8+
  • Node.js 16+ and npm
  • IPFS daemon running locally
  • (Optional) Gemini API key for enhanced AI responses

Installation

  1. Clone the repository:
    git clone https://github.com/NoBugInMyCode/ResShareDeployable.git
    cd ResShareDeployable
    
  2. Install backend dependencies:
    pip install -r requirements.txt
    
  3. Install frontend dependencies:
    cd frontend
    npm install
    cd ..
    
  4. Set up AI features (Optional but recommended):
    # For enhanced AI responses, set your Gemini API key
    export GOOGLE_API_KEY="your-gemini-api-key-here"
    

Running the Application

  1. Start the IPFS daemon:
    ipfs daemon
    

    To install IPFS Cluster Service, please refer to this link

  2. Start the backend server:
    python app.py
    
  3. Start the frontend development server:
    cd frontend
    npm start
    

The application will be available at:

  • Frontend: http://localhost:3000
  • Backend API: http://localhost:5000

Using the AI Chatbot

Getting Started with AI

  1. Upload Documents: Upload PDF, DOCX, or TXT files through the normal file upload process
  2. Navigate to AI Chat: Click the “AI Chat” button in the navigation bar
  3. Ask Questions: Type questions about your documents and get intelligent responses

Example Queries

  • “What are the main findings in my research paper?”
  • “Summarize the key points from my meeting notes”
  • “What does my contract say about payment terms?”
  • “Find information about project deadlines”

Supported File Types for AI

  • PDF: Research papers, reports, contracts
  • DOCX: Word documents, meeting notes, proposals
  • TXT: Plain text files, code documentation, notes

AI Features

  • Smart Chunking: Documents are intelligently split into semantic chunks
  • Vector Search: Uses advanced embeddings to find relevant content
  • Source Attribution: Shows which files and sections were used for answers
  • Privacy Preserved: Each user’s AI data is completely isolated

Configuration

Basic Configuration (No API key required)

The AI chatbot works out of the box with:

  • Local sentence transformer models for embeddings
  • FAISS for fast vector search
  • Simple extractive responses

Enhanced Configuration (With Gemini)

For higher quality responses, set up Gemini:

export GOOGLE_API_KEY="sk-your-key-here"

Usage

Standard File Operations

  1. Create a new account using the sign-up feature
  2. Log in to your account
  3. Create folders to organize your files
  4. Upload files to your folders
  5. Share files with other users
  6. Download shared files from other users

AI-Powered Features

  1. Upload Text Documents: Upload PDF, DOCX, or TXT files
  2. Wait for Processing: Files are automatically processed for AI search
  3. Ask Questions: Use the AI Chat interface to query your documents
  4. Get Intelligent Answers: Receive responses with source attribution
  5. Explore Knowledge Base: View statistics about your indexed documents

Architecture

RAG Pipeline

File Upload → Text Extraction → Chunking → Embedding → Vector DB Storage
                                                            ↓
User Query → Query Embedding → Vector Search → Context → LLM → Response

Image

Components

  • Text Extractors: PDF (PyPDF2), DOCX (python-docx), TXT (UTF-8)
  • Chunking: LangChain RecursiveCharacterTextSplitter
  • Embeddings: Google Gemini API (gemini-embedding-001) with configurable dimensions (768/1536/3072)
  • Vector DB: FAISS with per-user isolation
  • LLM: Gemini 2.5 Flash (optional) or extractive fallback