GitPedia

Examples nodejs cqrs es swagger

A Node.js CQRS and Event Sourcing Microservice Example Using Nest.js, Event Store, and Swagger

From qas·Updated April 24, 2026·View on GitHub·
·Archived

**examples nodejs cqrs es swagger** is A Node.js CQRS and Event Sourcing Microservice Example Using Nest.js, Event Store, and Swagger The project is written primarily in TypeScript, first published in 2019. Key topics include: cqrs-es, ddd, event-store, microservice, nodejs.

<p align="center"> <img src="https://cdn-images-1.medium.com/max/1200/1*feM_-VHhK670LlEQekesKg.png" width="320" alt="Logo" /> </p> <p align="center">A Node.js CQRS/ES Swagger API Microservice Boilerplate</p>

Description

This is an application boilerplate that demonstrates how to use Nest.js and Event Store to create a RESTful Users API microservice.

Please note that commands have been implemented and they do write into the Event Store, however, queries for denormalized views have some boilerplate but it is up to you to implement them using your favorite database technology of choice.

In case you don't feel like downloading dependencies locally, I've added support for Docker so follow those instructions in "Running the app" and you'll have everything up and running in less than 2 minutes.

Dependency Table

NameVersion
EventStorelatest
Node.jsDubnium
TypeScript3
Docker Compose3

Installation

bash
$ yarn

Running the app

bash
# development $ yarn start # watch mode $ yarn start:dev # production mode $ yarn start:prod # analyze production mode $ yarn start:analyze # using with Docker $ ./scripts/up.sh # to start $ ./scripts/down.sh # to stop

Medium Article (Part 1):
https://medium.com/@qasimsoomro/building-microservices-using-node-js-with-ddd-cqrs-and-event-sourcing-part-1-of-2-52e0dc3d81df

Medium Article (Part 2):
https://medium.com/@qasimsoomro/building-microservices-using-node-js-with-ddd-cqrs-and-event-sourcing-part-2-of-2-9a5f6708e0f

Swagger Explorer URL: http://localhost:7070/api

Event Store URL: http://localhost:2113

Test

bash
# unit tests $ yarn test # e2e tests $ yarn test:e2e # test coverage $ yarn test:cov

Release History

  • 0.1.0
    • The first proper release
    • CHANGE: Minimalist users app using Event Store
  • 0.0.1
    • Work in progress

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from qas/examples-nodejs-cqrs-es-swagger via the GitHub API.Last fetched: 6/14/2026