An AI-powered web application that transforms any topic into beautiful, interactive mind maps. Built with React and Node.js, powered by Groq AI.
Mind Map Generator is a full-stack web application that uses artificial intelligence to automatically generate structured mind maps from user-provided topics. It features a modern, responsive UI with real-time visualization using SVG-based connections and Font Awesome icons.
- Generate mind maps in English, French, or Arabic
- Manual language selector for precise control
- Proper text rendering for all languages
- Color-coded branches with 6 distinct color themes
- Smooth curved SVG connection lines
- Font Awesome icons for visual context
- Gradient backgrounds with subtle decorations
- Central node with glowing effects
- Uses Groq API with
llama-3.3-70b-versatilemodel - Generates 3-5 main branches with 2-4 sub-topics each
- Intelligent icon selection from 80+ categories
- Context-aware content creation
- Download mind maps as high-quality PNG images
- Full resolution capture with proper styling
- Automatic filename based on topic
- React 18 - Component-based UI library
- react-icons - Font Awesome icon components
- html-to-image - PNG export functionality
- CSS3 - Modern styling with gradients and animations
- Node.js - JavaScript runtime
- Express - Web framework
- Axios - HTTP client for Groq API
- dotenv - Environment variable management
- cors - Cross-origin request handling
MindMapGenerator/
โโโ frontend/ # React frontend application
โ โโโ public/ # Static assets
โ โ โโโ index.html # HTML template
โ โ โโโ manifest.json # PWA manifest
โ โ โโโ robots.txt # SEO configuration
โ โโโ src/ # Source code
โ โโโ App.js # Main component with input & download
โ โโโ App.css # Language selector styles
โ โโโ MindMap.js # Mind map visualization component
โ โโโ MindMap.css # Mind map styling
โ โโโ iconMap.js # Icon keyword to component mapping
โ โโโ index.js # React entry point
โ โโโ index.css # Global styles
โ
โโโ backend/ # Node.js backend server
โ โโโ server.js # Express server & API endpoint
โ โโโ promptBuilder.js # AI prompt construction
โ โโโ package.json # Dependencies
โ โโโ .env # API key (create this file)
โ
โโโ README.md # This file
โโโ CODE_DOCUMENTATION.md # Detailed code documentation
- Node.js (v16 or later)
- npm (v8 or later)
- Groq API key (Get one free)
-
Clone the repository:
git clone https://github.com/yourusername/MindMapGenerator.git cd MindMapGenerator -
Install backend dependencies:
cd backend npm install -
Create environment file: Create a
.envfile in thebackenddirectory:GROQ_API_KEY=your_groq_api_key_here PORT=5000 -
Install frontend dependencies:
cd ../frontend npm install
-
Start the backend server:
cd backend npm startServer runs on
http://localhost:5000 -
Start the frontend (new terminal):
cd frontend npm startOpens in browser at
http://localhost:3000
- Enter a topic in the input field (e.g., "Machine Learning", "Ancient Rome")
- Select output language (English, Franรงais, or ุงูุนุฑุจูุฉ)
- Click "Generate Map" or press Enter
- Wait for AI to generate the mind map
- Click "๐ฅ Download PNG" to save the image
Generates a structured mind map for the given subject.
Request:
{
"subject": "Artificial Intelligence",
"language": "en"
}Response:
{
"mindmapData": {
"title": "Artificial Intelligence",
"nodes": [
{
"text": "Machine Learning",
"icon": "brain",
"children": [
{ "text": "Neural Networks", "icon": "network" },
{ "text": "Deep Learning", "icon": "data" }
]
}
]
}
}The AI selects from 80+ icon keywords organized by category:
| Category | Icons |
|---|---|
| Education | education, book, study, school, graduation |
| Technology | science, technology, computer, code, data, server, cloud |
| Business | business, money, chart, growth, finance |
| Health | health, medical, heart, fitness, running |
| Nature | nature, plant, earth, water |
| Creative | art, music, design, idea, camera |
| Travel | travel, plane, car, map, rocket |
| General | star, check, warning, info, settings |
| File | Purpose |
|---|---|
App.js |
Main component: input, language selector, download |
MindMap.js |
SVG visualization with curved connections |
iconMap.js |
Maps 80+ keywords to Font Awesome icons |
promptBuilder.js |
Constructs AI prompts with language support |
server.js |
Express server with Groq API integration |
Frontend:
npm start # Development server
npm build # Production buildBackend:
npm start # Start Express server- Empty input validation with user feedback
- Network request error messages
- AI response parsing with fallbacks
- Download failure notifications
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit changes (
git commit -m 'Add new feature') - Push to branch (
git push origin feature/new-feature) - Open a Pull Request
This project is licensed under the MIT License.
- Groq - Fast AI inference
- React Icons - Icon library
- html-to-image - PNG export