Skip to content

Repository files navigation

Project.superMindmap

Agent-Powered interactive mindmap editor that transforms unstructured documents into structured, editable mindmaps.

Architecture

client (React + TypeScript, port 5173)
  ↕ HTTP REST + WebSocket + SSE
server (Python FastAPI, port 5758)
  ↕ In-memory store + file-based persistence

Quick Start

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • npm

Backend

pip install -r requirements.txt
python main.py --port 5758

Frontend

cd frontend
npm install
npm run dev

Environment Variables

Copy .env.example to .env and configure:

  • OPENAI_API_KEY — LLM provider API key
  • LLM_MODEL — Model name (default: gpt-4o-mini)
  • AUTHENGINE_API_KEY — Optional auth engine key

API Endpoints

Method Path Description
GET /api/v1/health Health check
POST /api/v1/auth/login Login
POST /api/v1/mindmaps Create mindmap
GET /api/v1/mindmaps/{id} Get mindmap
PUT /api/v1/mindmaps/{id} Update mindmap
POST /api/v1/mindmaps/{id}/children Add child node
PUT /api/v1/mindmaps/{id}/nodes/{nid} Edit node
DELETE /api/v1/mindmaps/{id}/nodes/{nid} Delete node
POST /api/v1/mindmaps/{id}/undo Undo
POST /api/v1/mindmaps/{id}/redo Redo
POST /api/v1/documents/upload Upload document
POST /api/v1/chat/sessions Create chat session
POST /api/v1/chat/sessions/{id}/messages Send chat message
POST /api/v1/resources/upload Upload resource
GET /api/v1/resources List resources
DELETE /api/v1/resources/{id} Delete resource
GET /api/v1/resources/search Search resources
GET /api/v1/settings Get settings
GET /api/v1/ws/mindmap WebSocket mindmap sync
GET /api/v1/sse/events/{channel} SSE event stream

Project Structure

backend/
├── app/
│   ├── models/        # Data models (mindmap, chat, document, resource)
│   ├── routes/        # API route handlers
│   ├── services/      # Business logic
│   ├── utils/         # Logging, errors, file utils
│   ├── ws/            # WebSocket endpoints
│   └── sse/           # SSE service
├── lib/               # Core platform libraries
├── requirements.txt
└── main.py

frontend/
├── src/
│   ├── api/           # API client
│   ├── components/    # React components (Canvas, Chat, Header, Resources)
│   ├── hooks/         # Custom hooks (WebSocket, Mindmap)
│   ├── pages/         # Page components (Login, Main)
│   ├── store/         # Zustand state management
│   ├── types/         # TypeScript types
│   └── utils/         # Utilities
├── package.json
├── tsconfig.json
└── vite.config.ts

Features

  • Document-to-Mindmap: Upload PDF, DOCX, TXT, MD, HTML, CSV, PPTX — parsed by LLM
  • Bidirectional Editing: Graphical canvas + LLM chat, synced via WebSocket
  • LLM Tool-Calling: create_child, delete_node, edit_node, search_resources
  • Multi-Resource Context: Upload reference documents for LLM context
  • Undo/Redo: History stack for mindmap operations
  • Real-time Sync: WebSocket + SSE for live collaboration
  • Auth: JWT-based authentication with token/key verification

About

Just super Mindmap.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages