fastify-best-practices

Installation
Summary

Comprehensive guidance for building Fastify Node.js backends with TypeScript, covering routes, plugins, validation, and production deployment.

  • Covers 16+ core topics including plugins, route organization, JSON Schema validation, error handling, hooks, authentication, testing, logging with Pino, and TypeScript integration via strip types
  • Includes recommended reading paths for common scenarios: new projects, adding authentication, performance optimization, testing setup, and production deployment
  • Addresses full request lifecycle management, response serialization, CORS and security headers, WebSocket support, database integration, and HTTP proxying
  • Emphasizes schema-first development, plugin encapsulation, async/await patterns, and Fastify's built-in performance optimizations with minimal external dependencies
SKILL.md

When to use

Use this skill when you need to:

  • Develop backend applications using Fastify
  • Implement Fastify plugins and route handlers
  • Get guidance on Fastify architecture and patterns
  • Use TypeScript with Fastify (strip types)
  • Implement testing with Fastify's inject method
  • Configure validation, serialization, and error handling

Quick Start

A minimal, runnable Fastify server to get started immediately:

import Fastify from 'fastify'

const app = Fastify({ logger: true })
Related skills

More from mcollina/skills

Installs
2.0K
Repository
mcollina/skills
GitHub Stars
1.8K
First Seen
Jan 31, 2026