Web application for creating interactive mind maps powered by AI (LLMs)
ChatInVis is a full-stack web application for creating interactive mind maps with LLM integration. Users can ask questions and the system generates structured responses that are visualized as nodes in the mind map.
- Interactive visualization with ReactFlow (zoom, pan, drag & drop)
- LLM integration (OpenAI GPT-4)
- PDF analysis - Extract information from documents
- Feedback system - Refine LLM responses
- Exploration logs - Complete interaction audit trail
- JWT authentication - Secure user system
- MongoDB persistence - Save maps and sessions
- Modern interface with Framer Motion and Lucide icons
ChatinVis-Web-App/
├── client/ # Frontend React + Vite
│ └── src/
│ ├── components/ # React components
│ │ ├── editor/ # Map editor (ReactFlow, popups, panels)
│ │ ├── auth/ # Login/register
│ │ └── sidebar/ # Side navigation
│ ├── pages/ # Pages (Home, Editor, Config)
│ ├── services/ # API communication
│ └── context/ # Global state
├── server/ # Backend Node.js + Express
│ └── src/
│ ├── routes/ # API endpoints
│ ├── controllers/ # Route logic
│ ├── services/ # LLM, PDF, prompts
│ ├── models/ # MongoDB models
│ └── middleware/ # Auth, validation
├── shared/ # Shared code
└── docs/ # Documentation
| Layer | Technologies |
|---|---|
| Frontend | React 18, Vite, ReactFlow, Zustand, TanStack Query, Framer Motion, Axios |
| Backend | Node.js, Express, LangChain, Mongoose, JWT, Winston, Helmet |
| Database | MongoDB |
| LLM Providers | OpenAI (GPT-4) |
| Infrastructure | Docker, Docker Compose |
- Docker and Docker Compose
-
Clone the repository
git clone <repository-url> cd ChatinVis-Web-App
-
Configure environment variables
Create
.envin the root:# LLM API Keys OPENAI_API_KEY=sk-... # Security JWT_SECRET=your-secret-key-here JWT_EXPIRE=7d # Database (automatically set by docker-compose) MONGODB_URI=mongodb://mongo:27017/chatinvis # Server NODE_ENV=development PORT=3001 # CORS CORS_ORIGIN=http://localhost:3000 # Logging LOG_LEVEL=debug
-
Start all services
docker compose up
This starts three containers:
chatinvis-mongo— MongoDB 7 on port 27017chatinvis-server— Node.js backend on port 3001 (with hot reload)chatinvis-client— React frontend on port 3000 (with hot reload)
Source code is mounted as volumes, so changes are reflected immediately without rebuilding.
-
Open the app
Navigate to
http://localhost:3000
- Node.js >= 18.0.0
- npm >= 9.0.0
- MongoDB (local or remote)
-
Clone the repository
git clone <repository-url> cd ChatinVis-Web-App
-
Install dependencies
npm install
-
Configure environment variables
Create
.envin the root:OPENAI_API_KEY=sk-... JWT_SECRET=your-secret-key-here JWT_EXPIRE=7d MONGODB_URI=mongodb://localhost:27017/chatinvis NODE_ENV=development PORT=3001 CORS_ORIGIN=http://localhost:3000 LOG_LEVEL=debug
Create
.envinclient/:VITE_API_URL=http://localhost:3001
-
Initialize database
node seed.js
# Docker (all services with hot reload)
docker compose up
# Or locally, start frontend and backend simultaneously
npm run dev
# Or separately:
npm run dev:client
npm run dev:server| Command | Description |
|---|---|
docker compose up |
Start all services via Docker |
docker compose up --build |
Rebuild images and start |
npm run dev |
Development (client + server) |
npm run build |
Production build |
npm run lint |
Project linting |
- Navigate to the application homepage
- Click on "Register"
- Enter your username, email, and password
- Submit the registration form
- Enter your credentials on the login page
- You'll be redirected to your dashboard
- From the dashboard, click "Create Map"
- Enter a title for your map
- Optionally select a document (PDF) as context
Adding the First Node:
- Type your question or topic in the input field
- The AI will generate a response and create the first node
Expanding Nodes:
- Click on any node to select it
- Type a follow-up question in the input field
- A new child node will be created connected to the selected parent
Node Interactions:
- Drag & Drop: Move nodes around to organize your map
- Zoom: Use mouse wheel to zoom in/out
- Pan: Click and drag the background to move the viewport
- Delete: Click the trash icon on a node to remove it
If you're not satisfied with an AI response:
- Select the node you want to improve
- Click the "Feedback" button
- Enter your refinement instructions
- The AI will regenerate the node content based on your feedback
- Go to the "Documents" section
- Click "Upload PDF"
- Select your file (max size depends on server configuration)
- Wait for the processing confirmation
- When creating a new map, select a previously uploaded document
- The AI will use the document content as context when generating responses
- Ask questions about the document content to extract specific information
- Home: Return to dashboard
- My Maps: View all your saved mind maps
- Documents: Manage uploaded PDFs
- Settings: Configure LLM preferences and API keys
- Logout: End your session
- Save: Automatically saves changes (also manual save button available)
- Undo/Redo: Navigate through your editing history
- Export: Download your mind map as JSON or image
- Logs: View exploration history for the current map
Access the complete history of your interactions:
- Open any mind map
- Click the "Logs" button
- View timestamped records of:
- Questions asked
- AI responses generated
- Feedback provided
- Node modifications
- Configure your OpenAI API key in Settings
- Each map remembers its LLM preference
- Edit node titles and content manually
- Color-code nodes for organization
- Add notes and metadata
- Start broad, then narrow: Begin with general questions, then dive deeper
- Use feedback effectively: Be specific about what you want changed
- Organize as you go: Arrange nodes logically to maintain clarity
- Save regularly: Although auto-save is enabled, manual saves ensure data safety
- Use documents: Upload relevant PDFs to get more accurate, context-aware responses
Map not loading?
- Check your internet connection
- Refresh the page
- Verify you're logged in
AI not responding?
- Ensure your OpenAI API key is configured correctly in Settings
- Review server logs for errors
PDF upload failing?
- Verify file is a valid PDF
- Check file size limits
- Ensure PDF is not password-protected
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/mindmaps- List user's mapsPOST /api/mindmaps- Create new mapGET /api/mindmaps/:id- Get specific map
POST /api/upload- Upload PDF for analysisGET /api/documents- List documents
GET /api/nodelogs/:mindmapId- Get exploration logs
- Fork the project
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
MIT
Based on ChatInVis Browser Extension