A lightweight NestJS project designed to explore and implement Command Bus and Query Bus patterns (CQRS).
This project serves as a playground and learning environment for experimenting with the CQRS (Command Query Responsibility Segregation) architecture inside a NestJS application.
It focuses on:
- Implementing Command Bus and Query Bus workflows
- Structuring domain logic through UseCases and Handlers
- Organizing clean and decoupled application layers
- Practicing domain-driven design (DDD) principles
pnpm install# development
pnpm run start
# watch mode
pnpm run start:dev
# production mode
pnpm run start:prod# unit tests
pnpm run test
# e2e tests
pnpm run test:e2e
# coverage report
pnpm run test:covThe main goal of this repository is to:
- Experiment with CQRS inside NestJS
- Learn how to properly separate commands, queries, and domain logic
- Explore how Nest’s CQRS module and custom command/query buses can structure a clean application
You can use this repo as a template or reference for future DDD/CQRS-based NestJS projects.
- NestJS — Modular backend framework
- TypeScript — Type-safe and scalable code
- pnpm — Fast package management
- Jest — Unit testing framework
This project is MIT licensed.