Typeplate

screenshot of Typeplate
express

REST API boilerplate with Typescript, Express.js, Typeorm and Mocha.

Overview

This product is a REST API boilerplate built with TypeScript, Express, TypeORM, and Mocha. It provides a ready-to-use foundation for building RESTful APIs with a clean code architecture and a set of features for security, testing, documentation, and more.

Features

  • Basics: Clear and clean code architecture with classic layers (controllers, services, repositories, models). Object Relational Mapping with TypeORM. Business validation with self-designed business members.
  • Logs management: Using morgan and winston for logs management.
  • Changelog completion: Auto-changelog generation for easier documentation.
  • Testing: Included unit and end-to-end test sets built with Mocha, Chai, Sinon, and Supertest.
  • Documentation: API documentation with api-doc.
  • Security: SSL secure connection with native HTTPS module. Cross-Origin Resource Sharing (CORS). Securized HTTP headers with helmet. HTTP header pollution prevention with hpp. API request rate limit with express-rate-limit. Route validation with joi. HTTP-friendly errors with boom and http-status.
  • Authentication: JWT authentication process with passport.js. oAuth authentication process with passport.js.
  • Sending transactional emails: Utilizing the cliam library for sending transactional emails.
  • Performance: HTTP request cache with memory-cache. Database query cache with TypeORM caching.
  • Assets management: Customizable file upload with multer. Customizable image resizing with jimp.

Summary

This REST API boilerplate provides a solid foundation for building secure and performant APIs using TypeScript, Express, TypeORM, and Mocha. It includes features such as clear code architecture, logging, testing, and documentation, while also offering options for authentication, sending transactional emails, and managing assets. The installation guide helps users quickly set up the boilerplate and customize it for their own needs.

express
Express

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

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

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.