X Enterprises

Fastify Plugins

Production-ready Fastify 5 plugins for auth, storage, communications, and more.

Fastify Plugins

20 production-ready Fastify 5 plugins covering auth, storage, email, AI, PDF generation, and third-party integrations. All plugins are typed with TypeScript and follow consistent registration patterns.

Packages

PluginVersionDescription
fastify-xadmin1.1.0Admin APIs — tenants, roles, users, audit, impersonation, Stripe
fastify-x-ai1.3.0Vercel AI SDK — text, streaming, embeddings, structured output
fastify-xauth-better2.2.0Better Auth — multi-instance, orgs, 2FA, audit
fastify-xauth-jwks1.3.0JWKS JWT validation — path-based multi-provider
fastify-xauth-local1.3.0Local JWT auth with RBAC
fastify-xconfig2.3.0Core infrastructure — CORS, rate limiting, Prisma, health, error handling
fastify-xemail1.2.0SendGrid email integration
fastify-xgeocode1.3.0Geocodio address geocoding
fastify-xhubspot1.3.0HubSpot CRM integration
fastify-ximagepipeline1.3.0Image uploads with EXIF strip, moderation, R2
fastify-xlogger1.3.0Pino structured logging
fastify-xpdf1.3.0PDF generation from HTML/Markdown
fastify-xplaid1.3.0Plaid financial data
fastify-xrcs1.3.0Twilio RCS rich cards
fastify-xsignwell1.3.0SignWell document signing
fastify-xstorage1.3.0S3-compatible storage
fastify-xstripe1.3.0Stripe webhook handlers
fastify-xswagger1.3.0Route-scoped Swagger docs
fastify-xtwilio1.3.0Twilio SMS, Conversations, RCS
fastify-xwhatconverts1.3.0WhatConverts lead tracking

Common Registration Pattern

All plugins follow the same pattern — all configuration is passed explicitly via options. Plugins never read process.env; the consumer owns env access and passes values in:

import Fastify from 'fastify'
import xPlugin from '@xenterprises/fastify-xplugin'

const fastify = Fastify({ logger: true })

await fastify.register(xPlugin, {
  apiKey: process.env.PLUGIN_API_KEY, // consumer reads env, not the plugin
  // ...other plugin options
})

Plugins validate their options at registration and fail fast — a missing required option throws an Error naming the plugin, the option, its type, and a usage example, e.g. xplugin: missing required option `apiKey` (string), e.g. `app.register(xPlugin, { apiKey: '...' })` . Anything not required has a safe default, so minimal registrations stay minimal.

Each plugin exposes its API on a single decorator named after the plugin in camelCase (fastify.xLogger, fastify.xStripe, fastify.xPdf, …).

Fastify 5 Compatibility

All plugins are built for Fastify 5 and are:

  • ESM-only, with TypeScript declarations (.d.ts) shipped alongside
  • Wrapped in fastify-plugin (fp()) so decorators are visible to the parent scope
  • Registered asynchronously, with fastify: ^5.0.0 as a peer dependency

Prerequisites

  • Node.js 20+
  • Fastify 5.x

AI Context

section: "@xenterprises fastify plugins"
plugins: xadmin, x-ai, xauth-better, xauth-jwks, xauth-local, xconfig, xemail, xgeocode, xhubspot, ximagepipeline, xlogger, xpdf, xplaid, xrcs, xsignwell, xstorage, xstripe, xswagger, xtwilio, xwhatconverts
use-when: Overview of all 20 production-ready Fastify 5 plugins — navigate here to discover which plugin covers a given capability
package-naming: "@xenterprises/fastify-<pluginname>"
config: Consumers pass all configuration via register options — plugins never read process.env and fail fast on missing required options
decorators: Each plugin exposes a single camelCase decorator (fastify.xLogger, fastify.xStripe, fastify.xPdf, ...)
requirements: Node.js 20+, Fastify 5.x, ESM-only
Copyright © 2026