Suvarnesh K M
Back to selected work
Open Source Project2026
GitHub Repository

Varnus

Components for developer-facing interfaces.

TypeScriptReact 19Next.jsTailwind CSSshadcn/ui

Problem

Developers repeatedly rebuild custom user interfaces for displaying nested JSON, comparing structured configuration payloads, inspecting HTTP request/response traffic, and debugging state in administrative portals. Existing solutions often bundle heavy dependencies, enforce rigid uncustomizable styles, or lack keyboard accessibility.

Solution

Varnus is a collection of composable, accessible shadcn-compatible React components specifically crafted for inspecting, diffing, and visualizing developer data. Designed with Tailwind CSS variables, it integrates seamlessly into modern Next.js dashboards while maintaining zero runtime overhead.

Interactive Components

Test the live components below directly inside this case study.

1. JSON Inspector

Renders arbitrarily deep JSON payloads with type-based syntax coloring, collapsible node trees, search filtering, and dot-notation key path copying.

JSON InspectorInteractive Demo
Object{5}
"status":200
"message":"API request successful"
"developer":Object{4}
"name":"Suvarnesh K M"
"role":"Full-Stack Developer"
"active":true
"location":"India"
"project":Object{4}
"name":"Varnus"
"version":"1.0.0"
"tags":Array[4]
"metrics":Object{3}
"endpoints":Array[2]
"0":Object{3}
"1":Object{3}

2. JSON Diff

Compares two structured payloads side-by-side or in a unified view, highlighting additions (+), deletions (-), and modified fields (~).

JSON DiffInteractive Demo
Original (PR Base)
{
  "env": "production",
  "port": 8080,  "maxConnections": 100,  "features": {    "vectorSearch": false,    "rateLimiting": true
  },  "timeoutSeconds": 30}
Modified (PR Head)
{
  "env": "production",
  "port": 8080,  "maxConnections": 250,  "features": {    "vectorSearch": true,    "rateLimiting": true,    "aiDocumentChat": true  },  "monitoring": { "telemetryEnabled": true }}

3. Request / Response Viewer

Inspects HTTP exchanges with header redaction toggles, response status codes, timing metrics, and cURL export capabilities.

Request / Response ViewerInteractive Demo
HTTP Headers
Content-Type:application/json
Authorization:Bearer [REDACTED_SECRET]
X-Api-Version:2026-03-01
Cookie:session_id=[REDACTED_COOKIE]
Request Payload
{
  "query": "developer_tools",
  "limit": 10,
  "includeMetrics": true
}

Real-World Applications

API Log Diagnostics

Inspect incoming webhooks and REST endpoints in administrative panels without leaking credentials.

Config Pull Requests

Review environment variable or JSON feature-flag modifications before deploying to production.

Developer Portals

Embed interactive API request builders and payload inspectors into customer-facing documentation.

Engineering Architecture

Component API & Compound Primitive Design

Varnus utilizes compound component patterns (e.g. <Inspector.Root>, <Inspector.Node>) allowing developers to control toolbar layouts, custom type color palettes, and header action buttons while keeping state logic localized.

Recursive Tree Rendering & Circular Reference Safety

When rendering arbitrarily deep or cyclic JavaScript objects, unhandled recursive traversal will throw stack overflow exceptions. Varnus tracks visited object references using a WeakSet map during recursive parsing, safely rendering cyclic references with a [Circular Reference] fallback indicator.

Sensitive Header Redaction Pipeline

To prevent accidental leaks in developer screencasts or error reporting dashboards, the Request/Response viewer passes header key-value pairs through an automated redaction regex mask before initial render. Keys matching sensitive patterns (Authorization, Cookie, X-Api-Key) are masked by default.

Server / Client Component Boundaries

Varnus components are designed for Next.js App Router applications. Static header formatting and structure logic execute server-side, while interactive expand/collapse states and clipboard events isolate cleanly inside client boundary components.