{"id":13452479,"url":"https://github.com/tsedio/tsed","last_synced_at":"2026-01-15T22:22:30.434Z","repository":{"id":37001055,"uuid":"52221518","full_name":"tsedio/tsed","owner":"tsedio","description":" :triangular_ruler:  Ts.ED is a Node.js and TypeScript framework on top of Express to write your application with TypeScript (or ES6). It provides a lot of decorators and guideline to make your code more readable and less error-prone. ⭐️ Star to support our work! ","archived":false,"fork":false,"pushed_at":"2025-05-07T07:13:31.000Z","size":85563,"stargazers_count":2958,"open_issues_count":54,"forks_count":294,"subscribers_count":42,"default_branch":"production","last_synced_at":"2025-05-07T19:47:41.114Z","etag":null,"topics":["cli","contribution","decorators","dependency-injection","express","hacktoberfest","ioc","koa","lifecycle-hooks","middleware","multer","nodejs","nodejs-api","nodejs-framework","open-source","rest-api","socket-io","swagger","typescript","typescript-framework"],"latest_commit_sha":null,"homepage":"https://tsed.io/","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/tsedio.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null},"funding":{"github":["romakita"],"open_collective":"tsed"}},"created_at":"2016-02-21T18:38:47.000Z","updated_at":"2025-05-07T07:10:15.000Z","dependencies_parsed_at":"2023-01-17T12:46:00.253Z","dependency_job_id":"5efe6780-bd45-4e86-ab1f-3c35f0122f64","html_url":"https://github.com/tsedio/tsed","commit_stats":{"total_commits":4679,"total_committers":176,"mean_commits":"26.585227272727273","dds":0.4426159435776875,"last_synced_commit":"0158fb6d335ed76c653fb9797be9d41bc52b1be4"},"previous_names":["typedproject/tsed","romakita/ts-express-decorators"],"tags_count":1378,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsedio%2Ftsed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsedio%2Ftsed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsedio%2Ftsed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsedio%2Ftsed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsedio","download_url":"https://codeload.github.com/tsedio/tsed/tar.gz/refs/heads/production","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253773091,"owners_count":21962187,"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":["cli","contribution","decorators","dependency-injection","express","hacktoberfest","ioc","koa","lifecycle-hooks","middleware","multer","nodejs","nodejs-api","nodejs-framework","open-source","rest-api","socket-io","swagger","typescript","typescript-framework"],"created_at":"2024-07-31T07:01:25.298Z","updated_at":"2026-01-15T22:22:30.394Z","avatar_url":"https://github.com/tsedio.png","language":"TypeScript","readme":"\u003cp style=\"text-align: center\" align=\"center\"\u003e\n \u003ca href=\"https://tsed.dev\" target=\"_blank\"\u003e\u003cimg src=\"https://tsed.dev/tsed-og.png\" width=\"200\" alt=\"Ts.ED logo\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n \n   \u003chr /\u003e\n \n[![Build \u0026 Release](https://github.com/tsedio/tsed/workflows/Build%20\u0026%20Release/badge.svg)](https://github.com/tsedio/tsed/actions?query=workflow%3A%22Build+%26+Release%22)\n[![PR Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/tsedio/tsed/blob/master/CONTRIBUTING.md)\n[![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![github](https://img.shields.io/static/v1?label=Github%20sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86)](https://github.com/sponsors/romakita)\n[![opencollective](https://img.shields.io/static/v1?label=OpenCollective%20sponsor\u0026message=%E2%9D%A4\u0026logo=OpenCollective\u0026color=%23fe8e86)](https://opencollective.com/tsed)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://tsed.dev/\"\u003eWebsite\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://tsed.dev/getting-started/\"\u003eGetting started\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://slack.tsed.dev\"\u003eSlack\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://twitter.com/TsED_io\"\u003eTwitter\u003c/a\u003e\n\u003c/div\u003e\n\n\u003chr /\u003e\n\n## What it is\n\nTs.ED is a modern Node.js framework built with TypeScript. It offers a flexible structure with a fast learning curve, specifically designed to improve the developer experience. Ts.ED provides numerous decorators and guidelines to make your code more readable and less error-prone. It supports various platforms and tools, including Node.js/Bun.js, Express.js/Koa.js, CLI, and serverless architectures (e.g., AWS).\n\n- Multi-platform: Easily build your server-side application using Express.js, Koa.js, CLI, or serverless platforms (e.g., AWS). It supports both Node.js and Bun.js runtimes. Learn more \u003ca class=\"home-link\" href=\"https://tsed.dev/introduction/capabilities.html\"\u003ehere\u003c/a\u003e.\n- Configuration: Stop wasting time on configuration—your application comes preconfigured for a fast start! Try our \u003ca class=\"home-link\" href=\"https://tsed.dev/introduction/getting-started.html\"\u003eCLI\u003c/a\u003e.\n- Decorators: Use a wide range of decorators to structure your code, define routes, and implement methods with ease. Learn more \u003ca class=\"home-link\" href=\"https://tsed.dev/introduction/decorators.html\"\u003ehere\u003c/a\u003e.\n- Class-based: Define classes as \u003ca class='home-link' href='http://tsed.dev/docs/controllers.html'\u003eControllers\u003c/a\u003e, \u003ca class='home-link' href='http://tsed.dev/docs/model.html'\u003eModels\u003c/a\u003e, \u003ca class='home-link' href='http://tsed.dev/docs/providers.html'\u003eProviders (DI)\u003c/a\u003e, \u003ca class='home-link' href='http://tsed.dev/docs/pipes.html'\u003ePipes\u003c/a\u003e, and more, with JSON Schema and OpenAPI at the core of the framework.\n- Testing: Testing is not optional—it's essential! Ts.ED includes built-in features to make testing your code simple and efficient. Learn more \u003ca class=\"home-link\" href=\"https://tsed.dev/docs/testing.html\"\u003ehere\u003c/a\u003e.\n\n## Features\n\n- Use our CLI to create a new project: https://tsed.dev/introduction/getting-started.html#installation\n- Support TypeORM, Mongoose, GraphQL, Socket.io, Swagger-ui, Passport.js, etc...\n- Define class as Controller,\n- Define class as Service (IoC),\n- Define class as Middleware and MiddlewareError,\n- Define class as Json Mapper (POJ to Model and Model to POJ),\n- Define root path for an entire controller and versioning your Rest API,\n- Define as sub-route path for a method,\n- Define routes on GET, POST, PUT, DELETE and HEAD verbs,\n- Define middlewares on routes,\n- Define required parameters,\n- Inject data from query string, path parameters, entire body, cookies, session or header,\n- Inject Request, Response, Next object from Express request,\n- Template (View),\n- Testing.\n\n## Links\n\n- [Board/Roadmap](https://github.com/orgs/tsedio/projects/4/views/1)\n- [Documentation](https://tsed.dev)\n- [Guideline](./CONTRIBUTING.md)\n- [Tutorials](https://tsed.dev/tutorials/)\n- [Community Slack](https://slack.tsed.dev)\n- [Support us](https://github.com/sponsors/romakita)\n- [Team](https://tsed.dev/team.html)\n\n## Getting started\n\nSee our [getting started here](https://tsed.dev/getting-started) to create new Ts.ED project or use\nour [CLI](https://tsed.dev/introduction/getting-started.html#installation)\n\n## Overview\n\n### Server example\n\nHere an example to create a Server with Ts.ED:\n\n```typescript\nimport {Configuration, Inject} from \"@tsed/di\";\nimport {PlatformApplication} from \"@tsed/platform-http\";\nimport \"@tsed/platform-express\";\nimport cookieParser from \"cookie-parser\";\nimport compress from \"compress\";\nimport methodOverride from \"method-override\";\n\n@Configuration({\n  port: 3000,\n  middlewares: [\"cookie-parser\", \"compression\", \"method-override\", \"json-parser\", \"urlencoded-parser\"]\n})\nexport class Server {}\n```\n\nTo run your server, you have to use Platform API to bootstrap your application with the expected\nplatform like Express.\n\n```typescript\nimport {$log} from \"@tsed/logger\";\nimport {PlatformExpress} from \"@tsed/platform-express\";\nimport {Server} from \"./Server.js\";\n\nasync function bootstrap() {\n  try {\n    $log.debug(\"Start server...\");\n    const platform = await PlatformExpress.bootstrap(Server);\n\n    await platform.listen();\n    $log.debug(\"Server initialized\");\n  } catch (er) {\n    $log.error(er);\n  }\n}\n\nbootstrap();\n```\n\nTo customize the server settings see [Configure server with decorator](https://tsed.dev/docs/configuration.html)\n\n#### Controller example\n\nThis is a simple controller to expose user resource. It use decorators to build the endpoints:\n\n```typescript\nimport {Inject} from \"@tsed/di\";\nimport {Summary} from \"@tsed/swagger\";\nimport {\n  Controller,\n  Get,\n  QueryParams,\n  PathParams,\n  Delete,\n  Post,\n  Required,\n  BodyParams,\n  Status,\n  Put,\n  Returns,\n  ReturnsArray\n} from \"@tsed/schema\";\nimport {BadRequest} from \"@tsed/exceptions\";\nimport {UsersService} from \"../services/UsersService.js\";\nimport {User} from \"../models/User.js\";\n\n@Controller(\"/users\")\nexport class UsersCtrl {\n  @Inject()\n  private usersService: UsersService;\n\n  @Get(\"/:id\")\n  @Summary(\"Get a user from his Id\")\n  @Returns(User)\n  async getUser(@PathParams(\"id\") id: string): Promise\u003cUser\u003e {\n    return this.usersService.findById(id);\n  }\n\n  @Post(\"/\")\n  @Status(201)\n  @Summary(\"Create a new user\")\n  @Returns(User)\n  async postUser(@Required() @BodyParams() user: User): Promise\u003cUser\u003e {\n    return this.usersService.save(user);\n  }\n\n  @Put(\"/:id\")\n  @Status(201)\n  @Summary(\"Update the given user\")\n  @Returns(User)\n  async putUser(@PathParams(\"id\") id: string, @Required() @BodyParams() user: User): Promise\u003cUser\u003e {\n    if (user.id !== id) {\n      throw new BadRequest(\"ID mismatch with the given payload\");\n    }\n\n    return this.usersService.save(user);\n  }\n\n  @Delete(\"/:id\")\n  @Summary(\"Remove a user\")\n  @Status(204)\n  async deleteUser(@PathParams(\"id\") @Required() id: string): Promise\u003cUser\u003e {\n    await this.usersService.delete(user);\n  }\n\n  @Get(\"/\")\n  @Summary(\"Get all users\")\n  @(Returns(200, Array).Of(User))\n  async findUser(@QueryParams(\"name\") name: string) {\n    return this.usersService.find({name});\n  }\n}\n```\n\n## Repository stats\n\n![Alt](https://repobeats.axiom.co/api/embed/3b7eecbfff39563a071bf63aa527ead7959ef47e.svg \"Repobeats analytics image\")\n\n## Contributors\n\nPlease read [contributing guidelines here](./CONTRIBUTING.md).\n\n\u003ca href=\"https://github.com/tsedio/tsed/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/tsed/contributors.svg?width=890\" /\u003e\u003c/a\u003e\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]\n\n\u003ca href=\"https://opencollective.com/tsed#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tsed/tiers/backer.svg?width=890\"\u003e\u003c/a\u003e\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 - 2023 Romain Lenzotti\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":["https://github.com/sponsors/romakita","https://opencollective.com/tsed"],"categories":["TypeScript","Packages","cli","包"],"sub_categories":["Web frameworks","Web 框架"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsedio%2Ftsed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsedio%2Ftsed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsedio%2Ftsed/lists"}