Skip to main content

Servable framework

A protocol driven Node JS framework with different Servable engines. It provides a concise, easy to use and scalable template to get the best of protocols. Get ready to change the way you code your server!
Models → Protocols → Framework engine → Servable 🐻 = 🍯

A framework orchestrator

Using engines you can keep the logic of your codebase the same. A hive adapts any Node JS framework to be used in Servable without changing the app.

Protocols are engine-agnostic

Servable streamlines the server development by separating every "groupable" logic to be a protocol, so that it is naturally extracted from the base code and possibly migrated into its own package

Use community engines

Extend your server by using protoocols made by the community. Add emailing, versionning, or video capacity with one simple declaration. Handle schema migrations and rollbacks automatically.

Definitions

  • A protocol is an independent and agnostic module that delivers a high level functionality by handling its complete lifecycle and accessing a set of server resources via Engine APIs
  • A model is the database representation of a table, when used in a protocol it can incorporate a Servable.App.Object subclass
  • A Servable Engine is a module that serves as a bridge to an actual Node JS framework that will handle the actual routing, database management etc
  • An Servable Engine API is a set of coherent apis that fill a certain high level need like Object, Query, ...

All terms and definitions

Servable Manifest 🐻

The Servable Framework is built around a set of simple requirements:

  • A protocol can be applied to multiple models
  • A protocol can have multiple models
  • A model can be pollinated by multiple protocols
  • A model belongs to a protocol
  • A Servable service is a protocol itself
  • A Servable engine is required for doing the actual heavy server work, ie routing, database and files management, etc.
  • A Servable engine chooses to implement partially or fully Engine APIs
  • A Servable service can switch between Servable engines as long as they implement the same set of Engine APIs
  • A protocol declares a list of required Engine APIs it needs to work

Read more about Servable philosophy

Every protocol has models, every model can have protocols 🐝 🍯

Servable is not a traditional Node JS framework as it does not expose any api or route by itself, nor does it contain any server capacity. Instead it pollinates database tables (models) with protocols (independent and agnostic protocol oriented extensions) so that a traditional Node JS framework (adapted by a framework engine) can use them.

Model AModel BModel CProtocol Protocol βProtocol 𝛄Protocol appModel DModel EProtocol βProtocol ε

Learn more about pollination framework

Introducing protocol pollination 🐝 🍯

Servable is not a traditional Node JS framework as it does not expose any api or route by itself, nor does it contain any server capacity. Instead it pollinates database tables (models) with protocols (independent and agnostic protocol oriented extensions) so that a traditional Node JS framework (adapted by a framework engine) can use them.

Learn more about pollination framework

Community protocols 🐝 🍯

Servable was built from the ground up to use protocols in all ways possible. The Servable service itself is a protocol (app protocol). The Servable server uses core protocols like manualable, disposableorphans and more.

Protocol
@servable-community/framable
...

Protocol
@servable-community/framable
...

A protocol carries everything it needs to fulfill its purpose 🐝

Alongside the way a protocol applies to a target model by adding protocol fields and other behaviors, every protocol can declare its own models, seeding, configuration, routes, cron jobs, services and more.

ProtocolRoutesJobsServicesSchemaConfigSeedTriggersDesign System

What is a protocol?

Tailored for protocols

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.

Perfect separation of concerns

Servable streamlines the server development by separating every "groupable" logic to be a protocol, so that it is naturally extracted from the base code and possibly migrated into its own package

Use community protocols

Extend your server by using protoocols made by the community. Add emailing, versionning, or video capacity with one simple declaration. Handle schema migrations and rollbacks automatically.

Inter-protocol Services

When protocols need to communicate the Servable.Services namespace is ready for inter-protocol communication. Any protocol can register an api associated with a unique ID that can be called with no knowledge of the protocol that handles the operation.

Automatic model and protocol seed

Servable Automatic Seed is an easy way to seed Servable models. It was built from the ground up to respect the protocol lifecycle and separation of concerns. Every protocol can define config entries that drive its behaviour at runtime, including the app protocol.

Advanced config per protocol

Servable config adds the ability to change the behaviour and appearance of your Servable service without redeploying your server or requiring users to update their app. Every protocol can manage its own configuration.

Standardized api

Every protocol is totally independent from other protocols, yet it can call Servable's standardized api for sending emails or push notifications. A dedicated protocol can register to Servable for delivering those messages.

Ready to run with docker dependencies per protocol

A dedicated system entry in every protocol allows for a custom docker-compose based infrastructure needed by the protocol. The Servable server will automatically assign free ports and run docker containers if a protocol needs them.

Full stack protocols with frontend extensions

Beyond the core server component, a protocol can have an accompanying frontend library that provides UI components and logic. For example the followable protocol offers a React extension that displays a state managed Follow button.

Community engines 🌾

Servable was built from the ground up to use protocols in all ways possible. The Servable service itself is a protocol (app protocol). The Servable server uses core protocols like manualable, disposableorphans and more.

Engine
@servable/parse-server-engine
...

Automatic schema computation

Servable automatically merges the user defined app schema with the protocols' schema.

Automatic schema migration per protocol

Schemas are automatically migrated based on a desired version. No need for custom scripts or complex data management. Dedicated up and down allow for granular entry manipulation.

Advanced schema staging for verification

Servable proposes a rolling deployment using an arbiter so that you don't mistakenly put undesired schema in production. When using this mode, both a /servable and a /servablestaging endpoints are exposed with separate databases for testing.

Quick start

npx @servable/cli app new --quick
npm run start