Skip to content

themanvendra00/quickdevtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” JSON Viewer Pro

A powerful, feature-rich JSON viewer and editor built with Next.js, React, and TypeScript. Transform your JSON data with professional-grade tools including formatting, validation, comparison, and more.

JSON Viewer Pro Next.js React TypeScript Tailwind CSS

โœจ Features

๐ŸŽฏ Core Functionality

  • ๐Ÿ“ JSON Input & Editing - Paste, edit, and manipulate JSON data with real-time validation
  • ๐Ÿ‘๏ธ Interactive JSON Display - Beautiful, collapsible tree view with syntax highlighting
  • ๐Ÿ”„ JSON Comparison - Side-by-side comparison of two JSON objects with difference highlighting
  • ๐Ÿ“Š Statistics Dashboard - Detailed analysis of JSON structure, size, and complexity

๐Ÿ› ๏ธ JSON Processing Tools

  • ๐ŸŽจ Format JSON - Pretty-print with proper indentation and spacing
  • ๐Ÿ“ฆ Minify JSON - Compress JSON by removing unnecessary whitespace
  • โœ… Validate JSON - Real-time syntax validation with error reporting
  • ๐Ÿ”ง Auto-Fix - Intelligent repair of common JSON formatting issues
  • โšก Quick Fix - Fast resolution of basic syntax problems
  • ๐Ÿ”„ Data Transformation - Convert [object Object] strings to readable format

๐ŸŽจ User Experience

  • ๐ŸŒ™ Dark/Light Theme - Toggle between themes with system preference detection
  • โŒจ๏ธ Keyboard Shortcuts - Power user shortcuts for all major functions
  • ๐Ÿ“‹ Copy to Clipboard - One-click copying of formatted JSON
  • ๐Ÿ’พ Export JSON - Download JSON files directly to your device
  • ๐Ÿ” Search Functionality - Find specific keys or values within JSON data
  • ๐Ÿ“ฑ Responsive Design - Works seamlessly on desktop, tablet, and mobile

๐ŸŽฏ Advanced Features

  • ๐Ÿ” Smart Parsing - Handles various JSON formats including JavaScript object literals
  • ๐Ÿ“ˆ Data Quality Analysis - Identifies potential issues in JSON structure
  • ๐ŸŽฏ Error Diagnostics - Detailed error messages with suggestions for fixes
  • ๐Ÿ”„ Real-time Updates - Instant feedback as you type and edit

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/your-username/json-viewer.git
cd json-viewer

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:3000 to view the application.

Build for Production

# Build the application
npm run build

# Start production server
npm start

๐ŸŽฎ Usage Guide

๐Ÿ“ Basic JSON Viewing

  1. Navigate to the View Tab - Click the "View" tab in the main interface
  2. Paste Your JSON - Enter JSON data in the text area
  3. View Results - See formatted JSON in the preview panel
  4. Check Statistics - View detailed information about your JSON structure

๐Ÿ”„ JSON Comparison

  1. Switch to Compare Tab - Click the "Compare" tab
  2. Enter Left JSON - Paste the first JSON object
  3. Enter Right JSON - Paste the second JSON object
  4. Analyze Differences - View highlighted differences and comparison summary

๐Ÿ› ๏ธ JSON Processing

Action Button Description
Format ๐ŸŽจ Format Pretty-print JSON with indentation
Minify ๐Ÿ“ฆ Minify Remove whitespace and compress
Validate โœ… Validate Check JSON syntax validity
Export ๐Ÿ’พ Export Download JSON as file
Copy ๐Ÿ“‹ Copy Copy to clipboard
Clear ๐Ÿ—‘๏ธ Clear Clear all content

๐Ÿ”ง Auto-Fix Features

  • Quick Fix โšก - Resolves basic syntax issues like trailing commas
  • Auto-Fix ๐Ÿ”ง - Handles common formatting problems automatically
  • Data Fix ๐Ÿ”„ - Transforms [object Object] strings to readable format

