Rest Api Boilerplate

screenshot of Rest Api Boilerplate
express

Typescript-based REST API boilerplate with full integration tests

Overview

If you're venturing into the world of TypeScript and need a solid foundation to build your REST APIs, this TypeScript REST API boilerplate is a fantastic starting point. It simplifies the setup process and incorporates a range of modern tools, libraries, and best practices that can enhance your development experience. With a focus on flexibility and ease of use, this boilerplate allows developers to concentrate on building their applications rather than getting bogged down in configuration.

Designed with features that accommodate both beginners and experienced developers alike, this boilerplate project emphasizes clean architecture, testing capabilities, and seamless integration with various services. It's an excellent choice for anyone looking to quickly bootstrap a new project while adhering to best practices.

Features

  • Decorators for Endpoints and Middlewares: Utilizes routing-controllers to simplify endpoint and middleware definition, enhancing code readability and organization.
  • Automatic OpenAPI v3 Generation: Effortlessly generates an OpenAPI specification file thanks to routing-controllers-openapi, streamlining API documentation.
  • Comprehensive Testing Framework: Integrated Jest framework with code coverage, offering both unit and integration tests that can run against the compiled JavaScript server.
  • Dependency Injection Support: Utilize Inversify for effective dependency management, simplifying application structure and testing.
  • Linting Setup: Pre-configured with ESLint and Prettier, ensuring your code remains consistent and adheres to standards.
  • Dynamic Configuration Management: Leverages TOML files with node-config for flexible and organized configuration handling.
  • Hot Reloading During Development: Automatically reloads the server when files change, enhancing the development workflow.
  • Optional Serverless Deployment: Provides a setup for deploying via Serverless (AWS) as a Lambda, allowing scalable solutions without complex infrastructure management.
express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.