{"id":15233396,"url":"https://github.com/fastifyresty/fastify-resty","last_synced_at":"2025-08-22T00:31:14.817Z","repository":{"id":41784045,"uuid":"308749721","full_name":"FastifyResty/fastify-resty","owner":"FastifyResty","description":"⚔️  Declarative NodeJS web framework with REST API route auto-generation, DI, and decorators, build on top of Fastify and TypeScript.","archived":false,"fork":false,"pushed_at":"2024-03-21T20:06:47.000Z","size":1234,"stargazers_count":84,"open_issues_count":13,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-15T04:33:51.948Z","etag":null,"topics":["api","decorators","fastify","framework","json-schema","nodejs","rest","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/FastifyResty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-30T21:41:11.000Z","updated_at":"2024-10-15T13:04:26.000Z","dependencies_parsed_at":"2024-10-12T15:40:27.373Z","dependency_job_id":null,"html_url":"https://github.com/FastifyResty/fastify-resty","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"a6f5e4965d643e2eb2acc5582d01621df3f8803c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastifyResty%2Ffastify-resty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastifyResty%2Ffastify-resty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastifyResty%2Ffastify-resty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastifyResty%2Ffastify-resty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FastifyResty","download_url":"https://codeload.github.com/FastifyResty/fastify-resty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542288,"owners_count":18242332,"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","decorators","fastify","framework","json-schema","nodejs","rest","typescript"],"created_at":"2024-09-29T05:08:24.520Z","updated_at":"2024-12-20T06:06:36.989Z","avatar_url":"https://github.com/FastifyResty.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/FastifyResty/fastify-resty/gh-images/logo/full-logo.png\" width=\"650\" height=\"auto\"/\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![Build Workflow](https://github.com/FastifyResty/fastify-resty/workflows/Build%20Workflow/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/FastifyResty/fastify-resty/branch/main/graph/badge.svg?token=R11QLZFPCJ)](https://codecov.io/gh/FastifyResty/fastify-resty)\n[![Known Vulnerabilities](https://snyk.io/test/github/FastifyResty/fastify-resty/badge.svg)](https://snyk.io/test/github/FastifyResty/fastify-resty)\n[![Depfu](https://badges.depfu.com/badges/c43ccc83fdcc48e031489f54ef8f4194/overview.svg)](https://depfu.com/github/FastifyResty/fastify-resty?project_id=17745)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/FastifyResty/fastify-resty/graphs/commit-activity)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n\u003c/div\u003e\n\n\u003e **Modern and declarative REST API framework for superfast and oversimplification backend development, build on top of Fastify and TypeScript.**\n\n\u003chr\u003e\n\u003cp align=\"center\"\u003e\nIf you find this useful, please don't forget to star :star:\u0026nbsp; the repo, as this will help to promote the project.\n\u003c/p\u003e\n\u003chr\u003e\n\n## Benefits :dart:\n\n- **Zero configuration** - Generates [RESTful API](https://restfulapi.net/) routes for your data out the box\n- **JSON Schema validation** - Build [JSON Schemas](https://json-schema.org/) to validate and speedup your requests and replies\n- **Highly customizable** - provides a lot of possible configurations for your application\n- **Purely TypeScript** - Written in [TypeScript](https://www.typescriptlang.org/) and comes with all the required typings\n- **Declarative interface** - Uses decorators for routes and models definitions\n- **Fastify compatible** - Built with [Fastify](https://www.fastify.io/) and supports all its features and plugins\n- **Built-in DI** - Provides simple Dependency Injection interface to bind your entries\n\n## Install :pushpin:\n\n#### Core module\n\n```sh\n$ npm install @fastify-resty/core fastify\n```\n\n#### TypeORM connector\n\n```sh\n$ npm install @fastify-resty/typeorm typeorm\n```\n\n## Usage :rocket:\n\n##### TypeORM Entity (author.entity.ts):\n\n```ts\nimport { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';\n\n@Entity()\nexport default class Author {\n  @PrimaryGeneratedColumn()\n  id: number;\n\n  @Column()\n  firstname: string;\n\n  @Column()\n  lastname: string;\n\n  @CreateDateColumn()\n  created_at: Date;\n}\n```\n\n##### Entity controller (author.controller.ts):\n\n```ts\nimport { EntityController } from '@fastify-resty/core';\nimport AuthorEntity from './author.entity';\n\n@EntityController(AuthorEntity, '/authors')\nexport default class AuthorController {}\n```\n\n##### Bootstrap (app.ts):\n\n```ts\nimport fastify from 'fastify';\nimport { createConnection } from 'typeorm';\nimport { bootstrap } from '@fastify-resty/core';\nimport typeorm from '@fastify-resty/typeorm';\nimport AuthorController from './author.controller';\n\nasync function main() {\n  const app = fastify();\n  const connection = await createConnection();\n\n  app.register(typeorm, { connection });\n  app.register(bootstrap, { controllers: [AuthorController] });\n\n  app.listen(8080, (err, address) =\u003e {\n    console.log(app.printRoutes());\n  });\n}\n\nmain();\n```\n\n##### Generated routes:\n\n```\n└── /\n    └── users (DELETE|GET|PATCH|POST|PUT)\n        └── / (DELETE|GET|PATCH|POST|PUT)\n            └── :id (DELETE)\n                :id (GET)\n                :id (PATCH)\n                :id (PUT)\n```\n\n## Documentation :books:\n\n- [Quickstart](./docs/Quickstart.md) :label:\n- [Application Structure](./docs/Application-Structure.md) :label:\n- [Bootstrapping](./docs/Bootstrapping.md) :label:\n- [Controllers](./docs/Controllers.md) :label:\n- [Entity Controllers](./docs/Entity-Controllers.md) :label:\n- [Model](./docs/Model.md) :label:\n- [Services](./docs/Services.md) :label:\n- [Dependency Injection](./docs/Dependency-Injection.md) :label:\n\n## Packages :package:\n\n- [@fastify-resty/core](https://www.npmjs.com/package/@fastify-resty/core) - **Fastify Resty** core functionality\n- [@fastify-resty/typeorm](https://www.npmjs.com/package/@fastify-resty/typeorm) - **Fastify Resty** TypeORM connector\n\n## Examples :microscope:\n\n- [Fastify Resty Quickstart](https://github.com/FastifyResty/fastify-resty/tree/main/examples/fastify-resty-quickstart)\n- [Fastify Resty Blog API](https://github.com/FastifyResty/fastify-resty/tree/main/examples/fastify-resty-blog)\n\n## Issues and contributions :memo:\n\nContributors are welcome, please fork and send pull requests! If you find a bug or have any ideas on how to improve this project please submit an issue.\n\n## License\n[MIT License](https://github.com/FastifyResty/fastify-resty/blob/main/LICENSE.md)\n\nIcons made by \u003ca href=\"https://www.flaticon.com/authors/eucalyp\" title=\"Eucalyp\"\u003eEucalyp\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003e www.flaticon.com\u003c/a\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastifyresty%2Ffastify-resty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastifyresty%2Ffastify-resty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastifyresty%2Ffastify-resty/lists"}