Skip to main content

Suvidha

Validation • Context • Control

Type-Safe Middleware

Chain middleware like LEGO blocks, with type inferred context propagation.

Data Validation

Zod-powered type safety for body, params, and queries—without cluttering your routes.

Framework Independence

Keep your business logic clean. No Express.js baggage.

Explicit Control

Fine-grained control over request/response lifecycle.
is a lightweight, type-safe Express.js library that adds powerful validation, middleware context management, and response handling.
A utility class for building Express.js route handlers with built-in
data validation and middleware support. It allows you to define Zod
schemas for request parameters, body, and query, and chain middleware functions that can enrich the request context.
  • No Rewrites - Adopt incrementally in existing Express apps.
  • TypeScript Native - Inferred types end “guess what’s in req” games.

Installation

The library is available on the npm registry.

Quickstart

sample response