Skip to content

Architecture

Arnab Nandy edited this page Sep 3, 2026 · 1 revision

Architecture

page.tsx
  |-- pasted/uploaded JSON --------------------------|
  |-- HTTPS URL --> GET /api/proxy -----------------|
  |-- cURL --> parseCurlCommand --> POST /api/proxy-|
                                                       v
                                  parse -> flatten -> compareJson
                                                       v
                                  filter -> table/tree -> export

Main modules

Module Responsibility
src/app/page.tsx UI state, actions, filters, views, and exports
src/app/api/proxy/route.ts Validated public HTTPS requests
src/lib/curl.ts Supported cURL to structured request
src/lib/flatten.ts Nested JSON to dot/index paths
src/lib/compare.ts Baseline comparison and diff grouping
src/lib/ignore-rules.ts Volatility suggestion scoring
src/types/diff.ts Shared DiffEntry contract

The selected action parses at least two responses. flatten emits leaf values and preserves empty containers. compareJson unions/sorts paths, removes ignored paths, and compares active targets with the baseline. UI filters derive a visible subset while exports retain the full result.

The proxy is the trust boundary for web URL/cURL requests. Client-side cURL parsing does not replace server validation. See Security and Privacy.

Tests

Tests mirror src under test/app, test/components, test/lib, and test/types. Vitest covers utilities/routes and React Testing Library verifies visible UI and accessibility behavior.

Extension boundary

Each package under browser-extension/ is standalone HTML/CSS/JavaScript and does not import the Next.js application. Shared behavior changes must therefore be implemented and tested in the app and affected extension packages.

Clone this wiki locally