Docker Express Typescript Boilerplate

screenshot of Docker Express Typescript Boilerplate
express

A dockerized TypeScript-Express App boilerplate with MongoDB and Github Actions

Overview:

The Express TypeScript Boilerplate with ChatGPT reviews is a repository that serves as a starting point for backend development with Nodejs. It includes Docker integration and is optimized for CI/CD. The development environment uses docker-compose to start dependent services like MongoDB. One of the notable features of this project is the ability to review all PRs with ChatGPT.

Features:

  • Github Actions Workflows: Pre-configured Github Actions to run automated builds and publish images to Github Packages.
  • Dockerfile: Dockerfile to generate docker builds.
  • docker-compose: Docker compose script to start services in production mode.
  • Containerized Mongo for development: Starts a local MongoDB container with data persistence across runs.
  • Safe Mongoose Connection Helper: A helper class to connect with Mongoose reliably.
  • Joi: Declarative payload validation.
  • Middleware for easier async/await: Catches errors from routes and throws them to express error handler to prevent app crash due to uncaught errors.
  • OpenAPI 3.0 Spec: A starter template to get started with API documentation using OpenAPI 3.0. The API spec is also available when running the development server at http://localhost:3000/dev/api-docs.
  • env file for configuration: Change server config like app port, mongo url, etc.
  • Winston Logger: Uses winston as the logger for the application.
  • ESLINT: ESLINT is configured for linting.
  • Jest: Using Jest for running test cases.
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.