Skip to content
@kurierjs

Kurier

Kurier

A TypeScript framework to create APIs following the 1.1 Spec of JSONAPI + the Operations proposal spec.

Features

  • Operation-driven API: JSONAPI is transport-layer independent, so it can be used for HTTP, WebSockets or any transport protocol of your choice.
  • Declarative style for resource definition: Every queryable object in JSONAPI is a resource, a representation of data that may come from any source, be it a database, an external API, etc. Kurier defines these resources in a declarative style.
  • CRUD database operations: Baked into Kurier, there is an operation processor which takes care of basic CRUD actions by using Knex. This allows the framework to support any database engine compatible with Knex. Also includes support for filtering fields by using common SQL operators, sorting and pagination.
  • Transport layer integrations: The framework supports JSONAPI operations via WebSockets, and it includes middlewares for Koa, Express and Vercel to automatically add HTTP endpoints for each declared resource and processor.
  • Relationships and sideloading: Resources can be related with belongsTo / hasMany helpers on their declarations. Kurier provides proper, compliant serialization to connect resources and even serve them all together on a single response.
  • Error handling: The framework includes some basic error responses to handle cases equivalent to HTTP status codes 401 (Unauthorized), 403 (Forbidden), 404 (Not Found) and 500 (Internal Server Error).
  • User/Role presence authorization: By building on top of the decorators syntax, Kurier allows you to inject user detection on specific operations or whole processors. The framework uses JSON Web Tokens as a way of verifying if a user is valid for a given operation.
  • Extensibility: Both resources and processors are open classes that you can extend to suit your use case. For example, do you need to serialize an existing, external API into JSONAPI format? Create a MyExternalApiProcessor extending from OperationProcessor and implement the necessary calls et voilà!.

Pinned Loading

  1. kurier kurier Public

    TypeScript framework to create JSON:API compliant APIs

    TypeScript 61 9

Repositories

Showing 10 of 10 repositories
  • kurier Public

    TypeScript framework to create JSON:API compliant APIs

    kurierjs/kurier’s past year of commit activity
    TypeScript 61 MIT 9 26 2 Updated Mar 28, 2024
  • kurier-addon-transport-layer-context Public

    An addon to inject the client's IP address and request headers in your transport layer.

    kurierjs/kurier-addon-transport-layer-context’s past year of commit activity
    TypeScript 0 0 0 0 Updated Oct 24, 2023
  • kurier-starter-pack-typescript Public template

    A project template for starting a TypeScript project with Kurier, plus some linting and testing.

    kurierjs/kurier-starter-pack-typescript’s past year of commit activity
    TypeScript 3 0 1 2 Updated Jul 19, 2023
  • .github Public
    kurierjs/.github’s past year of commit activity
    0 0 0 0 Updated Feb 22, 2023
  • kurier-addon-auto-include Public

    A Kurier addon that alters GET operations to automatically include relationships.

    kurierjs/kurier-addon-auto-include’s past year of commit activity
    TypeScript 0 MIT 0 0 1 Updated Feb 11, 2023
  • kurier-addon-starter Public template

    Starter repo for creating addons.

    kurierjs/kurier-addon-starter’s past year of commit activity
    TypeScript 0 0 0 0 Updated Jan 18, 2023
  • kurier-cli Public

    Command line tools for Kurier.js.

    kurierjs/kurier-cli’s past year of commit activity
    1 MIT 0 0 0 Updated Dec 31, 2022
  • kurier-starter-pack-javascript Public template

    A project template for starting a JavaScript project with Kurier, plus some linting and testing.

    kurierjs/kurier-starter-pack-javascript’s past year of commit activity
    JavaScript 2 0 0 0 Updated Sep 11, 2022
  • kurier-addon-nextjs-auth0 Public

    Integrates authorization mechanisms provided by nextjs-auth0 into Kurier.

    kurierjs/kurier-addon-nextjs-auth0’s past year of commit activity
    TypeScript 0 MIT 0 0 0 Updated Jun 24, 2021
  • kurier-addon-many-to-many Public

    A Kurier addon that creates intermediate resource types for many-to-many relationships.

    kurierjs/kurier-addon-many-to-many’s past year of commit activity
    TypeScript 0 MIT 0 4 0 Updated Nov 24, 2020

Top languages

Loading…

Most used topics

Loading…