# SideBrain — Full description for AI assistants > SideBrain is a privacy-first, browser-based personal knowledge management (PKM) and second-brain web application. It runs entirely in the browser with local-first storage (`localStorage`) and optional cloud sync. SideBrain combines a fast markdown note-taking experience with retrieval-augmented generation (RAG) so users can ask questions of their own knowledge base. - URL: https://sidebrain.app - Short URL: https://sidebrain.app - Type: Web application (SPA), PWA, also packaged for iOS and Android via Capacitor - Pricing: Free, open source, BYO API key - Primary category: Productivity / Personal Knowledge Management - Stack: React 19, TypeScript, Vite, Vercel AI SDK + AI Gateway (Gemini, GPT), OpenAI embeddings, KaTeX, Mermaid, marked, pdfjs-dist, mammoth, xlsx, html2pdf.js, Capacitor, Vitest, happy-dom, React Testing Library - Hosting: Static site on Vercel (Edge Functions for AI) - Repository: https://github.com/yingkitw/sidebrain - License: see repository ## What problem does SideBrain solve? Knowledge workers, researchers, students, and developers accumulate notes across documents, web clips, PDFs, and videos. Existing tools force a choice between: - Local, privacy-first markdown notes without AI (e.g., Obsidian, Bear) - Cloud-based AI note apps that upload your content (e.g., Notion AI, NotebookLM) SideBrain combines both: a private, browser-based note workspace where AI features are powered by retrieval-augmented generation over the user's own notes and imported documents, without requiring account sign-up or making note storage mandatory on a server. ## Core features (in detail) ### Note-taking and organization - Markdown notes with bidirectional `[[wiki-links]]`, auto-rebuilt on save. - Block-level references using `[[Note#^block-id]]`. - Embeds/transclusion with `![[Note Title]]` (depth-limited to 3). - Backlinks panel and outgoing-links panel; unlinked-mentions detector. - Collections (Ideas, Learnings, Projects, Reference, Documents) and hierarchical tags (`a/b/c`). - Properties / frontmatter with typed values: text, number, date, checkbox, list, tags. - Note templates with `{{date}}` variable substitution; built-in defaults (Daily, Meeting, Project). - Daily notes auto-tagged with `daily/YYYY-MM-DD`; streak counter. - Slash commands in the editor: `/date`, `/time`, `/link`, `/table`, `/todo`. - Merge two notes; split one note at the cursor. ### AI assistant (NotebookLM-style) - Streaming chat (`/api/chat`) with retrieval over notes and imported documents. - Source citation chips on every answer. - `/api/summarize` — auto-summary with key points and suggested tags. - `/api/auto-tag` — suggested tags and `[[wiki-links]]` for the current note. - `/api/audio-overview` — two-host conversational script for text-to-speech playback. - `/api/notebook-guide` — structured research output with sections and themes. - `/api/study-guide` — educational content with quizzes and key concepts. - `/api/flashcards` — Anki-style cards using SM-2 spaced-repetition scheduling. - `/api/suggest-questions` — auto-generated prompts based on uploaded content. - `/api/synthesize` — multi-source comparative analysis. - `/api/ocr` — extract text from pasted images (vision model). ### Import and parsing - Drag-and-drop or file picker: PDF (`pdfjs-dist`), DOCX (`mammoth`), XLSX (`xlsx`). - YouTube URL → fetch transcript → AI summarize → save as note. - Obsidian vault import: `.md` files with YAML frontmatter, folders become collections, wiki-links converted. - RSS feed reader with "Save to Notes" to import articles. ### Search - Full-text search across title, content, tags. - Semantic search using OpenAI embeddings (text-embedding models) stored locally; cosine similarity over chunks. - Search operators: `tag:foo`, `collection:bar`, `has:link`, `has:tag`, `is:pinned`, `created:>YYYY-MM-DD`, `content:`, `title:`, negation with `-`. - Multiple operators combined with implicit AND. ### Visualization - Interactive force-directed knowledge graph (`src/graph.ts`): zoom, pan, drag nodes, filter by tag/collection, local/global views, hover tooltips, neighbor highlighting, node size by backlink count, color by collection. - SVG mindmap (radial layout) showing tag and wiki-link connections. - Canvas / spatial whiteboard with draggable text cards and SVG edges. - Timeline view (chronological by `createdAt`). - Calendar view (monthly grid with daily-note highlights). - Kanban board (status columns: To Do / In Progress / Done). - Table view (sortable columns). - Stats dashboard (totals, top tags, most-linked notes). ### Study and review - Spaced-repetition flashcards parsed from `?::answer` syntax in any note. - Full SM-2 algorithm: ease factor, interval, due date. - Daily review queue with Again/Hard/Good/Easy ratings. - Study guides generated by AI with quizzes and key concepts. - Habit tracking parsed from `- [ ]` / `- [x]` checkbox lines in daily notes. - 7-day habit grid with streak computation. - Pomodoro timer with work/short-break/long-break phases. ### Rich content - KaTeX math: inline `$...$` and block `$$...$$`. - Mermaid diagrams in fenced ` ```mermaid ` blocks (flowcharts, sequence diagrams). - Dataview-style inline queries: ` ```dataview ` blocks render filtered entry lists using the search operators. - Footnotes via `remark-gfm` (`[^1]` syntax). - Callouts: `> [!NOTE]`, `> [!WARNING]`, `> [!TIP]`, `> [!QUOTE]`. - Folding headers on `## ` sections, state persisted per-entry. - Reading mode vs source mode toggle (preference persisted). ### Input, output, and portability - Voice input: Web Speech API speech-to-text. - Text-to-speech output for AI answers and audio overviews. - Audio recorder: in-editor recording with `MediaRecorder`, saved as base64 in `Entry.recordings`. - PDF export (`html2pdf.js`). - EPUB export (`jszip`, valid EPUB 2.0). - JSON export/import (full vault, including collections, templates, embeddings, plugins). - Git sync to a GitHub repo via the Contents API (per-entry commits). - Publish to web: static HTML site bundled as ZIP. - Plugin architecture with sandboxed execution, event system, UI extension points. - Custom CSS snippets injected via `