Skip to content

TyRAS utility libraries for IO-TS validation library

License

Notifications You must be signed in to change notification settings

ty-ras/extras-io-ts

Repository files navigation

Typesafe REST API Specification - IO-TS 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 io-ts and fp-ts:

  • resource-pool contains generic resource pool API and implementation which uses Tasks and TaskEither constructs of fp-ts.
  • typed-sql contains library which enables type-safe SQL query string specification and execution with a help of tagged templates and io-ts library.
  • config contains library which encapsulates common logic related to reading JSON-encoded configuration values from e.g. environment variables, in fp-ts style.
  • main contains library which makes it easier to execute entrypoint asynchronous functions which use TaskEither.
  • 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.