Docker Express Postgres Boilerplate

screenshot of Docker Express Postgres Boilerplate
express
drizzle-orm

A modern boilerplate for building scalable and maintainable REST APIs with JWT authentication, written in TypeScript. It features Docker, Express, Drizzle, and integrates Clean Architecture principles with Dependency Injection powered by Inversify.

Overview

Setting up a modern web application can often be overwhelming, especially when you're looking to implement robust features like authentication, database management, and reliable testing practices. This boilerplate simplifies the initial setup of an Express REST API by providing a comprehensive toolkit that not only includes essential features like user authentication and database connectivity but also enhances your development experience with Docker support. With basic authentication and user creation routes already implemented, you can launch your project swiftly without getting bogged down in the nitty-gritty of configuration.

The boilerplate also ensures application integrity with end-to-end tests boasting a perfect code coverage of 100%. Regularly updated package management keeps dependencies current and minimizes compatibility issues. Whether you're a seasoned developer or just starting, this setup aims to streamline the development process so you can focus on building great features for your applications.

Features

  • Docker Containerization: Easily run your application anywhere without the hassle of local installations like PostgreSQL.
  • Authentication with Passport: Implement secure user authentication and session management effortlessly.
  • TypeORM Simplified Database Queries: Interact with your database using a straightforward and intuitive ORM.
  • Layered Application Structure: Organized codebase with separation of concerns, including routes, controllers, and middlewares for enhanced maintainability.
  • Integrated Testing Tool with Jest: Built-in support for testing ensures your application is robust and reliable.
  • E2E API Testing with Supertest: Comprehensive API testing capabilities to verify the integrity of your endpoints.
  • Basic Security Features: Protection against common vulnerabilities with Helmet and CORS for secure API interactions.
  • Code Linter with ESLint: Pre-configured linting rules help maintain code quality throughout your project.
express
Express

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

drizzle-orm
Drizzle ORM

Drizzle ORM is a TypeScript ORM for SQL databases designed with maximum type safety in mind. It comes with a drizzle-kit CLI companion for automatic SQL migrations generation. Drizzle ORM is meant to be a library, not a framework. It stays as an opt-in solution all the time at any levels.

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.

zod
Zod

Zod is a TypeScript-first schema declaration and validation library. It allows you to define schemas that can validate data at runtime while providing excellent TypeScript inference, making it perfect for API validation, form validation, and type-safe data handling.