Skip to content

pkeffect/Browser-DevTools

Repository files navigation

πŸ› οΈ Browser DevTools

Overly extensive development tools for web browser data storage

A comprehensive web-based developer toolkit for inspecting, managing, and validating browser storage with advanced features including version history, diff viewing, and data validation.


✨ Features

πŸ—„οΈ Storage Inspector

A powerful browser storage management tool supporting localStorage, sessionStorage, and IndexedDB.

Core Features

  • βœ… Multi-Storage Support
    • LocalStorage
    • SessionStorage
    • IndexedDB (database and object store selection)
  • πŸ” Real-time Search & Filter - Filter items by key name
  • πŸ“Š Smart Grouping - Automatic grouping by key prefixes (e.g., app:settings, user:data)
  • πŸ“ˆ Storage Statistics - Visual usage meter and item count
  • πŸ”„ Auto-refresh - Detects changes from other tabs
  • πŸŒ“ Dark/Light Theme - System-aware theme with manual toggle

Data Management

  • βž• Add Items - Create new storage entries with type detection
  • ✏️ Inline Editing - Click any key or value to edit in-place
  • πŸ—‘οΈ Delete Items - Remove individual items or clear all storage
  • πŸ“‹ Copy to Clipboard - One-click copy of key-value pairs
  • πŸ“€ Import/Export - Backup and restore storage as JSON files

Advanced Features

  • πŸ”€ Data Type Detection - Automatically identifies and displays data types:
    • String
    • Number
    • Boolean
    • Object
    • Array
  • πŸ“ JSON Editor - Full-featured modal editor for complex objects
  • πŸ“œ Version History - Tracks up to 10 revisions per key (localStorage/sessionStorage only)
  • πŸ”€ Diff Viewer - Compare current value against previous versions
  • πŸ’Ύ Profile System - Save and load complete storage snapshots
  • πŸ‘οΈ Column Visibility - Toggle which columns to display
  • πŸ”½ Collapsible Groups - Expand/collapse grouped items
  • ⚑ Sortable Columns - Sort by type, key, or value

πŸ†š Diff Viewer

Advanced side-by-side comparison tool for viewing changes between versions.

Features

  • πŸ“Š Side-by-Side Display - Dual-pane layout with synchronized scrolling
  • 🎨 Syntax Highlighting - Powered by highlight.js with Monokai theme
  • πŸ” Line-by-Line Diff - Clear visualization of:
    • Added lines (green)
    • Deleted lines (red)
    • Changed lines (yellow)
    • Character-level changes within lines
  • πŸ“œ Version Selection - Compare against any saved revision
  • πŸ”Ž Search Function - Find text across both panes
  • βš™οΈ Customization Options:
    • Font family selection (Consolas, Courier New, Fira Code, etc.)
    • Font size adjustment (10px-20px)
    • Line wrapping toggle
  • πŸ“Š Statistics - Shows count of added/deleted lines
  • 🎯 Virtual Scrolling - Efficient rendering for large files

βœ… JSON Validator & Formatter

Validate, format, and compress JSON data with ease.

Features

  • βœ”οΈ Validation - Instant JSON syntax checking
  • 🎨 Formatting - Pretty-print with 2-space indentation
  • πŸ—œοΈ Compression - Minify JSON for production
  • πŸ“‹ Copy to Clipboard - One-click copy functionality
  • πŸ”’ Line Numbers - Editor with synchronized line numbers
  • πŸ”„ Scroll Sync - Line numbers stay in sync with content
  • ❌ Error Display - Clear error messages with line information

πŸ“ YAML Validator & Formatter

Validate, format, and minify YAML documents.

Features

  • βœ”οΈ Validation - Parse and validate YAML syntax
  • 🎨 Formatting - Auto-format with proper indentation
  • πŸ—œοΈ Minification - Convert to flow style for compact output
  • πŸ“‹ Copy to Clipboard - One-click copy functionality
  • πŸ”’ Line Numbers - Editor with synchronized line numbers
  • πŸ”„ Scroll Sync - Line numbers stay in sync with content
  • ❌ Error Display - Detailed error messages
  • πŸ”„ YAML ↔ JSON - Easy conversion between formats

