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.
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.
Reads environment configuration from different dot-files into your
process.env variable, and provides a safe interface to access environmental variables.
It exposes a simple interface to logging using Winston under the hood.
It creates a Fastify instance into the ForrestJS app, and let other features extend it with routes and plugins.
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.
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.
It integrates with Fastify and exposes an interface to read and write cookies, safely.
Wrapper around fastify-cookie plugin.
Sets up an Apollo Graphql Server in the ForrestJS app and provides hooks to extend the schema from a feature.
Sets up an Apollo Client in the ForrestJS app and makes it available to route handlers.
Sets up an Fetchq Client in the ForrestJS app and makes it available to route handlers.
Helps to issue and validate JWT tokens. It is mainly a Promise wrapper around the
It provides some basic cryptographic helper methods to safely hash passwords.
[[to be completed]]
It helps establishing a reliable connection with one or more Postgres databases using the
sequelize. It also provide hooks for features to provide their own data models in
[[to be completed]]