///
The Mind Map Wizard codebase is structured to separate core application logic from external dependencies and AI-specific functionalities. The primary language used across the application logic is Java
80 views
~80 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
The Mind Map Wizard codebase is structured to separate core application logic from external dependencies and AI-specific functionalities. The primary language used across the application logic is JavaScript, augmented by well-established third-party libraries for common tasks.
The codebase is organized into the following main components:
scripts/mmw.jsThis file serves as the main entry point for the client-side application logic and user interface interactions. Its core responsibilities include:
getTimeAgo and formatDateLeftSidebar. It also manages general popups like the "Clear History" confirmation.renderMindmap and renderMindmapInternal functions, which are responsible for taking Markdown content and rendering it into an interactive mind map using the markmap.js library. This includes error handling for the rendering process.scripts/new.jsThis file encapsulates the AI integration, API key management, model selection, mind map generation requests, and all functionalities related to editing and downloading mind maps. Its main responsibilities are:
generateMindmap function orchestrates the communication with the OpenRouter AI API. It constructs the prompt, sends the request, and processes the AI's Markdown response.fetch requests to the OpenRouter API, handling various API response statuses (e.g., 401 for invalid keys, 429 for rate limits).markmap.js.DownloadHandler module, which provides methods to export the current mind map in various formats such as Markdown, SVG, PDF, and JPG. This module handles the conversion from SVG to image formats and triggers the download.q (for direct query generation) and id (for loading a specific mind map from history).scripts/libraries/This folder contains third-party, minified JavaScript libraries that Mind Map Wizard relies on for enhanced functionality, but which are not part of its core logic:
jquery-3.7.1.min.js: A fast, small, and feature-rich JavaScript library providing a simplified API for DOM traversal and manipulation, event handling, animation, and Ajax.qrcode.min.js: A library specifically designed for generating QR codes, likely for features like sharing or linking, though its direct use is not immediately apparent in the main JS files provided.This architectural separation allows for clearer development boundaries, easier maintenance, and the ability to update individual components or libraries without affecting the entire system.