Hapi is a configuration-driven web framework for building secure and scalable HTTP servers and APIs on the Node.js runtime. It functions as a REST API development framework and an enterprise server implementation focused on stability, security, and comprehensive input validation.
The framework is built around a plugin-based architecture, allowing core functionality and custom logic to be organized into modular, registerable plugins. It serves as an HTTP request lifecycle manager, enabling the interception and modification of requests through pre-handlers and extensions before they reach the final route handler.
The project provides capabilities for schema-based input validation, strategy-based authentication, and CORS policy configuration. It includes tools for traffic management via resource-limit load shedding and performance optimization through internal method caching. For testing, the system supports in-process request injection to simulate HTTP requests without a live network connection.