{"id":15027033,"url":"https://github.com/jkheadley/rest-hapi","last_synced_at":"2025-05-15T07:04:34.139Z","repository":{"id":39563000,"uuid":"72318291","full_name":"JKHeadley/rest-hapi","owner":"JKHeadley","description":"🚀 A RESTful API generator for Node.js","archived":false,"fork":false,"pushed_at":"2023-03-26T17:51:24.000Z","size":7221,"stargazers_count":1190,"open_issues_count":76,"forks_count":153,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-05-15T02:44:39.065Z","etag":null,"topics":["api","audit-log","crud","crud-api","crud-generator","documentation","hapi","hapi-plugin","hapi-server","joi","joi-validation","mongodb","mongoose","nosql","relational","rest","rest-api","swagger","validation"],"latest_commit_sha":null,"homepage":"https://resthapi.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JKHeadley.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.md","governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-30T01:21:20.000Z","updated_at":"2025-04-22T18:45:25.000Z","dependencies_parsed_at":"2024-01-03T05:49:16.694Z","dependency_job_id":"a9d9ee15-d10b-4482-b719-6b85df748e28","html_url":"https://github.com/JKHeadley/rest-hapi","commit_stats":null,"previous_names":[],"tags_count":195,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKHeadley%2Frest-hapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKHeadley%2Frest-hapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKHeadley%2Frest-hapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JKHeadley%2Frest-hapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JKHeadley","download_url":"https://codeload.github.com/JKHeadley/rest-hapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292039,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","audit-log","crud","crud-api","crud-generator","documentation","hapi","hapi-plugin","hapi-server","joi","joi-validation","mongodb","mongoose","nosql","relational","rest","rest-api","swagger","validation"],"created_at":"2024-09-24T20:05:39.425Z","updated_at":"2025-05-15T07:04:29.122Z","avatar_url":"https://github.com/JKHeadley.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://resthapi.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"367\" height=\"298\" src=\"https://user-images.githubusercontent.com/12631935/41144156-931d244c-6ac1-11e8-86e5-24fd5fcda8ec.png\" alt=\"rest-hapi logo\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://resthapi.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"150\" height=\"46\" src=\"https://user-images.githubusercontent.com/12631935/41491054-c208589a-70ab-11e8-9bac-b1ad47123a30.png\" alt=\"rest-hapi title\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eA RESTful API generator\u003c/strong\u003e \u003ca href=\"https://twitter.com/intent/tweet?text=Generate%20RESTful%20API%20endpoints%20with%20rest-hapi!\u0026url=https://resthapi.com\u0026via=resthapi\u0026hashtags=mongoosejs,hapijs,nodejs,MongoDB\"\u003e\n    \u003cimg alt=\"rest-hapi tweet\" src=\"https://img.shields.io/twitter/url/http/shields.io.svg?style=social\"\u003e\n  \u003c/a\u003e \n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/JKHeadley/rest-hapi\"\u003e\n    \u003cimg alt=\"Github Actions\" src=\"https://img.shields.io/github/checks-status/JKHeadley/rest-hapi/master\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/JKHeadley/rest-hapi\"\u003e\n    \u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/JKHeadley/rest-hapi.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/rest-hapi\"\u003e\n    \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dm/rest-hapi.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/rest-hapi\"\u003e\n    \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/rest-hapi.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://stackshare.io/rest-hapi\"\u003e\n    \u003cimg alt=\"StackShare\" src=\"https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitter.im/rest-hapi/Lobby\"\u003e\n    \u003cimg alt=\"Join the chat at https://gitter.im/rest-hapi/Lobby\" src=\"https://badges.gitter.im/rest-hapi/Lobby.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\nrest-hapi is a [hapi](https://hapijs.com/) plugin that generates RESTful API endpoints based on [mongoose](http://mongoosejs.com/) schemas. It provides a powerful combination of [relational](https://resthapi.com/docs/associations.html) structure with [NoSQL](https://resthapi.com/docs/creating-endpoints.html) flexibility.  You define your data models and the rest is done for you.  Have your API up and running in minutes!\n\n## Features\n\n* Automatic generation of [CRUD](https://resthapi.com/docs/creating-endpoints.html) and [association](https://resthapi.com/docs/associations.html) endpoints with [middleware](https://resthapi.com/docs/middleware.html) support\n* [joi](https://github.com/hapijs/joi) [validation](https://resthapi.com/docs/validation.html)\n* Route-level and document-level [authorization](https://resthapi.com/docs/authorization.html)\n* [Swagger docs](https://resthapi.com/docs/swagger-documentation.html) for all generated endpoints\n* [Query parameter](https://resthapi.com/docs/querying.html) support for searching, sorting, filtering, pagination, and embedding of associated models\n* Endpoint activity history through [Audit Logs](https://resthapi.com/docs/audit-logs.html)\n* Support for [policies](https://resthapi.com/docs/policies.html) via [mrhorse](https://github.com/mark-bradshaw/mrhorse)\n* [Duplicate fields](https://resthapi.com/docs/duplicate-fields.html)\n* Support for [\"soft\" delete](https://resthapi.com/docs/soft-delete.html)\n* Optional [metadata](https://resthapi.com/docs/metadata.html) for documents\n* Mongoose [wrapper methods](https://resthapi.com/docs/mongoose-wrapper-methods.html)\n* ...and more!\n\n---\n## Live demo\n\n![rest-hapi-demo-optimized](https://user-images.githubusercontent.com/12631935/41813184-b31cac6a-76e5-11e8-84c3-881d98e6c65d.gif)\n\n\nView the swagger docs for the live demo:\n\nhttps://demo.resthapi.com\n\nOr, for a more complete example, check out the [appy](https://appyapp.io) api:\n\nhttps://api.appyapp.io\n\n## Documentation\n\nCheck out the docs on the [official site](https://resthapi.com)!\n\n## Requirements\n\nYou need [Node.js](https://nodejs.org/en/) installed and you'll need [MongoDB](https://docs.mongodb.com/manual/installation/) installed and running.\n\n## Quick Start\n![rest-hapi-demo-alt-optimized](https://user-images.githubusercontent.com/12631935/41813206-0d2298a0-76e6-11e8-95d4-9b1e521c179e.gif)\n\n(**NOTE:** For an alternative quick start, check out his [awesome yeoman generator](https://github.com/vinaybedre/generator-resthapi) for rest-hapi.)\n\n1) Clone the demo repo\n```\n$ git clone https://github.com/JKHeadley/rest-hapi-demo.git\n$ cd rest-hapi-demo\n```\n\n2) Install the dependencies\n```\n$ npm install\n```\n\n3) Seed the models\n```\n$ ./node_modules/.bin/rest-hapi-cli seed\n```\n\n4) Start the server\n```\n$ npm start\n```\n\n5) View the API docs at \n\n[http://localhost:8080/](http://localhost:8080/)\n\n...have fun!\n\n## Example Projects\n\n[appy](https://github.com/JKHeadley/appy): A boilerplate web app.\n\n[rest-hapi-demo](https://github.com/JKHeadley/rest-hapi-demo): A simple demo project implementing rest-hapi in a hapi server.\n\n## Contributing\n\nWe welcome contributions to rest-hapi! These are the many ways you can help:\n\n- Submit patches and features\n- Improve the [documentation and website](https://resthapi.com/)\n- Report bugs\n- Follow us on [Twitter](https://twitter.com/resthapi)\n- Participate in the [gitter community](https://gitter.im/rest-hapi/Lobby)\n- And [donate financially](https://opencollective.com/rest-hapi)!\n\nPlease read our [contribution guide](CONTRIBUTING.md) to get started. Also note\nthat this project is released with a\n[Contributor Code of Conduct](CODE_OF_CONDUCT.md), please make sure to review\nand follow it.\n\n## Contributors\n\nThanks goes to each one of our contributors! 🙏\n\n[Become a contributor](CONTRIBUTING.md).\n\n\u003ca href=\"https://github.com/JKHeadley/rest-hapi/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/rest-hapi/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities!\n[Become a backer](https://opencollective.com/rest-hapi#backers).\n\n\u003ca href=\"https://opencollective.com/rest-hapi#backers\"\u003e\u003cimg src=\"https://opencollective.com/rest-hapi/backers.svg?width=890\" /\u003e\u003c/a\u003e\n\n## Questions?\nIf you have any questions/issues/feature requests, please feel free to open an [issue](https://github.com/JKHeadley/rest-hapi/issues/new).  We'd love to hear from you!\n\n## Support\nLike this project? Please star it! \n\n## License\nrest-hapi is licensed under a [MIT License](LICENSE).\n","funding_links":["https://opencollective.com/rest-hapi)!","https://opencollective.com/rest-hapi"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkheadley%2Frest-hapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkheadley%2Frest-hapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkheadley%2Frest-hapi/lists"}