@puq/rest
TypeScript icon, indicating that this package has built-in type declarations

0.6.20 • Public • Published

Logo

@puq/rest

Install

  pnpm add @puq/rest

Summary

A powerful library designed to streamline the creation of RESTful APIs in NestJS by reducing boilerplate code and minimizing the risk of bugs. This library introduces custom decorators for Controllers and methods, automatically generating plural and singular resource paths, as well as handling complex relational routes. It is perfect for developers looking to speed up their development process, eliminate redundancy, and ensure consistency across API endpoints.

Key Features

  • Automatic Path Generation: Say goodbye to manually defining each API route. The library automatically creates both plural and singular resource paths, such as /resources and /resource/:id, with zero configuration required.

  • Relational Route Support: Effortlessly define relational paths like /resource/:id/:relatedName/:relatedId, ensuring seamless handling of nested routes and related resources.

  • Custom Decorators: Use intuitive and reusable decorators for both controllers and methods, significantly reducing the amount of code and improving readability and maintainability.

  • Standardized REST API Endpoints: Get all the common REST API routes you need out-of-the-box, including GET, POST, PUT, DELETE, and more. This ensures consistency in API structure and reduces the chances of human error.

  • Bug Reduction: By automating the routing logic and using predefined patterns, this library eliminates the potential for typos or incorrect path formats, making your API routes more reliable and easier to manage.

  • Scalable and Extensible: Easily integrate this library into any existing NestJS project with minimal setup. Its flexible structure allows for future customization to meet specific use cases.

Benefits

  • Faster Development: With automatic path creation and simplified decorators, you can rapidly build and maintain APIs with less effort and fewer lines of code.

  • Improved Consistency: Standardizing routes across your project helps ensure a consistent API structure, reducing confusion and increasing developer productivity.

  • Reduced Bugs: Automated path generation and relational route handling drastically reduce human error, leading to more robust and maintainable APIs.

  • Cleaner Code: Custom decorators reduce boilerplate code and allow developers to focus on the actual logic of the application rather than spending time on repetitive tasks.

Try it Now!

Start leveraging the power of NestJS Auto-Routes Decorators and simplify your REST API development while improving maintainability and minimizing errors. Installation is quick, and integration into your existing NestJS project is straightforward.

Funding

Thank you for using @puq/rest It's an open-source project, and maintaining it takes time and effort. If you find this library useful, please consider supporting its ongoing development. Your contributions help ensure that the project stays up-to-date, secure, and well-maintained.

Instant Funding

Your funding will go toward

  • Bug fixes and updates to ensure compatibility with the latest versions of dependencies.
  • New features that will make the library even more powerful.
  • Documentation improvements to help users get the most out of [Your Library Name].
  • General maintenance to keep the library running smoothly and securely.

Contact to the developer: [robert.brightline@gmail.com]

Support the developer

Readme

Keywords

Package Sidebar

Install

npm i @puq/rest

Weekly Downloads

38

Version

0.6.20

License

MIT

Unpacked Size

82 kB

Total Files

99

Last publish

Collaborators

  • rbrightline