Work/ respekt

07Open Source · NPM2025

respekt

respekt is a framework-agnostic Node.js observability tool published on NPM. It records API response shapes in dev, generates Zod + JSON Schema contracts, and validates production responses against those contracts to catch silent drift.

CategoryOpen Source · NPM
Year2025
Stack5 technologies
StatusShipped

The Challenge

APIs drift silently. A backend developer renames a field, changes a type, or makes a required field optional — and nobody notices until the frontend breaks in production. Manually maintaining OpenAPI specs doesn't scale.

The Approach

I built an observe-lock-enforce pipeline. In dev, the middleware records response shapes from real traffic. The CLI infers Zod schemas from the collected samples — handling nullable fields, unions, nested objects, and ISO dates automatically. In CI, a diff command fails the build if responses have drifted from locked contracts. Zero manual schema writing required.

What I Built

01

Published a complete observe-lock-enforce pipeline to NPM with Express and Fastify support — zero manual schema writing required.

02

Built intelligent schema inference that handles nullable fields, optional keys, type unions, nested objects, and ISO datetime detection.

03

Created CI-friendly CLI commands (lock, diff, report) that integrate into GitHub Actions for automated contract drift detection.

Tech Stack

Node.jsTypeScriptZodExpressFastify