Skip to content
royanish0410Public

About

A modern, interactive JSON tree visualizer built with Next.js and TypeScript.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

🌳 JsonVista

A modern, interactive JSON tree visualizer built with Next.js and TypeScript

Live Demo • Report Bug • Request Feature

TypeScript CSS JavaScript

✨ Features

  • 🎨 Beautiful Dark/Light Theme - Seamlessly switch between dark and light modes with smooth transitions
  • 🌲 Interactive Tree Visualization - Visualize complex JSON structures as hierarchical trees
  • 🔍 JSON Path Search - Search and highlight specific nodes using JSON path notation
  • 📤 File Upload - Import JSON files directly from your system
  • 💾 Export Options - Download visualizations as PNG images or JSON files
  • 🔄 Real-time Parsing - Instant validation and tree generation
  • 🎯 Zoom Controls - Zoom in/out and fit the entire tree to view
  • 📋 Sample Data - Pre-loaded example to get started quickly
  • ⚡ Fast & Responsive - Built with Next.js 16 and React 19 for optimal performance
  • 🎭 Smooth Animations - Powered by Framer Motion for delightful user experience

🚀 Tech Stack

📦 Installation

Prerequisites

  • Node.js 20.x or higher
  • npm, yarn, pnpm, or bun

Clone the Repository

git clone https://github.com/royanish0410/JsonVista.git
cd JsonVista

Install Dependencies

npm install
# or
yarn install
# or
pnpm install
# or
bun install

Run Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser to see the application.

🎯 Usage

1. Input JSON Data

  • Type or Paste: Enter JSON directly into the input textarea
  • Upload File: Click "Upload JSON" to import a .json file
  • Use Sample: Start with the pre-loaded example data

2. Generate Tree

  • Click the "Generate Tree" button to visualize your JSON structure
  • Invalid JSON will display helpful error messages

3. Explore Features

  • Search: Use JSON path notation (e.g., $.user.address.city) to find specific nodes
  • Theme Toggle: Switch between dark and light modes using the sun/moon icon
  • Zoom: Use zoom controls to adjust the view
  • Export: Download the visualization as PNG or export the JSON data

4. Manage Data

  • Clear: Remove all data and reset the visualizer
  • Copy: Copy formatted JSON to clipboard

📸 Screenshots

Light Mode

Light Mode Preview

Dark Mode

Dark Mode Preview

🏗️ Project Structure

JsonVista/
├── app/
│   ├── globals.css          # Global styles
│   ├── layout.tsx            # Root layout with metadata
│   └── page.tsx              # Main page component
├── components/
│   ├── ui/                   # Radix UI components
│   ├── json-tree-visualizer.tsx  # Main visualizer component
│   └── theme-provider.tsx    # Theme context provider
├── lib/
│   ├── json-utils.ts         # JSON parsing and utilities
│   └── utils.ts              # Helper functions
├── public/                   # Static assets
├── package.json              # Dependencies and scripts
└── tsconfig.json             # TypeScript configuration

🛠️ Available Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm start Start production server
npm run lint Run ESLint

🌟 Key Components

JSON Tree Visualizer

The main component that handles:

  • JSON input and validation
  • Tree structure generation
  • Search functionality
  • Export capabilities
  • Theme management

Tree Visualization

Renders the hierarchical structure with:

  • Collapsible nodes
  • Type indicators (object, array, primitive)
  • Path highlighting
  • Smooth animations

🎨 Customization

The project uses Tailwind CSS with custom theme configuration. You can customize colors, fonts, and spacing in:

  • app/globals.css - CSS variables and base styles
  • tailwind.config.ts - Tailwind configuration
  • components.json - Component theme settings

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

📧 Contact

Anish Roy - @royanish0410

Project Link: https://github.com/royanish0410/JsonVista

Live Demo: https://json-vista.vercel.app


Made with ❤️ by Anish Roy

⭐ Star this repository if you find it helpful!

About

A modern, interactive JSON tree visualizer built with Next.js and TypeScript.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages