api-diff - Catch API contract drift before your users do

by•
Backend changes a field. Frontend breaks silently. TypeScript types go stale. Nobody notices until users complain. api-diff intercepts every fetch call and deep-diffs the actual response against a schema you define once. When something drifts, you know immediately. Supports wildcard routes, strict mode, granular ignore patterns, and an onDrift callback for Sentry or analytics. Zero dependencies. Full TypeScript support.

Add a comment

Replies

Best
Maker
šŸ“Œ
Hey Product Hunt! šŸ‘‹ I'm Nakshatra, a Frontend Lead working in fintech for 2.5 years. This bug kept hitting us repeatedly — backend quietly renames a field, frontend breaks silently, TypeScript types are stale, nobody notices until users file a support ticket. Existing solutions felt too heavy. OpenAPI needs backend cooperation. Zod requires actively maintained schemas. I wanted something I could drop in with 5 lines and zero backend changes. So I built api-diff. It wraps globalThis.fetch, clones every matched response, and deep-diffs it against a schema you define once. Your app gets the original response untouched — the clone is what gets checked. 643 downloads in 2 weeks with zero paid promotion. Would love feedback on: → The API design — does it feel natural? → What framework integrations would help most? → What's missing for your use case? Thanks for checking it out šŸ™