npm package: @pixel-pulse/cache-brain-react-devtools
Description: Visual debugger for cache-brain-react
Author: Lin Htet Aung
Latest version: 1.0.2

<div align="center">
  <img src="https://cache-brain.netlify.app/og-image-next.png" width="100%" alt="Cache Brain - Smart Caching Engine"/>
  
  <br/>
  
  [![npm version](https://img.shields.io/npm/v/@pixel-pulse/cache-brain-react-devtools.svg)](https://www.npmjs.com/package/@pixel-pulse/cache-brain-react-devtools)
  [![License: MIT](https://img.shields.io/badge/License-MIT-purple.svg)](https://opensource.org/licenses/MIT)
  
  <h3>Visual Debugger for React.js and Next.js</h3>
  <p align="center"><b>The visual engine room for Cache Brain.</b> Inspect, debug, and manipulate your cache state in real-time with a high-end interface inspired by modern design systems.</p>

  <p>
    <a href="https://cache-brain.netlify.app/"><b>Cache Brain</b></a> •
    <a href="https://cache-brain.netlify.app/doc"><b>Documentation</b></a> •
    <a href="https://cache-brain.netlify.app/doc/playground/core"><b>Server Lab</b></a> •
    <a href="https://cache-brain.netlify.app/doc/playground/hook"><b>Client Lab</b></a> •
    <a href="https://github.com/LinnHtetAungSE"><b>GitHub</b></a>
  </p>
</div>

---

## ✨ Features

- **🔍 Live Inspection:** View every active cache entry, its TTL, and its current payload.
- **⏱ Lifecycle Tracking:** Watch entries transition from `fresh` to `stale` in real-time.
- **⚡️ Manual Purge:** Clear specific keys or the entire registry with a single click.
- **🎨 Glassmorphism UI:** A beautiful, non-intrusive overlay that fits any project.

---

## ⚠️ Beta Version Notice

This project is currently in **v1.0.0-beta**. We are actively refining the **Registry Pulse** logic and synchronization performance.

- Please report any bugs via GitHub Issues.
- Expect breaking changes until version **1.2.0**.

---

## 📦 Installation

```bash
npm add @pixel-pulse/cache-brain-react-devtools
```

## 🚀 Setup (React / Next.js)

#### Wrap your App

Simply import and place the `CacheBrainDevTools` component inside your `CacheBrainProvider`. It is recommended to only render this in development mode.

```TypeScript
import { CacheBrainProvider } from "@pixel-pulse/cache-brain-react";
import { CacheBrainDevTools } from "@pixel-pulse/cache-brain-react-devtools";

export default function App({ children }) {
  return (
    <CacheBrainProvider client={client}>
      {children}
      {process.env.NODE_ENV === 'development' && <CacheBrainDevTools />}
    </CacheBrainProvider>
  );
}
```

---

### ⚙️ Component Props

The `CacheBrainDevTools` component accepts the following props to control its visibility and behavior.

| Property  | Type      | Description                                                                 | Default |
| :-------- | :-------- | :-------------------------------------------------------------------------- | :------ |
| `enabled` | `boolean` | When `true`, the DevTools UI is rendered and accessible in the application. | `true`  |

---

## 🕹 Debugging Capabilities

Once the panel is open, you can interact directly with the Cache Brain engine:

1. **Search:** Filter through hundreds of cache keys instantly.
2. **Edit:** Manually override cached data to test UI edge cases.
3. **Invalidate:** Force a revalidate call on any active key to test loading states.
4. **Export:** Copy the current cache state as a JSON object for bug reporting.

---

## 🔗 Related Packages

- **React / Next.js:** [@pixel-pulse/cache-brain-react](https://www.npmjs.com/package/@pixel-pulse/cache-brain-react)

---

### 🛡 License

<details>
  <summary>Distributed under the <b>MIT License</b>. Click to view full license.</summary>
  <br />
  
  ```text
  MIT License

Copyright (c) Lin Htet Aung (Liam) | 2026 Pixel Pulse Tech MM

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

```
</details>

---

<p align="center">
<br />
<b>Engineered by Pixel Pulse Tech</b><br />
<sub>Redefining state management for 2026.</sub>
</p>
```