Skip to content

TyRAS utility libraries for Zod validation library

License

Notifications You must be signed in to change notification settings

ty-ras/extras-zod

Repository files navigation

Typesafe REST API Specification - Zod Extras Libraries

CI Pipeline CD Pipeline

The Typesafe REST API Specification is a family of libraries used to enable seamless development of Backend and/or Frontend which communicate via HTTP protocol. The protocol specification is checked both at compile-time and run-time to verify that communication indeed adhers to the protocol. This all is done in such way that it does not make development tedious or boring, but instead robust and fun!

This particular repository contains generic libraries related to using zod:

  • typed-sql contains library which enables type-safe SQL query string specification and execution with a help of tagged templates.
  • config contains library which encapsulates common logic related to reading JSON-encoded configuration values from e.g. environment variables.
  • state contains library for handling state in TyRAS backend in most intuitive way: state passed to endpoint handlers being object, and endpoint handlers specifying which state properties they need via array of strings.