A powerful, interactive JSON visualization tool that transforms complex data structures into beautiful, navigable graphs. Built with React, TypeScript, and powered by Google's Gemini AI.
Live Demo: https://blackmoon87.github.io/json_map/
- 📊 Interactive Graph Visualization - Visualize JSON structure with interactive nodes and edges
- 🤖 AI-Powered Generation - Generate or fix JSON using Google Gemini AI
- 🔄 Multiple Layouts - Switch between horizontal (LR) and vertical (TB) graph layouts
- 📤 Export & Share - Export JSON files and share visualizations via shareable links
- 🔑 Secure API Key Management - Store your API key locally in browser cache (no server needed)
- 🎨 Dark Theme UI - Modern dark interface with smooth interactions
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/blackmoon87/json_map.git cd json_map -
Install dependencies:
npm install
-
Run the app locally:
npm run dev
-
Open http://localhost:3000 in your browser
- Click the Settings button in the top toolbar
- Visit Google AI Studio to get your API key
- Paste your API key in the Settings modal
- Click Save API Key - it will be stored securely in your browser's local storage
- Click the AI Generate button
- Describe the data structure you want to create
- The app will generate valid JSON for you to visualize
- Paste broken JSON into the editor
- Click AI Generate
- Describe what the JSON should look like
- The AI will fix and generate proper JSON
The app automatically deploys to GitHub Pages using gh-pages:
npm run deployThis command:
- Builds the production bundle
- Pushes the built files to the
gh-pagesbranch - GitHub automatically serves your site at
https://[your-username].github.io/json_map/
To build the production version:
npm run buildThe built files will be in the dist/ folder.
- Frontend Framework: React 19 with TypeScript
- Visualization: React Flow
- UI Components: Lucide React Icons
- Styling: Tailwind CSS
- Graph Layout: Dagre
- AI Integration: Google Gemini API
- Build Tool: Vite
- Deployment: GitHub Pages
├── src/
│ ├── components/ # React components
│ │ ├── Editor.tsx # JSON code editor
│ │ ├── GraphNode.tsx # Custom graph node
│ │ └── Toolbar.tsx # Top toolbar with controls
│ ├── services/ # Utility services
│ │ ├── geminiService.ts # Gemini API integration
│ │ ├── apiKeyManager.ts # API key storage management
│ │ └── layoutService.ts # Graph layout calculations
│ ├── App.tsx # Main application component
│ ├── index.tsx # Entry point
│ └── constants.ts # Application constants
├── public/ # Static files
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Project dependencies
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run deploy- Build and deploy to GitHub Pages
- Your API key is stored locally in your browser's localStorage
- No data is sent to any server except Google's Gemini API
- Your JSON data never leaves your browser
- Share links are encoded in the URL with Base64 encoding
This project is open source and available under the MIT License.
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For issues, feature requests, or questions, please open an Issue on GitHub.
Built with ❤️ by blackmoon87
