MindShard: A Self-Hosted Semantic Memory Layer for Your Browsing

14 hours ago 1

MindShard is a shared memory of everything you browse. Built in Rust, it captures and indexes HTTP traffic with vector embeddings, enabling semantic search across your browsing history.

MindShard

MindShard respects your privacy. All processing happens locally, and no third-party services are involved beyond the initial download of the embedding model from Hugging Face.

This project is experimental and should be used for educational purposes only. MindShard intercepts and stores HTTP traffic, which may include sensitive information. Use only in controlled environments. The author is not responsible for any misuse or data exposure resulting from the use of this software.

Have you ever read an interesting article, blog post, or research paper, only to struggle weeks later to recall the source of a quote or idea you remembered? You search through your browser history, try various keyword combinations, but can't locate the original source.

MindShard solves this problem by automatically capturing and indexing everything you read online using vector embeddings. It provides semantic search capabilities that let you find content based on meaning and context, not just exact keyword matches. Simply describe the idea or concept you remember, and MindShard will surface the relevant passages along with links to the original sources.

Think of it as a photographic memory for your web browsing - every article, blog post, and paper you read is preserved and instantly searchable by its actual content and meaning.

  • Rust 1.88 or later
  • OpenSSL

Generate a self-signed certificate and private key:

This creates mindshard.key and mindshard.cer required for the proxy.

Make sure you have the required certificate files (mindshard.key and mindshard.cer) in your working directory.

Quick Start with Docker Compose

The easiest way to run MindShard with Docker:

This will:

  • Build the Docker image
  • Mount your certificates from the current directory
  • Create a persistent volume for the database
  • Start the application with ports 8080 (proxy) and 3000 (web) exposed
docker build -t mindshard:latest .

Important: The Docker container requires mounting the private key and certificate files.

Basic usage:

docker run -d \ --name mindshard \ -p 8080:8080 \ -p 3000:3000 \ -v $(pwd)/mindshard.key:/app/certs/mindshard.key:ro \ -v $(pwd)/mindshard.cer:/app/certs/mindshard.cer:ro \ -v mindshard-data:/app/data \ mindshard:latest

Required:

  • Private Key: -v /path/to/mindshard.key:/app/certs/mindshard.key:ro
  • Certificate: -v /path/to/mindshard.cer:/app/certs/mindshard.cer:ro

Recommended:

  • Database (for persistence): -v mindshard-data:/app/data or -v $(pwd)/data:/app/data

The application is configured via environment variables:

Variable Default Description
MINDSHARD_PROXY_PORT 8080 Port for the HTTP proxy server
MINDSHARD_WEB_PORT 3000 Port for the web server
MINDSHARD_PRIVATE_KEY_PATH mindshard.key Path to the private key file
MINDSHARD_CA_CERT_PATH mindshard.cer Path to the CA certificate file
MINDSHARD_DB_PATH mindshard.db Path to the LibSQL database file

Installing and Trusting the Root Certificate

To avoid browser security warnings when using the proxy, you need to install and trust the generated mindshard.cer certificate as a trusted root certificate authority on your system.

  1. Double-click mindshard.cer to open Keychain Access
  2. Select "System" keychain and click "Add"
  3. Find the certificate in Keychain Access, double-click it
  4. Expand "Trust" section and set "When using this certificate" to "Always Trust"
  5. Close the window and enter your password to confirm

Official guide

  1. Double-click mindshard.cer
  2. Click "Install Certificate"
  3. Select "Local Machine" and click "Next"
  4. Select "Place all certificates in the following store"
  5. Click "Browse" and select "Trusted Root Certification Authorities"
  6. Click "Next" and then "Finish"

Official guide

sudo cp mindshard.cer /usr/local/share/ca-certificates/mindshard.crt sudo update-ca-certificates

For Firefox on Linux, you need to import the certificate separately in Firefox settings under Privacy & Security > Certificates > View Certificates > Authorities > Import.

Official guide

Configuring Your System Proxy

To route traffic through MindShard, configure your system's HTTP(S) proxy settings to point to localhost:8080 (or your configured MINDSHARD_PROXY_PORT).

  1. Open System Settings > Network
  2. Select your active network connection (Wi-Fi or Ethernet)
  3. Click Details > Proxies
  4. Check Web Proxy (HTTP) and Secure Web Proxy (HTTPS)
  5. For both, enter:
    • Server: localhost or 127.0.0.1
    • Port: 8080
  6. Click OK and Apply
  1. Open Settings > Network & Internet > Proxy
  2. Under Manual proxy setup, toggle Use a proxy server to On
  3. Enter:
    • Address: localhost or 127.0.0.1
    • Port: 8080
  4. Click Save

Alternatively, via Command Prompt (as Administrator):

netsh winhttp set proxy localhost:8080

To disable:

netsh winhttp reset proxy

GNOME Desktop:

  1. Open Settings > Network > Network Proxy
  2. Select Manual
  3. For HTTP Proxy and HTTPS Proxy, enter:
    • Host: localhost or 127.0.0.1
    • Port: 8080
  4. Click Apply

Command Line (for current session):

export http_proxy=http://localhost:8080 export https_proxy=http://localhost:8080

Persistent (add to ~/.bashrc or ~/.zshrc):

echo 'export http_proxy=http://localhost:8080' >> ~/.bashrc echo 'export https_proxy=http://localhost:8080' >> ~/.bashrc source ~/.bashrc

Browser-Specific Configuration

Some browsers (like Firefox) use their own proxy settings independent of system settings:

Firefox:

  1. Open Settings > General > Network Settings
  2. Click Settings
  3. Select Manual proxy configuration
  4. For HTTP Proxy and HTTPS Proxy, enter:
    • Host: localhost
    • Port: 8080
  5. Check Also use this proxy for HTTPS
  6. Click OK
Read Entire Article