Skip to main content

Servable framework

A feature driven Node JS framework with different Servable engines. It provides a concise, easy to use and scalable template to get the best of features. Get ready to change the way you code your server!
Models → Features → 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.

Features are engine-agnostic

Servable streamlines the server development by separating every "groupable" logic to be a feature, 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 feature 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 feature 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 feature can be applied to multiple models
  • A feature can have multiple models
  • A model can be pollinated by multiple features
  • A model belongs to a feature
  • A Servable service is a feature 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 feature declares a list of required Engine APIs it needs to work

Read more about Servable philosophy

Every feature has models, every model can have features 🐝 🍯

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 features (independent and agnostic feature oriented extensions) so that a traditional Node JS framework (adapted by a framework engine) can use them.

Model AModel BModel CFeature Feature βFeature 𝛄Feature appModel DModel EFeature βFeature ε

Learn more about pollination framework

Introducing feature 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 features (independent and agnostic feature oriented extensions) so that a traditional Node JS framework (adapted by a framework engine) can use them.

Learn more about pollination framework

Community features 🐝 🍯

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

Feature
@servable-community/framable
...

Feature
@servable-community/framable
...

A feature carries everything it needs to fulfill its purpose 🐝

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

FeatureRoutesJobsServicesSchemaConfigSeedTriggersDesign System

What is a feature?

Tailored for features

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

Perfect separation of concerns

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

Use community features

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-feature Services

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

Automatic model and feature seed

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

Advanced config per feature

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 feature can manage its own configuration.

Standardized api

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

Ready to run with docker dependencies per feature

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

Full stack features with frontend extensions

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

Community engines 🌾

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

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

Automatic schema computation

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

Automatic schema migration per feature

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