πŸš€ Getting Started

Installation

  1. Clone the repository

    git clone https://github.com/pkeffect/Browser-DevTools.git
    cd Browser-DevTools
  2. Open in browser

    # Simply open index.html in your browser
    # Or use a local server:
    python -m http.server 8000
    # Then navigate to http://localhost:8000

No build process or dependencies required! This is a pure client-side application.


πŸ’» Usage

Storage Inspector

Basic Operations

  1. Select Storage Type - Choose from dropdown (localStorage, sessionStorage, or IndexedDB)
  2. For IndexedDB: Select database and object store from the additional dropdowns
  3. Add New Item:
    • Select data type (String, Number, Boolean)
    • Enter key and value
    • Click + button
  4. Edit Item - Click on any key or value cell to edit inline
  5. Delete Item - Click trash icon next to item
  6. Search - Type in search box to filter by key name

Advanced Operations

Version History & Diff:

  1. Click the "View" (πŸ‘οΈ) button on any item
  2. Click "Compare Versions" in the modal
  3. Select a previous version from dropdown
  4. View side-by-side comparison with highlighting

Profiles:

  1. Click "Save Profile" button
  2. Enter a name for your profile
  3. Load profiles from dropdown
  4. Manage profiles with "Manage Profiles" button

Import/Export:

  • Export: Click "Export" to download current storage as JSON
  • Import: Click "Import" and select a JSON file

JSON/YAML Validators

  1. Paste or type your JSON/YAML in the editor
  2. Click "Validate & Format" to check syntax and format
  3. Click "Compress/Minify" to create compact version
  4. Click "Clear" to reset editor
  5. Use copy button to copy content to clipboard

🎨 Theme Support

The application automatically detects your system theme preference and includes a manual theme toggle.

  • πŸŒ™ Dark Mode - Low-light optimized color scheme
  • β˜€οΈ Light Mode - High-contrast light theme
  • πŸ”„ Toggle Button - Located in the navigation bar
  • πŸ’Ύ Persistent - Theme preference saved to localStorage

πŸ—οΈ Architecture

File Structure

Browser-DevTools/
β”œβ”€β”€ index.html                          # Main HTML file
β”œβ”€β”€ app.js                              # Application entry point
β”œβ”€β”€ main.css                            # Global styles
β”œβ”€β”€ theme-switcher.js/css               # Theme management
β”œβ”€β”€ utils.js                            # Shared utility functions
β”‚
β”œβ”€β”€ storage/                            # Storage Inspector
β”‚   β”œβ”€β”€ storage-inspector-widget.html   # Widget HTML
β”‚   β”œβ”€β”€ storage-inspector.css           # Widget styles
β”‚   β”œβ”€β”€ storage-main.js                 # Main controller
β”‚   β”œβ”€β”€ storage-api.js                  # Storage operations API
β”‚   β”œβ”€β”€ storage-ui.js                   # UI rendering functions
β”‚   β”œβ”€β”€ storage-profiles.js             # Profile management
β”‚   └── storage-revisions.js            # Version history
β”‚
β”œβ”€β”€ diff-viewer/                        # Diff Viewer
β”‚   β”œβ”€β”€ diff-viewer-widget.html         # Widget HTML
β”‚   β”œβ”€β”€ diff-viewer.css                 # Widget styles
β”‚   β”œβ”€β”€ diff-viewer.js                  # Main diff logic
β”‚   β”œβ”€β”€ diff.min.js                     # jsdiff library
β”‚   β”œβ”€β”€ highlight.min.js                # Syntax highlighting
β”‚   └── monokai.min.css                 # Code theme
β”‚
β”œβ”€β”€ json-validator/                     # JSON Validator
β”‚   β”œβ”€β”€ json-validator-widget.html      # Widget HTML
β”‚   β”œβ”€β”€ json-validator.css              # Widget styles
β”‚   └── json-validator.js               # Validation logic
β”‚
└── yaml-validator/                     # YAML Validator
    β”œβ”€β”€ yaml-validator-widget.html      # Widget HTML
    β”œβ”€β”€ yaml-validator.css              # Widget styles
    β”œβ”€β”€ yaml-validator.js               # Validation logic
    └── js-yaml.min.js                  # js-yaml library

