1.19.0 • Published 4 months ago

servable-engine v1.19.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Servable Engine

!WARNING Servable is still experimental and its api may change in the future.

logo

npm Package NPM Downloads Build Status License: MIT JavaScript Style Guide

Servable engine is the core component of the Servable eco-system. It orchestrates the server deployment, the protocols registration and execution and more. Servable engine is used by the Servable CLI to generate new projects.

Documentation

You can find here the complete servable documentation with guides and api reference.

Install

yarn add servable-engine

Quickstart

To make use of servable-engine you need generator-servable

The Yeoman generator will walk you through the steps required to create your app or protocol prompting for the required information.

yarn global add yo
yarn global add generator-servable

To launch the generator simply type:

yo servable

Servable is a Node JS framework built on top of Express JS and Parse Server and tailored for protocols. It provides a concise, easy to use and scalable template to get the best of Parse Server and protocols.

Servable at its core is a server template that uses the servable-engine to orchestrate the different protocols used in an application. Servable streamlines the server development by separating every "groupable" logic to be a protocol, so that it is organically extracted from the base code and possibly migrated into its own package. By doing so, Servable enforces a clear separation of concerns pattern out of the box.

Main features:

  • Quick start and Plug & Play Node JS framework
  • Tailored for protocols
  • Schema based classes and auto-migration
  • Templates for classes
  • Templates for custom protocols

Just like a docker image is made to be platform agnostic, a protocol is designed to be independant from the current environment it's being used in. A protocol might depend on other protocols, but it does not need to know which application it is used for, or call any of its API.

The Servable object acts as a central orchestrator. It holds references to objects every protocol can access (for example the current express app, the Parse Server instance, etc). It can also be used to register special methods provided by protocols and that might be used by other protocols, without knowing the source protocol of the method. For example, an emailable protocol if declared in a ServableApp object will register its implementation of a sendWithTemplate method in Servable.Emailing. This API will be used by other protocols to send emails by following its specific specification.

Why Servable?

At @servable-community we created the protocols in our Node JS + Parse server project. What was an experience to ease the backend development quickly became a good practice that helped us keep a clean codebase. They worked so well we decided to streamline their integration with the code base for future projects. We were inspired by the powerful ways NextJs improved the React experience by providing an efficient template on top of it. Yet we did not want to hide the Parse Server framework behind ours as we truly love Parse. Servable allows to tap into all the existing and upcoming Parse features and yet it dramatically simplifies the development process. A well designed Servable project will comprise almost nothing more than the actual classes and business logic of the platform, other repetitive functions and logics will use existing protocols implemented by the community or entreprise-private protocols.

Should you use Servable?

Servable is likely a good fit for you if...

  • You want to group the development of your server by capacity
  • You want to reuse a capacity (protocol) over different models without copying it over and over
  • You want to make that capacity available throughout your organization or publish it on the web
  • You are building a new platform from scratch but you don't want reinvent the wheel for the usual suspects: social interactions, versionning, data consistency over deletion

Examples of protocols

Followable

  • Gives an object (followed) the capacity to be followed by another object (follower)
  • keeps the number of followers up to date on the followed object
  • creates and maintains join tables with the status of the follow relationship

Emailable

  • Gives a ServableApp the capacity to use transactional emails via a simple API that is registered via the Servable.Mailing object
  • Keeps a list of email templates
  • Can be used with Sendgrid as of now

...you love Parse Server There is no reason not to use Servable if you have previously used a Parse Server.

...you care about productivity and developer experience Servable provides a predetermined template that sets a clear developer's guideline

Servable in your stack

Servable comes bundled with Parse Server that sets up a working set of tables that handle users, sessions and installation. You can use it to bootstrap your platform or as a microservice that you can access through REST or GraphQL without using the _User, Session and installation tables.

License

MIT © servable-community

1.19.0

4 months ago

1.18.0

5 months ago

1.17.0

5 months ago

1.16.0

5 months ago

1.14.0

5 months ago

1.12.0

5 months ago

1.8.0

5 months ago

1.6.0

5 months ago

1.4.2

5 months ago

1.4.1

5 months ago

1.4.0

6 months ago

1.9.6

5 months ago

1.9.5

5 months ago

1.9.4

5 months ago

1.9.3

5 months ago

1.9.2

5 months ago

1.7.4

5 months ago

1.11.0

5 months ago

1.15.0

5 months ago

1.13.0

5 months ago

1.9.1

5 months ago

1.7.3

5 months ago

1.3.7

6 months ago

1.9.0

5 months ago

1.7.2

5 months ago

1.3.6

6 months ago

1.7.1

5 months ago

1.3.5

6 months ago

1.7.0

5 months ago

1.3.4

6 months ago

1.3.3

6 months ago

1.5.0

5 months ago

1.3.2

6 months ago

1.3.1

6 months ago

1.10.0

5 months ago

1.2.0

7 months ago

1.2.8

7 months ago

1.2.7

7 months ago

1.2.6

7 months ago

1.2.5

7 months ago

1.2.4

7 months ago

1.2.3

7 months ago

1.2.2

7 months ago

1.3.0

7 months ago

1.2.1

7 months ago

1.2.9

7 months ago

1.2.12

7 months ago

1.2.10

7 months ago

1.2.11

7 months ago

1.1.15

7 months ago

1.1.14

7 months ago

1.1.13

7 months ago

1.1.12

7 months ago

1.1.11

7 months ago

1.1.10

7 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

7 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago