English | 简体中文
MindForest is a dual-layer visual knowledge workspace: the Tree View helps you dive deep into a topic while the Graph View exposes cross-topic relations. The app blends trees, graph canvas, and a Markdown editor so you can grow and reorganize your forest of ideas with an immersive flow.
Current version: 0.1.0-alpha · See CHANGELOG.md for updates.
The desktop app bundles the Rust API and SQLite; the backend is required.
- Build/export the frontend (Execute from root directory):
npm run build rm -rf rust-mindforest/apps/.tauri-dist mkdir -p rust-mindforest/apps/.tauri-dist cp -R out/* rust-mindforest/apps/.tauri-dist - Package or run the desktop app:
cd rust-mindforest/apps/desktop cargo tauri build # packaged app # or cargo tauri dev # live dev (expects Next dev at :13000)
- Launch the app. It auto-starts the Rust API on
127.0.0.1:8787, waits for it, then picks an existing topic or creates “My Forest”. Data is stored in SQLite at~/Library/Application Support/com.mindforest.desktop/mindforest.db(orDATABASE_URL).
DevTools (when needed): run the app with TAURI_DEVTOOLS=1 .../MindForest.app/Contents/MacOS/desktop, then ⌥+⌘+I.
Gatekeeper note (macOS, unsigned builds): if you see “app is damaged” on first open, remove quarantine:
xattr -dr com.apple.quarantine /Applications/MindForest.app
# or on the DMG before mounting: xattr -dr com.apple.quarantine MindForest.dmg- Tree ↔ Graph toggle – The bottom dock (Framer Motion) switches between
TreeLayer(orbital layout around the focus node) andGraphLayer(react-force-graph-2d). - Node authoring panel –
NodeEditorPanelprovides node deletion, child addition, inline breadcrumbs, Write/Read toggle, back/forward navigation history, clickable connection chips, and a dropdown connection picker. - Local persistence – Zustand with
persiststores the forest inlocalStorage, enabling offline edits. - Expressive motion language – Tailwind CSS v4 plus a custom forest palette (
src/app/globals.css) delivers glassmorphism, glow, and film-grain accents. - Extensible data model –
ForestNodetracks both hierarchicalchildrenand semanticlinks, paving the way for multiple layouts and syncing strategies.
- Frontend: Next.js 16 App Router, React 19, TypeScript
- State: Zustand + Immer + uuid
- Animation & Canvas: Framer Motion, react-force-graph-2d
- UI utilities: Tailwind CSS 4, tailwind-merge, lucide-react, React Markdown, react-textarea-autosize
rust-mindforest/ # Rust workspace: domain, storage (memory/postgres/sqlite), API, desktop
├─ crates/ # domain + storage implementations
├─ apps/api/ # Axum HTTP API (topics/nodes)
└─ apps/desktop/ # Tauri desktop wrapper (bundles API + SQLite)
src/
├─ app/ # App Router (layout.tsx, page.tsx, global styles)
├─ components/
│ └─ workspace/ # TreeLayer · GraphLayer · WorkspaceShell · NodeEditorPanel
├─ hooks/ # Shared hooks (useDebounce)
├─ store/ # Zustand slices (useForestStore)
└─ types/ # Shared interfaces (forest.ts)
public/ # Static assets & previews
| Area | Description |
|---|---|
src/components/workspace/WorkspaceShell.tsx |
Client entry point that manages the dock, view toggles, sidebar animation, and layer composition. |
TreeLayer.tsx |
Bubble tree view that uses Framer Motion layoutId for seamless scaling, hover states, and parent breadcrumbs. |
GraphLayer.tsx |
Force-directed graph with responsive sizing, automatic focus/offset handling when the sidebar is open, and custom canvas rendering. |
NodeEditorPanel.tsx |
Inline breadcrumb path, Write/Read toggle, back/forward navigation controls, clickable connection chips, dropdown link picker, metadata, and debounced saves. |
useForestDataStore.ts / useWorkspaceUIStore.ts |
Nodes CRUD + persistence, plus UI state for focus/view/sidebar and navigation history (goToNode, goBack, goForward). |
- Install dependencies
npm install # or pnpm install - Start the Rust API (required for real data)
cd rust-mindforest DATABASE_URL="sqlite://$HOME/Library/Application Support/com.mindforest.desktop/mindforest.db" \ API_ADDR=127.0.0.1:8787 \ cargo run -p api
- Local frontend development
Visit
npm run dev # or pnpm devhttp://localhost:13000to seeWorkspaceShell. - Production build / preview
npm run build npm run start # Run the prod server locally before releases # or pnpm build / pnpm start
- Quality gates
npm run lint # ESLint + Next.js Core Web Vitals # or pnpm lint
Use Node 18+ and make sure dev server, build, and lint pass before committing.
- The Rust API is mandatory; the desktop app runs it in-process on
127.0.0.1:8787and the frontend points there by default. - If you prefer to run the API standalone (e.g., Postgres), start it from
rust-mindforest(see its README) and set:NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8787(or your port)
- The workspace hydrates from the remote topic on load and mirrors edits (add/update/delete/link) back to the API; stale IDs are cleared automatically on 404s.
ForestNode(src/types/forest.ts) keeps bothchildren(tree) andlinks(graph) references;typecurrently supportsconcept | fact | source | question.useForestDataStoreexposes:nodes,rootNodeIdaddNode,updateNodeTitle,updateNodeContent
useWorkspaceUIStorehandles UI/focus:focusedNodeId,viewMode,isSidebarOpen, navigation stacksgoToNode,goBack,goForward,toggleView,toggleSidebar,hydrateEditorDraft
persistonly saves the data layer (nodes,rootNodeId) to keep UI state predictable after refresh.
- MVP
- Node CRUD, Tree View, focus transitions, local persistence
- Alpha
- Enhanced Graph View, accounts, cloud sync, bulletin board
- Beta
- Multiple layouts (Pythagorean / Radial / Flow), AI assistant, community features (Fork / Upvote / Learning Paths)
- Branch from
mainand keep a clean rebase history. - Write present-tense commits (e.g.,
feat: expand node inspector) and list build/lint/test status plus screenshots in PRs. - Attach interaction videos or screenshots for UI work; flag breaking changes explicitly.
Let’s keep growing the MindForest together. 🌿