Awesome Open Source
Awesome Open Source


A Node.js CQRS/ES Swagger API Microservice Boilerplate


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

Name Version
EventStore latest
Node.js Dubnium
TypeScript 3
Docker Compose 3


$ yarn

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

# analyze production mode
$ yarn start:analyze

# using with Docker
$ ./scripts/ # to start
$ ./scripts/ # to stop

Relateds Links

Medium Article (Part 1):

Medium Article (Part 2):

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

Event Store URL: http://localhost:2113


# 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

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
typescript (10,364
nodejs (3,632
microservice (357
swagger (350
ddd (168
cqrs-es (24
event-store (16

Find Open Source By Browsing 7,000 Topics Across 59 Categories