Express API with Sequelize is a production-ready Node.js boilerplate for building REST APIs with Express 4.21, TypeScript 5.8, and Sequelize 6, maintained by masb0ymas on GitHub. This template wires together a full backend toolchain: Sequelize ORM for PostgreSQL, Zod schema validation, Nodemailer for email, Pino for logging, Swagger OpenAPI 3.x documentation, ESLint/Prettier code quality, and Docker containerization. It is built on the author's earlier express-api template and is released under the MIT License.
What is Express API with Sequelize?
Express API with Sequelize is a starter repository that takes a configured environment and produces a runnable REST API server with database models, validation, logging, and API documentation. It runs on Node.js (version 20 or higher) with PostgreSQL as the default database, and requires Docker only for optional containerized deployment. The project is authored by masb0ymas (github.com/masb0ymas) and is currently at version 6.0.0.
Key Features
- TypeScript 5.8.x — The entire codebase is written in TypeScript for type safety, and the project also integrates TypeScript ESLint for static analysis.
- Sequelize 6.x ORM — Object-relational mapping for PostgreSQL with commands to create and reset the database schema via
yarn db:createandyarn db:reset. - Zod 3.x validation — TypeScript-first schema declaration and validation, used for request data validation.
- Nodemailer 6.x — Email sending support is included out of the box.
- Swagger OpenAPI 3.x — Automatic interactive API documentation built into the project.
- Pino logging — Fast, low-overhead structured logging for production use.
- Docker support — A Dockerfile is provided; the repo shows building and running an image with
docker build -t yourname/express:v1.0.0 .anddocker run -p 7000:8000 -d yourname/express:v1.0.0. - Code quality tooling — JavaScript style enforced with Standard-with-TypeScript, formatting with Prettier, and linting with ESLint and TypeScript ESLint.
Who is it for?
- Node.js backend developers — Get a pre-configured Express + TypeScript + Sequelize project with validation, logging, and documentation so they can start writing business logic immediately.
- API-first product teams — Use the boilerplate to scaffold a new REST API service with PostgreSQL persistence and OpenAPI docs without setting up tooling from scratch.
- Developers learning Sequelize — Study a working integration of Sequelize 6 with TypeScript and swc, including database setup scripts and a CommonJS module configuration.
- Open-source contributors — Fork or extend the template for custom projects; it is MIT-licensed and accepts contributions via GitHub.
What can you do with Express API with Sequelize?
- Scaffold a new REST API: Clone the repo, run
cp .env.example .env, configure PostgreSQL credentials, and start withyarn devfor a hot-reloading development server. - Generate environment configuration automatically: Run
yarn secretto generate a ready-to-use.envfile with generated secrets. - Deploy in production: Use
yarn buildandyarn startto run the compiled server, or containerize it with the provided Dockerfile. - Document your endpoints: Swagger UI is included, so API routes automatically appear in an OpenAPI 3.x interface for manual testing.
How does Express API with Sequelize work?
The template follows a standard setup flow: you clone the repository, copy the environment template, install dependencies with Yarn, create and reset the database, then launch the development server. The repository also includes a release script (yarn release) for versioning and a Docker workflow for deployment. The main branch uses CommonJS modules; ES Module support is listed as pending implementation because of a Sequelize issue.
Pricing
The project is free and open source under the MIT License, as indicated by the license badge in the repository header. There are no paid tiers or subscription plans.
FAQ
What Node.js version is required?
Node.js version 20 or higher is required to run Express API with Sequelize. The prerequisites section explicitly lists Node.js at least 20.x, along with PostgreSQL and optional Docker.
Does Express API with Sequelize support ES Modules?
Not yet. The main branch uses CommonJS by default because ES Module support is pending implementation due to a Sequelize issue. Developers who need ESM will need to wait for the maintainer to address this limitation.
How do I set up the database?
After installing dependencies, run yarn db:create to create the database and yarn db:reset to reset the schema. You can also create the PostgreSQL database manually and configure the connection in the .env file.
Is Express API with Sequelize free?
Yes, it is released under the MIT License, so you can use, modify, and distribute it freely, including in commercial projects.
How do I run the project in Docker?
Build the image with docker build -t yourname/express:v1.0.0 . and run the container with docker run -p 7000:8000 -d yourname/express:v1.0.0. The container exposes port 8000, mapped to host port 7000 in the example.








