Skip to content

Repository files navigation

Collaborative Mind Map with Velt: A Miro-style mind map with live presence, comments and synced state

Collaborative Mind Map with Velt

A Miro-style mind map with live presence, comments and synced state

A React Flow mind mapping app designed in Magic Patterns that uses Velt for user presence, comments and live state sync, built in Zed with the Velt MCP.


Built by Studio1 Built with Velt Live demo

Velt docs  ·  Velt  ·  More examples  ·  studio1hq.com


Overview

A Miro-style collaborative mind map. The UI was designed in Magic Patterns and built with React Flow for the nodes and edges, then wired to Velt for collaboration. Velt provides user presence, comments on the canvas, and live state sync so every connected user sees the same mind map. It was built in the Zed IDE with the Velt MCP.

A live deployment is at https://collaborative-mind-mapping-tool.vercel.app.

Magic Patterns mind map UI

Mind map with nodes and connected users

More screenshots

Velt MCP in Zed:

Velt MCP in Zed

Comment prompt:

Comment prompt in Zed

Comment implementation:

Comment implementation

Live State Sync prompt and implementation:

Live State Sync implementation

Features

  • Presence: a user list with avatars shows who is connected.
  • Comments: Velt Comments in popover mode let users comment on the canvas.
  • Live State Sync: mind map data is shared between users with Velt's useLiveState.
  • Editable nodes: nodes are draggable and editable inline, with controls to add a child or delete.
  • Canvas controls: zoom and pan, add node and reset map in the navbar, with a default root node "Sales Channels".
  • Theme support: a theme context for the UI.

Tech stack

Layer Tool
Collaboration Velt (@veltdev/react): presence, comments, live state sync
Mind map React Flow (@xyflow/react)
UI design Magic Patterns
Framework React, Vite, TypeScript
Styling Tailwind CSS
Dev tools Zed with the Velt MCP
Deployment Vercel

Getting started

Prerequisites

Installation

git clone https://github.com/Studio1HQ/Collaborative-Mind-Mapping-Tool.git
cd Collaborative-Mind-Mapping-Tool
npm install

Environment variables

Create .env:

Variable Description
VITE_VELT_API_KEY Velt API key, read in App.tsx and passed to VeltProvider.

Run

npm run dev

Open the local URL that Vite prints. Open it in two browser windows to see presence and live sync. Build with npm run build and preview with npm run preview.

How it works

src/
  App.tsx, AppRouter.tsx   VeltProvider setup, user initialization
  components/              MindMap, CustomNode, TextNode, StickyNote, Navbar, UserList, UserAvatar
  hooks/useMindMap.ts      node and edge state, stored with Velt useLiveState
  contexts/ThemeContext.tsx
  types/user.ts

App.tsx wraps the app in VeltProvider and initializes a Velt user. useMindMap.ts keeps the mind map data in useLiveState, so changes sync to every user, and MindMap.tsx renders VeltComments on top of the React Flow canvas.

The UI came from a Magic Patterns prompt asking for a React and TypeScript mind map with a fixed navbar (app name "MindCollab", connected-user avatars, Add Node and Reset Map), a React Flow canvas with draggable, inline-editable nodes with add-child and delete controls, curved edges, zoom and pan, and mock users to be replaced by Velt later.

Resources



Studio1

Built by Studio1, the technical content and DevRel partner for devtool teams. Made with Velt.
Browse more open-source examples at github.com/Studio1HQ.

Website Book a call X LinkedIn

studio1hq.com · Technical content, docs, video and DevRel for devtools

Releases

Packages

Contributors

Languages