ForrestJS Packages

Over the years, I found myself configuring some basic stuff over and over again. Nowadays I do my best to abstract generic needs into sharable and reusable packages that you find listed here.

Most of them consist in very little amount of code, but they provide hooks so that your application can easily extend and customize their behaviour.

Hooks

This is the core of ForrestJS modularity. It allows you to implement extensible applications made of composable feature pretty much like Wordpress does with their plugins, but in a Node fashion and with traceable and debuggable support.

👉 Install from NPM
👉 Documentation
👉 Introduction Example on CodeSandbox
👉 Kitchen Sink Example

Services

service-env

Reads environment configuration from different dot-files into your process.env variable, and provides a safe interface to access environmental variables.

👉 Install from NPM
👉 Documentation

service-logger

It exposes a simple interface to logging using Winston under the hood.

👉 Install from NPM
👉 Documentation

service-fastify

It creates a Fastify instance into the ForrestJS app, and let other features extend it with routes and plugins.

👉 Install it from NPM
👉 Open the Documentation
👉 Open the CodeSandbox example

service-fastify-healthz

It integrates with Fastify to expose a /healthz healthcheck endpoint. Features can integrate here to run their checks and invalidate it in case something goes wrong.

service-fastify-static

It integrates with Fastify for serving static files. (Although, I want to remember you that NGiNX or a simple CDN will do better)

Wrapper around fastify-static plugin.

👉 Install it from NPM
👉 Open the Documentation
👉 Open the CodeSandbox example

It integrates with Fastify and exposes an interface to read and write cookies, safely.

Wrapper around fastify-cookie plugin.

👉 Install it from NPM
👉 Open the Documentation
👉 Open the CodeSandbox example

service-fastify-gql

Sets up an Apollo Graphql Server in the ForrestJS app and provides hooks to extend the schema from a feature.

👉 Install it from NPM
👉 Open the Documentation
👉 Open the CodeSandbox example

service-apollo

Sets up an Apollo Client in the ForrestJS app and makes it available to route handlers.

👉 Install it from NPM
👉 Open the Documentation
👉 Open the CodeSandbox example

service-fetchq

Sets up an Fetchq Client in the ForrestJS app and makes it available to route handlers.

👉 Install it from NPM
👉 Open the Documentation
👉 Open the CodeSandbox example

service-jwt

Helps to issue and validate JWT tokens. It is mainly a Promise wrapper around the package jsonwebtoken.

👉 Install from NPM
👉 Documentation
👉 Open the CodeSandbox example

service-hash

It provides some basic cryptographic helper methods to safely hash passwords.

[[to be completed]]

👉 Install from NPM
👉 Documentation

service-postgres

It helps establishing a reliable connection with one or more Postgres databases using the library sequelize. It also provide hooks for features to provide their own data models in isolation.

[[to be completed]]

👉 Install from NPM
👉 Documentation

results matching ""

    No results matching ""