An open API service indexing awesome lists of open source software.

https://github.com/dhanashripatil11/json-diff-viewer

๐Ÿงฉ JSON Diff Viewer โ€” A lightweight React + TypeScript tool to visually compare two JSON files side-by-side with color-coded differences, live updates, dark/light mode, and zero UI libraries.
https://github.com/dhanashripatil11/json-diff-viewer

dev devtool json json-diff-viewer opensource react reactjs typescript vite

Last synced: 8 months ago
JSON representation

๐Ÿงฉ JSON Diff Viewer โ€” A lightweight React + TypeScript tool to visually compare two JSON files side-by-side with color-coded differences, live updates, dark/light mode, and zero UI libraries.

Awesome Lists containing this project

README

          

# ๐Ÿ” JSON Diff Viewer โ€” React + TypeScript + Vite

This project is a powerful and user-friendly **JSON Diff Viewer** built with **React**, **TypeScript**, and **Vite**. It allows users to easily compare two JSON objects side-by-side and view the differences in a clean, syntax-highlighted, color-coded format. The tool is especially useful for developers, testers, and data analysts who need to analyze structural or data changes between JSON payloads.

## ๐Ÿš€ Features

- ๐Ÿง  **Smart JSON Comparison** โ€” Detects and highlights additions, deletions, and changes.
- ๐ŸŒˆ **Color Coded Output** โ€”
- ๐ŸŸฉ Added keys/values
- ๐ŸŸฅ Removed keys/values
- ๐ŸŸจ Modified values
- ๐ŸŒ“ **Dark/Light Mode Toggle** โ€” Seamlessly switch themes to reduce eye strain.
- ๐Ÿงพ **Syntax Highlighting** โ€” Powered by `react-syntax-highlighter`.
- ๐Ÿงฉ **Side-by-Side Diff Layout** โ€” Enhanced visual clarity of changes.
- โ™ป๏ธ **Live Updates** โ€” Re-renders diff on input change in real-time.
- ๐Ÿ’ก **No Tailwind or UI Libraries** โ€” Styled using clean, custom CSS.

## ๐ŸŒ Deployment Ready

You can deploy this project across multiple platforms with CI/CD integration:
- **Vercel** โ€” Connect your GitHub repo and deploy instantly with zero config.
- **Cloudflare Pages** โ€” Edge-deployed for super-fast delivery.
- **GitHub Pages** โ€” Great for hosting fallback or demo versions.

---

# ๐Ÿ“ฅ Getting Started

Follow the steps below to clone and run this project locally:

### 1. Clone the Repository

```bash
git clone https://github.com/your-username/json-diff-viewer.git
cd json-diff-viewer

### 2. Install Dependencies
```bash
npm install

### 3. Run the Development Server
npm run dev

### The app will be available at http://localhost:5173.

### 4. Build for Production
npm run build

### 5. Preview the Production Build
npm run preview

๐Ÿ“ฆ Future Improvements
๐Ÿ” Side-by-side visual diff layout โ€” Enhanced comparison for better readability.

๐ŸŒ Multilingual support for accessibility โ€” Reach a wider global audience.

๐Ÿ’ก AI-based suggestion for JSON improvement โ€” Smart hints to improve data quality and structure.

# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
## ๐Ÿš€ Live Demo

๐Ÿ”— [Click here to view the deployed app on Vercel](https://json-diff-viewer-omega.vercel.app/)

๐Ÿง‘โ€๐ŸŽ“ Author
Made with โค๏ธ by Dhanashri Patil

๐Ÿ“ง Email: patil.dhanashrik@gmail.com

## ๐Ÿ‘ฉโ€๐Ÿ’ป Connect with Me

[![LinkedIn](https://img.shields.io/badge/LinkedIn-blue?style=flat&logo=linkedin)](https://www.linkedin.com/in/dhanashri-patil24/)