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)
- Multi-LLM integration (OpenAI GPT-4, Google Gemini)
- 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) |
- 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:# LLM API Keys (at least one required) OPENAI_API_KEY=sk-... GOOGLE_API_KEY=... # Security JWT_SECRET=your-secret-key-here JWT_EXPIRE=7d # Database MONGODB_URI=mongodb://localhost:27017/mindinvis # Server NODE_ENV=development PORT=3001 # CORS CORS_ORIGIN=http://localhost:3000 # Logging LOG_LEVEL=debug
Create
.envinclient/:VITE_API_URL=http://localhost:5000
-
Initialize database
node seed.js
# Start frontend and backend simultaneously
npm run dev
# Or separately:
npm run dev:client
npm run dev:server | Command | Description |
|---|---|
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
- Switch between OpenAI and Google Gemini
- Configure API keys 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 API keys are configured correctly in Settings
- Check that your selected LLM provider is available
- 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