typescript-fastify

Solid

Building REST APIs with Fastify in TypeScript. Use when creating routes, handling requests, implementing validation with TypeBox, structuring applications, or working with HTTP handlers and plugins.

API & Backend 46 stars 4 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
56
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Fastify Fast, low-overhead web framework for Node.js with TypeBox schema validation. ## Additional References - [references/plugins.md](./references/plugins.md) - Plugin architecture and dependency injection - [references/typeid.md](./references/typeid.md) - Type-safe prefixed identifiers ## Setup ```bash npm i fastify @fastify/type-provider-typebox @sinclair/typebox ``` ```typescript import Fastify from 'fastify' import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox' const app = Fastify({ logger: true }).withTypeProvider<TypeBoxTypeProvider>() ``` ## Schema Definition ```typescript import { Type, Static } from '@sinclair/typebox' // Request/response schemas with $id for OpenAPI export const UserSchema = Type.Object({ id: Type.String({ format: 'uuid' }), name: Type.String({ minLength: 1, maxLength: 100 }), email: Type.String({ format: 'email' }), createdAt: Type.String({ format: 'date-time' }), }, { $id: 'UserResponse' }) export type User = Static<typeof UserSchema> // Input schemas (omit generated fields) export const CreateUserSchema = Type.Object({ name: Type.String({ minLength: 1, maxLength: 100 }), email: Type.String({ format: 'email' }), }, { $id: 'CreateUserRequest' }) export type CreateUserInput = Static<typeof CreateUserSchema> ``` ## Route with Full Schema ```typescript const TAGS = ['Users'] app.post('/users', { schema: { operationId: 'createUser', tags: TAGS, summary: 'Create a new user', description: '...

Details

Author
martinffx
Repository
martinffx/atelier
Created
8 months ago
Last Updated
1 months ago
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

fastify-typescript

This skill should be used when using TypeScript with Fastify, configuring type providers, using @fastify/type-provider-typebox, using @fastify/type-provider-json-schema-to-ts, typing Fastify plugins, declaration merging for decorators, typing route handlers, FastifyInstance generics, FastifyRequest generics, FastifyReply generics, withTypeProvider, typing custom decorators, or Fastify TypeScript configuration.

5 Updated 3 weeks ago
RadOrigin-LLC
API & Backend Listed

fastify-best-practices

Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts.

1 Updated today
filippolmt
API & Backend Listed

fastify-expert

Use when building or debugging Fastify services - files importing fastify, fastify-plugin, @fastify/* packages, or @sinclair/typebox; projects with a Fastify app factory, route plugins, or app.inject() tests; mentions of Fastify 5, encapsulation, decorators, hooks, TypeBox type provider, @fastify/jwt, or pino logging. Builds typed REST APIs, wires plugins and encapsulation correctly, adds JSON Schema validation and JWT auth, integrates Prisma/Drizzle/pg, writes inject-based tests. Invoke for new routes/plugins, schema-first request typing, auth flows, error handling, database wiring, and test suites.

5 Updated 2 days ago
Aarvion-AI