-
Notifications
You must be signed in to change notification settings - Fork 0
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
| 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 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.
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.
API Response Comparator · Source · Issues · MIT License