How synvo-ai/local-cocoa works
Local Cocoa is an on-device personal knowledge and AI assistant built as an Electron/React application with a documented FastAPI backend. The main user workflow is to select local folders for indexing, then ask questions or search across indexed content and review grounded results. The UI also exposes model setup, scanning and reports, notes, email, and MCP/plugin features. Backend implementation is not in the supplied tree; backend capabilities and ingestion/retrieval stages below are documented in the README, not verified from backend source.
Main entry points: MainAppView.tsx Main workspace · PluginWebview.tsx Plugin UI · preload.ts Renderer API bridge · App.tsx App routing
Components 21
Desktop experience
- App routing
src/renderer/App.tsx - Main workspace
src/renderer/components/MainAppView.tsx - Chat session
src/renderer/hooks/useChatSession.ts - Quick search
src/renderer/components/QuickSearchShell.tsx - Retrieval results
src/renderer/components/RetrievalPanel.tsx - Model setup
src/renderer/components/WelcomeSetup.tsx
Knowledge workflow
- Semantic memory
Local runtime
- Renderer API bridge
src/preload/preload.ts - File operations
src/main/ipc/files.ts - Scan operations
src/main/ipc/scan.ts - Backend client
src/main/backendClient.ts - Local AI backend
- Model management
src/main/modelManager.ts
Extensions
- Plugin lifecycle
src/main/plugins/pluginManager.ts - Plugin UI
src/renderer/components/PluginWebview.tsx - Email plugin
plugins/synvo_ai_mail/frontend/renderer/EmailQAPage.tsx - Notes workspace
plugins/synvo_ai_notes/frontend/renderer/NotesWorkspace.tsx - MCP integration
plugins/synvo_ai_mcp/frontend/entry.ts
Scanning and insights
- Scan workspace
src/renderer/components/ScanWorkspace.tsx - Year in Review
src/renderer/components/YearInReviewModal.tsx
Other components
- User
Connections 27
- User → App routing: opens
src/renderer/App.tsx - App routing → Main workspace: routes to
src/renderer/App.tsx - App routing → Quick search: routes to
src/renderer/App.tsx - User → Main workspace: uses
README.md - Main workspace → Chat session: hosts chat
- Chat session → Renderer API bridge: calls window.api
- Quick search → Renderer API bridge: searches through
- Renderer API bridge → File operations: dispatches IPC
- Renderer API bridge → Scan operations: dispatches IPC
- File operations → Backend client: requests backend
- Scan operations → Backend client: requests backend
- Backend client → Local AI backend: calls local API
README.md - Local AI backend → Semantic memory: indexes and retrieves
README.md - Local AI backend → Model management: uses local models
- Chat session → Retrieval results: shows results
- Model setup → Model management: configures
- Main workspace → Plugin UI: offers extensions
- Plugin lifecycle → Plugin UI: registers UI
src/main/plugins/pluginManager.ts - Plugin UI → Email plugin: renders plugin
- Plugin UI → Notes workspace: renders plugin
- Plugin UI → MCP integration: hosts integration
- Email plugin → Semantic memory: indexes mail
README.md - Notes workspace → Semantic memory: adds note memory
README.md - Main workspace → Scan workspace: offers scanning
- Scan workspace → Scan operations: requests scans
- Scan workspace → Year in Review: opens report
- Year in Review → Semantic memory: uses indexed content