A personal browser memory assistant with a local backend and browser extension. MindCache saves and searches pages you choose to capture. Page extraction and model downloads can use the network.
Install Python, uv, Node.js and npm, then run:
./setup.sh
./start.shOpen http://127.0.0.1:8000/app/ and load extension/dist/ as an unpacked extension in Chrome or Brave. The bundled extension connects automatically. New installations start with automatic tracking off; existing saved settings are preserved. Run ./setup.sh --help for build options. Setup installs the locked backend dependencies and extension packages; it requires network access for packages not already cached. It does not download an AI model deliberately.
Embeddings always use EmbeddingGemma 2 on your computer; download it once from the Models page. Text generation is optional: choose a local model, Ollama, or an OpenAI-compatible API with your own key (remote endpoints need explicit consent and HTTPS). Search falls back to lexical results until the embedding model is downloaded. Pages, files, notes and uploads are searched together from the extension overlay, the web app and the desktop app. Words match instantly and meaning follows a moment later. Add folders in the web app at http://127.0.0.1:8000/app/ or the Flutter desktop app in app/ and MindCache keeps their files searchable as they change; results open in the browser or in your default app. Browser capture settings are shared, so changing them in any of the three changes them everywhere. Image OCR can be run explicitly when Tesseract is installed. See PLAN.md for remaining work.
Everything is in the docs/ directory:
| Doc | What It Covers |
|---|---|
| Index / Quick Start | Landing page, prerequisites, backend + extension setup |
| Architecture | System context, ingestion pipeline, extension modules, retrieval |
| API Reference | All REST endpoints with request/response examples |
| AI Pipeline | Embeddings, FAISS search, Ollama summarization |
| Platform Extraction | YouTube, X/Twitter extractors, factory pattern |
| Setup Guide | Backend config, migrations, testing, linting |
| Development Guide | Extension build, project structure, constants, context menus |
| Study Guide | Deep-dive into search, embeddings, vector databases, RAG |
- Local storage — Captured content and indexes are stored locally. Page fetching and model downloads can make network requests. Search and click logging can be controlled and cleared in the web app. The bundled extension connects automatically; the service restricts browser origins but does not authenticate other local programs.
- Background Tab Tracking — Extension monitors tab activations, navigation, closures, and window focus. Computes dwell time per tab. Automatic capture waits for the delay in Browser settings, 10 seconds by default. Deduplicates rapid revisits.
- Path & Extension Blacklists — Automatically filters out login pages (
/login,/signup,/admin), binary files (.exe,.dmg,.zip), images (.png,.jpg), and documents (.pdf,.docx) to keep the index clean. - Client-Side Extraction — Uses the Defuddle library (from Obsidian Web Clipper) to extract page content directly from the DOM. Includes shadow DOM flattening, noise removal (
<nav>,<footer>,.sidebar), URL absolutification, and an 8-second Defuddle timeout with sync fallback. Works behind auth/paywalls and on JS-rendered SPAs. - Four Capture Methods:
- Automatic: Dwell-time-based auto-indexing (configurable via auto-extract toggle).
- Keyboard:
Ctrl+Shift+Sto save the current page instantly. - Popup: "Save to MindCache" button appears when auto-tracking or auto-extraction is off.
- Context Menu: Right-click on a page, link, or text selection to save to MindCache.
- Auto-Extraction Toggle — When disabled, pages are tracked (URL + dwell time) but not extracted or sent to the backend until the user explicitly captures them. Useful for selective indexing and reducing backend load.
- Flexible Extraction Pipeline — If client-side extraction is unavailable (chrome:// pages, PDF viewer), the backend falls back to server-side download via Trafilatura/BeautifulSoup. Platform-specific extractors handle YouTube (yt-dlp + transcripts) and X/Twitter (syndication API).
- Hybrid Search — Combines FAISS vector similarity (cosine, 768d), BM25 lexical matching, title/keyword overlap, platform metadata scoring, and recency decay into a weighted fusion formula. Results below a 0.15 score floor are filtered out.
- Dynamic Quality Boosts — Documents are ranked higher based on dwell time (>60s), word count (>500), source type (GitHub/PDF/docs), transcript availability, and revisit count. Click signals add up to +0.30 boost per query.
- Summaries — Request a summary from an item in the web app using your chosen generation provider. Remote processing is opt-in.
- Spotlight Search UI — Keyboard-first popup (
Ctrl+Shift+K) with debounced query updates, relevance percentage scores, domain badges, keyword tags, and match classification (Best Match ≥65%, Strong Match ≥55%). - Interactive Knowledge Graph — Visualize documents, entities (Persons, Companies, Technologies, Projects), and keywords with co-occurrence edges. Supports entity color-coding, keyword frequency filtering, and multiple color modes.
- Privacy Controls — Auto-tracking toggle, auto-extraction toggle, private search logging mode, per-domain exclusion list, and path/extension blacklists.
MindCache/
├── backend/ # FastAPI server (Python)
│ ├── app/ # API routes, services, models
│ ├── tests/ # Pytest suite (32 tests)
│ └── data/ # SQLite + FAISS + BM25 storage
├── extension/ # Browser extension (TypeScript/React)
│ ├── src/ # Background, content, popup, settings
│ ├── tests/ # Vitest suite (10 tests)
│ ├── dist/ # Build output (content.js 459KB, background.js 28KB)
│ └── public/ # Manifest V3
└── docs/ # Unified documentation (8 files)

