Express Typeorm Rest Boilerplate

screenshot of Express Typeorm Rest Boilerplate
express

Boilerplate code to get started with building RESTful API Services (Express, TypeORM MongoDB stack)

Overview:

The project is a boilerplate for the NodeJS, Express, Typescript, TypeORM, MongoDB stack designed to simplify the setup of project structure, logging, testing, and more. With features like JWT-based authentication, dependency injection, ORM support for various databases, and code generators, it aims to streamline the development process.

Features:

  • JWT based user authentication with jsonwebtoken and express-jwt
  • Dependency Injection with TypeDI
  • ORM support for multiple databases (MySQL, PostgreSQL, MariaDB, SQLite, MongoDB, and more) using TypeORM
  • Clear and organized structure with different layers such as entities, services, middlewares, loaders, etc.
  • Validation enabled thanks to class-validator
  • Unit and Integration Testing with Jest
  • Security Features integrated via Helmet
  • Role-based access control using custom middleware
  • Code generator for entity, service, route, factory, seed, test with a custom-built script and CLI tool Commander
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.