Module System

The application uses ES6 modules for clean separation of concerns:

  • storage-api.js - Pure storage operations (CRUD, IndexedDB helpers)
  • storage-ui.js - UI rendering and DOM manipulation
  • storage-main.js - Controller coordinating API and UI
  • storage-profiles.js - Profile save/load functionality
  • storage-revisions.js - Version history tracking

πŸ”§ Technical Details

Storage Limits

  • localStorage: ~10MB (5-10MB typical)
  • sessionStorage: ~10MB (5-10MB typical)
  • IndexedDB: Much larger (50MB+ typically, varies by browser)

Browser Compatibility

  • βœ… Chrome/Edge (Chromium) 90+
  • βœ… Firefox 88+
  • βœ… Safari 14+
  • ⚠️ IndexedDB features may vary by browser

Dependencies

All dependencies are included via CDN or minified files:

  • jsdiff (5.1.0) - Text diffing algorithm
  • highlight.js (11.9.0) - Syntax highlighting
  • js-yaml (4.1.0) - YAML parsing and dumping

🎯 Use Cases

  • πŸ” Debug Storage Issues - Inspect and modify browser storage in real-time
  • πŸ“¦ Data Migration - Export storage from one environment, import to another
  • πŸ”„ Version Tracking - Monitor changes to critical configuration values
  • πŸ§ͺ Testing - Quickly set up test data scenarios
  • πŸ“Š Data Analysis - Examine storage patterns and usage
  • πŸ”€ Compare Changes - Identify exactly what changed between versions
  • βœ… Validate Data - Ensure JSON/YAML data is properly formatted

πŸ›‘οΈ Privacy & Security

  • βœ… 100% Client-Side - No data is sent to any server
  • βœ… No Analytics - No tracking or telemetry
  • βœ… No External Requests - Works completely offline
  • βœ… Open Source - Full code transparency
  • ⚠️ Local Only - Storage changes affect your current browser only

πŸ› Known Limitations

  • IndexedDB support is read-only for complex key paths
  • Revision history only available for localStorage/sessionStorage (not IndexedDB)
  • Very large objects (>1MB) may cause performance issues in diff viewer
  • Some IndexedDB object stores with auto-increment keys may have limited edit capability

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. πŸ› Report Bugs - Open an issue with details
  2. πŸ’‘ Suggest Features - Share your ideas
  3. πŸ”§ Submit PRs - Fork, create branch, submit PR
  4. πŸ“– Improve Docs - Help make documentation clearer

Development Setup

# Clone repository
git clone https://github.com/pkeffect/Browser-DevTools.git

# No build step needed! Just open index.html
# Or run a local server:
python -m http.server 8000

Code Style

  • Use ES6+ features
  • Follow existing code structure
  • Add comments for complex logic
  • Keep functions small and focused

πŸ“„ License

MIT License - see LICENSE file for details

Copyright (c) 2025 pkeffect


πŸ™ Acknowledgments


πŸ“ž Support


πŸ—ΊοΈ Roadmap

Future features under consideration:

  • Cookie inspector/editor
  • Cache Storage viewer
  • Service Worker inspector
  • Export to different formats (CSV, XML)
  • Bulk operations (regex find/replace)
  • Storage quota information
  • Encryption/decryption tools
  • Data visualization/charts
  • Comparison between storage types
  • Automated testing tools

Made with ❀️ for developers

⭐ Star this repo if you find it useful!

Releases

No releases published

Packages

No packages published