|
Download FOR_SMLFLG.md from smlflg/BookmarkBrain: direct link, hf CLI and curl.
- Browser
- Download file 3.57 kB
-
https://huggingface.co/smlflg/BookmarkBrain/resolve/main/FOR_SMLFLG.md
- Command line
-
hf download hf://smlflg/BookmarkBrain/FOR_SMLFLG.md
-
curl -L -o FOR_SMLFLG.md https://huggingface.co/smlflg/BookmarkBrain/resolve/main/FOR_SMLFLG.md
3.57 kB
| # BookmarkBrain | |
| ## Was ist das? | |
| Lokaler semantischer Bookmark-Manager fuer 591+ chaotische Browser-Bookmarks. | |
| Suche per natuerlicher Sprache ("der Bash-Cheatsheet von neulich"), auto-Tagging, und Browser-Extension β alles ohne Cloud, ohne Accounts. | |
| ## Architektur & Tech-Stack | |
| ``` | |
| Browser Extension (WXT, Chrome+Firefox) | |
| | HTTP localhost:7471 | |
| FastAPI Backend (backend/main.py) | |
| | | |
| βββ database.py β SQLite + FTS5 + sqlite-vec (alles 1 Datei) | |
| βββ models.py β Pydantic-Modelle | |
| βββ search.py β FEHLT (noch nicht implementiert) | |
| βββ embeddings.py β FEHLT | |
| βββ importer.py β FEHLT | |
| βββ tagger.py β FEHLT | |
| ``` | |
| | Schicht | Tech | | |
| |---------|------| | |
| | Backend | FastAPI + SQLite | | |
| | Vektor-Suche | sqlite-vec (Extension) + FTS5 | | |
| | Embeddings | paraphrase-multilingual-MiniLM-L12-v2 (384 dims, DE+EN) | | |
| | Frontend | htmx + Jinja2 | | |
| | Browser Extension | WXT Framework (TypeScript) | | |
| | Build | uv (Python), pnpm (Extension) | | |
| **DB-Schema (in database.py implementiert):** | |
| - `bookmarks` β url, title, description, context, folder_path, domain, auto_tags, user_tags, embedding_text | |
| - `bookmarks_fts` β FTS5 virtual table | |
| - `vec_bookmarks` β sqlite-vec virtual table fuer 384-dim Embeddings | |
| **Hybrid-Suche (geplant):** 0.7 * semantic + 0.3 * FTS5-normalized | |
| ## Starten / Nutzen | |
| ```bash | |
| cd ~/Projekte/BookmarkBrain | |
| uv venv && source .venv/bin/activate | |
| uv pip install -e . | |
| uvicorn backend.main:app --reload --port 7471 | |
| # β http://localhost:7471 | |
| ``` | |
| Extension (separat): | |
| ```bash | |
| cd extension && pnpm install && pnpm dev | |
| ``` | |
| ## Was funktioniert | |
| - **database.py** β Schema komplett implementiert: bookmarks-Tabelle, FTS5 virtual table, sqlite-vec virtual table, Indizes | |
| - **models.py** β Pydantic-Modelle fuer Request/Response | |
| - **backend/main.py** β FastAPI-App mit Routes (genauen Stand pruefen) | |
| - **PLAN.md** β detaillierter Architektur- und Feature-Plan vorhanden | |
| - **pyproject.toml** β Projekt-Config mit uv | |
| ## Was fehlt | |
| - **search.py** β nicht vorhanden (semantische + FTS-Suche) | |
| - **embeddings.py** β nicht vorhanden (Model-Loading, Embedding-Generierung) | |
| - **importer.py** β nicht vorhanden (Netscape HTML + JSON Import) | |
| - **tagger.py** β nicht vorhanden (Auto-Tagging via TF-IDF + Domain-Rules) | |
| - **Browser Extension** β Grundstruktur im extension/-Ordner, ob kompilierbar unklar | |
| - **Templates** β ob UI-Templates vollstaendig sind, ungeprueft | |
| - **Tests** β test_importer.py, test_search.py, test_tagger.py fehlen noch | |
| ## Entscheidungen & Lessons Learned | |
| - **sqlite-vec statt ChromaDB/FAISS** β Single File, SQL + Vektor kombinierbar, zero dependencies. Richtige Wahl fuer <2000 Bookmarks. | |
| - **paraphrase-multilingual-MiniLM-L12-v2** β 384 dims, DE+EN nativ, 450 MB, CPU-tauglich, ONNX-Beschleunigung moeglich | |
| - **Localhost HTTP statt Native Messaging** β einfacher, Chrome+Firefox identisch, CORS reicht | |
| - **"Was wollte ich damit?"** als First-Class-Feature (context-Feld) β Alleinstellungsmerkmal vs. Raindrop/Linkding/Hoarder | |
| - **Port 7471** β Mnemonic: "BRAIN" auf Telefon-Tastatur | |
| ## Next Steps (priorisiert) | |
| 1. **importer.py** β Netscape HTML Parser fuer bestehende Bookmarks (sofortiger Wert) | |
| 2. **embeddings.py** β Model laden, Batch-Embedding bei Import | |
| 3. **search.py** β Hybrid-Suche implementieren | |
| 4. **tagger.py** β Domain-basierte Tags + TF-IDF | |
| 5. **UI-Templates** vervollstaendigen | |
| 6. **E2E-Test**: Import aus ~/Downloads/bookmarks_05.03.26.html, dann Suche | |
| 7. Browser-Extension nach Phase-1 fertigstellen | |