-
Notifications
You must be signed in to change notification settings - Fork 0
Implement JSONMind - Interactive JSON to mind map visualization and editing tool #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
34d0f37
8241e4b
5522c9b
e8a6e2b
f5bd515
a2a5f1a
af2d56b
2f25d8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,192 @@ | ||||||
| # JSONMind - JSON Visualization Tool | ||||||
|
|
||||||
| [](https://opensource.org/licenses/MIT) | ||||||
|
|
||||||
| Transform JSON data into interactive mind maps for better visualization and understanding. | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| ## 🌟 Features | ||||||
|
|
||||||
| - **Visual JSON Representation**: Automatically converts JSON data into intuitive mind map structures | ||||||
| - **Real-time Synchronization**: Bidirectional sync between JSON editor and mind map visualization | ||||||
| - **Type-based Color Coding**: Different colors for different data types | ||||||
| - 🟢 **Green**: String values | ||||||
| - 🔵 **Blue**: Number values | ||||||
| - 🟠 **Orange**: Boolean values | ||||||
| - ⚪ **Grey**: Null values | ||||||
| - 🟡 **Orange Container**: Object nodes | ||||||
| - 🔵 **Blue Container**: Array nodes | ||||||
| - **Split Node Design**: Combined key-value display for primitive types | ||||||
| - **Interactive Navigation**: Zoom in/out, pan, and center content | ||||||
| - **JSON Validation**: Real-time JSON syntax checking with error messages | ||||||
| - **Format JSON**: One-click JSON beautification | ||||||
|
|
||||||
| ## 🚀 Getting Started | ||||||
|
|
||||||
| ### Prerequisites | ||||||
|
|
||||||
| - Node.js (v16 or higher) | ||||||
| - npm or yarn | ||||||
|
|
||||||
| ### Installation | ||||||
|
|
||||||
| 1. Clone the repository: | ||||||
| ```bash | ||||||
| git clone https://github.com/HoChihchou/JSONMind.git | ||||||
| cd JSONMind | ||||||
| ``` | ||||||
|
|
||||||
| 2. Install dependencies: | ||||||
| ```bash | ||||||
| npm install | ||||||
| ``` | ||||||
|
|
||||||
| 3. Start the development server: | ||||||
| ```bash | ||||||
| npm run dev | ||||||
| ``` | ||||||
|
|
||||||
| 4. Open your browser and navigate to `http://localhost:5173` | ||||||
|
|
||||||
| ### Building for Production | ||||||
|
|
||||||
| ```bash | ||||||
| npm run build | ||||||
| ``` | ||||||
|
|
||||||
| The built files will be in the `dist` directory. | ||||||
|
|
||||||
| ## 📖 Usage | ||||||
|
|
||||||
| 1. **Edit JSON**: Type or paste JSON data in the left editor panel | ||||||
| 2. **Auto-visualization**: The mind map updates automatically as you type | ||||||
| 3. **Format**: Click "Format JSON" to beautify your JSON | ||||||
| 4. **Navigate**: Use zoom controls to explore large JSON structures | ||||||
| 5. **Validate**: Check for syntax errors with real-time validation | ||||||
|
|
||||||
| ### Example JSON | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "name": "JSONMind", | ||||||
| "version": "1.0.0", | ||||||
| "author": "Developer", | ||||||
| "license": "MIT", | ||||||
| "features": ["visualization", "editing"], | ||||||
| "status": "active", | ||||||
| "count": 42, | ||||||
| "enabled": true | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ## 🏗️ Architecture | ||||||
|
|
||||||
| ### Technology Stack | ||||||
|
|
||||||
| - **Frontend Framework**: React 19.2 + TypeScript 5.9 | ||||||
| - **State Management**: Zustand 4.4 | ||||||
| - **Graph Visualization**: AntV X6 2.18 | ||||||
| - **Build Tool**: Vite 7.x | ||||||
|
||||||
| - **Build Tool**: Vite 7.x | |
| - **Build Tool**: Vite 5.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a2a5f1a. Updated to "Vite 5.x" to match actual version.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||||||||||||||||||||||||||
| import js from '@eslint/js' | ||||||||||||||||||||||||||||||
| import globals from 'globals' | ||||||||||||||||||||||||||||||
| import reactHooks from 'eslint-plugin-react-hooks' | ||||||||||||||||||||||||||||||
| import reactRefresh from 'eslint-plugin-react-refresh' | ||||||||||||||||||||||||||||||
| import tseslint from 'typescript-eslint' | ||||||||||||||||||||||||||||||
| import { defineConfig, globalIgnores } from 'eslint/config' | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| export default defineConfig([ | ||||||||||||||||||||||||||||||
| globalIgnores(['dist']), | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| files: ['**/*.{ts,tsx}'], | ||||||||||||||||||||||||||||||
| extends: [ | ||||||||||||||||||||||||||||||
| js.configs.recommended, | ||||||||||||||||||||||||||||||
| tseslint.configs.recommended, | ||||||||||||||||||||||||||||||
| reactHooks.configs.flat.recommended, | ||||||||||||||||||||||||||||||
| reactRefresh.configs.vite, | ||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| { | |
| files: ['**/*.{ts,tsx}'], | |
| extends: [ | |
| js.configs.recommended, | |
| tseslint.configs.recommended, | |
| reactHooks.configs.flat.recommended, | |
| reactRefresh.configs.vite, | |
| ], | |
| js.configs.recommended, | |
| ...tseslint.configs.recommended, | |
| reactHooks.configs.flat.recommended, | |
| reactRefresh.configs.vite, | |
| { | |
| files: ['**/*.{ts,tsx}'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a2a5f1a. Replaced extends with proper spread syntax for flat config format.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||
| <!doctype html> | ||||||
| <html lang="en"> | ||||||
| <head> | ||||||
| <meta charset="UTF-8" /> | ||||||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||||||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||||||
| <title>json-mind</title> | ||||||
|
||||||
| <title>json-mind</title> | |
| <title>JSONMind</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a2a5f1a. Updated title to "JSONMind" for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README claims to use 'React 19.2' but this version doesn't exist as of January 2025. Update the documentation to match the actual React version being used, or correct the package.json to use a valid React version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a2a5f1a. Updated to just "React" without specific version number.