fastify-dx icon indicating copy to clipboard operation
fastify-dx copied to clipboard

Specification

Open galvez opened this issue 2 years ago • 1 comments

Fastify DX

Fastify DX is a CLI for rapid application development using the Fastify stack. It aims to offer many of the same functionalities found in Next.js, Nuxt.js and Remix, but instead of relying on deep runtime internals, focus on code generation and glue code for setting up and running Fastify projects, both in development and production.

Motivations

  • Effective SSR is locked away in black boxes today
    • Lots of buy-in into chosen framework is necessary
  • Companies often struggle scaling bringing Next.js apps to optimal performance
    • Next.js, Nuxt.js and Remix are all based on the Express middleware paradigm
  • Good chunk of projects still dependent on CRA/webpack
  • No de-facto solution for minimal (primitives only) SSR available

Features

  • Not a framework nor runtime, all generated code is pure Fastify and plugins
  • CLI web view with insights and logging filters for available sites
  • Out-of-the-box integrated hot reload for server with Vite app

Core

Packages that are part of the core boilerplate.

  • middie
  • fastify
  • fastify-redis (optional)
  • fastify-mongodb (optional)
  • fastify-postgresql (optional)
  • mercurius (optional)
  • fastify-api (optional)
  • fastify-vite
  • fastify-static

Commands

The CLI is meant to be installed globally, each command backed by zx script which can also be ejected and tweaked to meet custom project requirements.

  • fdx eject <boilerplate>: ejects boilerplate in its original format.
  • fdx apply: modifies current boilerplate but based on settings uni.config.js
  • fdx dev <site>: runs the specified site in development mode, or the last site ran.
  • fdx build <site>: runs the specified site in production mode
  • fdx start <site>: runs the specified site in production mode
  • fdx gen <site>: statically generates the specified site

The goal is to build up from fastify-cli with several DX oriented changes and additions, along with new and updated documentation.

galvez avatar Feb 11 '22 03:02 galvez

Nice work!

mcollina avatar Feb 11 '22 12:02 mcollina