A hapi plugin that automatically generates RESTful API endpoints from Mongoose schemas for Node.js.
rest-hapi is a hapi plugin for Node.js that automatically generates RESTful API endpoints from Mongoose schemas. It solves the problem of writing repetitive CRUD and association endpoints by providing a code-first approach where defining data models instantly creates a fully documented and validated API.
Node.js developers building RESTful backends with MongoDB, especially those using the hapi framework who want to accelerate development with automated endpoint generation.
Developers choose rest-hapi because it drastically reduces boilerplate code, enforces consistent API patterns, and provides out-of-the-box features like Swagger docs, validation, and authorization, all while maintaining the flexibility of Mongoose and NoSQL.
🚀 A RESTful API generator for Node.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates full RESTful CRUD and association endpoints from Mongoose schemas, allowing APIs to be up and running in minutes as demonstrated in the quick start gif and demo.
Integrates Joi validation and automatically produces Swagger documentation for all endpoints, ensuring API consistency and ease of testing without extra setup.
Supports advanced query parameters for searching, sorting, filtering, pagination, and embedding associated models, enhancing API usability directly from the README features.
Provides audit logs for endpoint activity history and integrates with mrhorse for custom business logic policies, adding monitoring and enforcement capabilities out of the box.
Tightly coupled with hapi and Mongoose/MongoDB, making it unsuitable for projects using other Node.js frameworks like Express or databases like PostgreSQL, limiting flexibility.
Only generates RESTful APIs, so if GraphQL or other interfaces are required, developers must build additional layers or use separate tools, as admitted by its focused scope.
Requires MongoDB installed and running, along with specific setup steps like seeding models, which adds complexity compared to lightweight or serverless alternatives.