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.
- Host: GitHub
- URL: https://github.com/dhanashripatil11/json-diff-viewer
- Owner: DhanashriPatil11
- Created: 2025-04-09T10:28:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-09T11:39:48.000Z (about 1 year ago)
- Last Synced: 2025-04-09T11:46:34.761Z (about 1 year ago)
- Topics: dev, devtool, json, json-diff-viewer, opensource, react, reactjs, typescript, vite
- Language: TypeScript
- Homepage: https://json-diff-viewer-omega.vercel.app
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
[](https://www.linkedin.com/in/dhanashri-patil24/)