/shared-routes

The shared-routes library

Primary LanguageTypeScriptMIT LicenseMIT

Restful Harmony: Defining & Synchronizing Your Routes Effortlessly

Documentation - Demo project

Shared-routes is an open-source library that streamlines the definition of REST API endpoints and provides type definitions and utilities for seamless frontend, tests, and documentation integration.

Key Features

  • 📚 Declarative API Design: Shared routes enables a declarative way to define REST API endpoints, ensuring a user-friendly development experience.
  • 🔄 Full Compatibility: Unlike TRPC, it generates completely valid REST APIs that can be requested even without the utilization of generated utilities.
  • 🔄 Synchronization: Maintain perfect synchronization across your frontend, backend, tests, and documentation, while ensuring type safety.
  • 📦 Monorepo Friendly: This library shines especially in a monorepo setup where route definitions can be shared as an internal package, allowing them to be imported wherever required.
  • 🔧 Exportable Utils: It comes with an ability to export type definitions and utilities that can be used in the frontend, providing a fluid API interaction experience.
  • ✅ Type Safety: With Shared routes, rest assured of having a type-safe environment that reduces potential errors and enhances code predictability.