MindLane is an Electron desktop app for interactive mindmapping with AI assistance. The renderer is a React/Vite app built around @xyflow/react; the Electron main process owns file I/O, provider setup, LangGraph orchestration, session history, memory extraction, and native persistence.
npm run dev # Vite + Electron dev server
npm run build # TypeScript, Vite build, electron-builder
npm run lint # ESLint
npm run test # Vitest via the Electron runtime wrapper
npm run test:watch # Vitest watch modesrc/appcontains the app shell and renderer entry point.src/features/mindmapcontains the React Flow canvas, node registry, custom node components, edge rendering, and mindmap state.src/features/chatcontains the floating chat panel, streaming hooks, and chat session store.src/features/workspacecontains workspace state, file tree UI, and file manager UI.src/features/settingscontains provider/settings UI and persisted settings state.src/sharedcontains renderer-shared helpers such as file format parsing, YAML mindmap parsing, layout, and shortcut registration.electron/main.tswires Electron windows and IPC.electron/preload.tsexposes the typedwindow.mindlanebridge.electron/fscontains workspace,.mindlane, settings, thumbnails, cache, and recent-file persistence.electron/agentcontains LangGraph graphs, provider adapters, tools, message/session context handling, memory, and orchestration.
.mindlanefiles are JSON documents with metadata, mindmap nodes/edges/viewport, and linked document metadata.- Chat UI history is persisted per session as JSONL through
SessionManager/SessionMessageStore. - Long agent contexts are managed by persistent consolidation plus in-memory token-budget compaction.
better-sqlite3andpdf-parseare externalized for Electron packaging;better-sqlite3is unpacked from ASAR.