What problem does it solve?
Hapi’s power comes with a lot of architectural moving parts, and this Skill helps you wire servers, routes, auth, validation, lifecycle extensions, and testing patterns together correctly and consistently.
Core Features & Use Cases
- Guide Hapi server composition: structure a server with decorations, methods, plugins, and a clear request lifecycle strategy.
- Make requests safe and predictable: validate route params, query, payload, and headers using Joi with consistent error handling.
- Type routes end-to-end in TypeScript: apply
ServerRoute<Refs> generics so request.params, request.query, request.payload, auth, and lifecycle methods remain strongly typed.
- Use auth with proper layering: model scheme → strategy → default, configure route auth modes, and apply scope/entity access control patterns.
- Operational confidence: follow startup/shutdown lifecycle rules and use
server.inject()-style testing patterns for fast assertions.
Quick Start
Use the hapi skill to plan how to register plugins, validate inputs, configure route auth, and type your handlers for a new REST endpoint.