๐Ÿ—๏ธ Architecture

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ app/                    # Next.js app directory
โ”‚   โ”œโ”€โ”€ layout.tsx         # Root layout
โ”‚   โ””โ”€โ”€ page.tsx           # Home page
โ”œโ”€โ”€ components/            # React components
โ”‚   โ”œโ”€โ”€ json-viewer/       # JSON viewer components
โ”‚   โ”‚   โ”œโ”€โ”€ CompareView.tsx    # Side-by-side comparison
โ”‚   โ”‚   โ”œโ”€โ”€ JsonDisplay.tsx    # JSON tree visualization
โ”‚   โ”‚   โ”œโ”€โ”€ JsonInput.tsx      # Input textarea
โ”‚   โ”‚   โ”œโ”€โ”€ JsonStatistics.tsx # Statistics panel
โ”‚   โ”‚   โ”œโ”€โ”€ JsonToolbar.tsx    # Action buttons
โ”‚   โ”‚   โ”œโ”€โ”€ KeyboardShortcuts.tsx # Keyboard handling
โ”‚   โ”‚   โ”œโ”€โ”€ TabButtons.tsx     # Tab navigation
โ”‚   โ”‚   โ”œโ”€โ”€ ThemeToggle.tsx    # Theme switcher
โ”‚   โ”‚   โ””โ”€โ”€ ViewTab.tsx        # Main view interface
โ”‚   โ””โ”€โ”€ ui/                # Reusable UI components
โ”œโ”€โ”€ hooks/                 # Custom React hooks
โ”‚   โ””โ”€โ”€ useJsonViewer.ts   # Main application logic
โ”œโ”€โ”€ lib/                   # Utility libraries
โ”‚   โ””โ”€โ”€ utils.ts           # Helper functions
โ””โ”€โ”€ utils/                 # Application utilities
    โ”œโ”€โ”€ constants.ts       # App constants
    โ”œโ”€โ”€ helpers.ts         # JSON processing functions
    โ””โ”€โ”€ types.ts           # TypeScript definitions

๐Ÿ”ง Key Components

useJsonViewer Hook

Central state management for the entire application, handling:

  • JSON parsing and validation
  • Tab management
  • Comparison logic
  • Statistics calculation
  • Data quality analysis

JSON Processing Functions

  • parseJsonInput - Smart JSON parsing with fallbacks
  • formatJsonString - Pretty-printing with indentation
  • minifyJsonString - Whitespace removal
  • validateJsonString - Syntax validation
  • compareJsonObjects - Deep object comparison
  • getJsonStatistics - Structure analysis

๐ŸŽจ Theming

The application supports both light and dark themes with:

  • System Preference Detection - Automatically matches your OS theme
  • Manual Toggle - Switch themes with the theme button
  • Consistent Design - Tailwind CSS with custom color schemes
  • Accessibility - High contrast ratios and readable fonts

๐Ÿ“Š JSON Statistics

The statistics panel provides detailed insights:

  • ๐Ÿ“‹ Type - Object, Array, or primitive type
  • ๐Ÿ“ Size - File size in bytes, KB, or MB
  • ๐Ÿ”‘ Keys - Number of object properties
  • ๐Ÿ“ Items - Number of array elements
  • ๐Ÿ“ Depth - Maximum nesting level

๐Ÿ” Comparison Features

Difference Detection

  • โž• Added - New properties or values
  • โž– Removed - Deleted properties or values
  • ๐Ÿ”„ Modified - Changed values with path tracking
  • ๐Ÿ“Š Summary - Total difference count

Visual Indicators

  • ๐Ÿ”ด Red - Left JSON (removed/changed)
  • ๐ŸŸข Green - Right JSON (added/changed)
  • ๐ŸŸก Yellow - Modified values

๐Ÿ›ก๏ธ Error Handling

Validation Features

  • Real-time Parsing - Instant feedback as you type
  • Error Messages - Clear descriptions of syntax issues
  • Common Issues - Helpful suggestions for fixes
  • Debug Information - Detailed parsing status

Auto-Repair Capabilities

  • Trailing Commas - Automatic removal
  • Object Literals - JavaScript object support
  • String Encoding - Double-encoded JSON handling
  • Whitespace - Smart formatting

๐Ÿš€ Performance

  • โšก Fast Parsing - Optimized JSON processing
  • ๐Ÿ”„ Real-time Updates - Efficient state management
  • ๐Ÿ“ฑ Responsive - Smooth performance on all devices
  • ๐Ÿ’พ Memory Efficient - Optimized for large JSON files

๐Ÿงช Development

Available Scripts

# Development
npm run dev          # Start development server with Turbopack
npm run build        # Build for production with Turbopack
npm run start        # Start production server
npm run lint         # Run ESLint

# Testing (if implemented)
npm run test         # Run test suite
npm run test:watch   # Run tests in watch mode

Technology Stack

  • Framework: Next.js 15.5.3 with App Router
  • UI Library: React 19.1.0
  • Styling: Tailwind CSS 4
  • Icons: Lucide React
  • JSON Viewer: react-json-view-lite
  • Notifications: Sonner
  • TypeScript: Full type safety

๐Ÿค Contributing

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

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • react-json-view-lite - For the beautiful JSON tree visualization
  • Lucide React - For the comprehensive icon set
  • Tailwind CSS - For the utility-first styling approach
  • Next.js Team - For the amazing React framework

Made with โค๏ธ using Next.js, React, and TypeScript

โญ Star this repo โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature