jmcdo29/testing-nestjs
58.4
Adequate · 21 September 2026
2.2k
lines of production code
TypeScript
with JavaScript
4
measurements over time
What this system is
This system is a NestJS-based monorepo that serves as a comprehensive reference library for implementing various architectural patterns and integrations. It provides runnable sample applications demonstrating capabilities such as REST, GraphQL, WebSocket, and server-side rendering, alongside specific integrations with databases like PostgreSQL, MongoDB, and Prisma. The project also establishes a standardized development environment using Nx, Docker, and automated testing pipelines to ensure code quality and consistency across all examples.
How it got here
2019 — NestJS modernization and sample expansion
13 changes.
The project modernized its infrastructure by upgrading to NestJS v10 and establishing a robust testing suite using Jest and Supertest. Concurrently, the codebase expanded with new sample applications demonstrating MongoDB, TypeORM, WebSocket, and server-side rendering capabilities.
2020–2023 — expansion of sample applications
17 changes.
This period focused on significantly expanding the repository's collection of reference implementations, introducing diverse examples for GraphQL, microservices, CQRS, Sequelize, Prisma, HTTP, file uploads, and MongoDB transactions. Each new sample application was accompanied by comprehensive unit and end-to-end tests to ensure reliability. Additionally, tooling was enhanced with automated migration scripts for the Nx monorepo structure and Husky hooks for code quality enforcement.
Features
Add CQRS sample application with unit and end-to-end tests
The apps/cqrs-sample directory now contains a complete, runnable CQRS example built with NestJS. It includes the application entry point, controllers, services, commands, events, and handlers, along with a Jest configuration for unit tests and an end-to-end test suite that verifies the HTTP endpoints return the expected responses.
apps/cqrs-sample · high confidence
Add Cat CRUD sample application
The \apps/mongo-sample/src/cat\ directory now contains a complete, working sample application for managing cats. This includes a NestJS controller, service, DTOs, and Mongoose schemas, along with comprehensive unit tests for both the controller and service layers. The implementation demonstrates standard CRUD operations (create, read, read all, update, delete) using Mongoose, providing a reference for integrating MongoDB with NestJS.
apps/mongo-sample/src/cat · high confidence
Add GraphQL sample app with cat management and tests
Introduced a new GraphQL sample application in apps/graphql-sample/src/cat, providing a complete CRUD API for managing cats. The change adds the CatModule, CatResolver, and CatService, along with supporting DTOs (CatInput, CatInsert, Cat, CatUpdateDTO) and their corresponding unit tests. This enables users to query, create, update, and delete cat records via GraphQL.
apps/graphql-sample/src/cat · high confidence
Add GraphQL sample application with NestJS and Apollo
A new GraphQL sample application has been introduced in the apps/graphql-sample directory, providing a reference implementation using NestJS and Apollo. The application is bootstrapped via a main.ts entry point that listens on port 3000, and an app.module.ts that configures the GraphQL module with auto-generated schemas and the Apollo playground enabled.
apps/graphql-sample/src · medium confidence
Add Husky pre-commit and commit-msg hooks for linting and commit validation
The project now includes Husky configuration files (.husky/pre-commit, .husky/commit-msg) that automatically run lint-staged on staged files and commitlint on commit messages. This enforces code quality and commit message standards during development.
.husky · high confidence
Add NestJS Sequelize sample application
Added a new sample application demonstrating the integration of Sequelize with NestJS. The sample includes a Cat model, a CatsService for database operations, a CatsController with REST endpoints, and corresponding unit tests for both the controller and service layers.
apps/sequelize-sample/src · high confidence
Add NestJS TypeORM sample app with Cat CRUD and tests
A new NestJS application in apps/typeorm-sample provides a complete Cat management example, including an AppModule that configures a PostgreSQL connection via TypeORM, a CatModule with a CatController exposing REST endpoints for creating, reading, updating, and deleting cats, and a CatService handling the repository interactions. The change also includes comprehensive unit tests for the controller, service, and entity, utilizing Jest and @golevelup/ts-jest for mocking TypeORM repositories.
apps/typeorm-sample/src · high confidence
Add Prisma example with global PrismaService and DTO validation
A new Prisma sample application is introduced, featuring a global PrismaService exported from a PrismaModule and integrated into the root AppModule. The bootstrap process configures global validation pipes for DTOs and sets up Prisma shutdown hooks, providing a reference implementation for using Prisma with NestJS.
apps/prisma-sample/src · medium confidence
Add Prisma sample with Cat CRUD and validation
A new Prisma sample application is introduced, featuring a Cat resource with full CRUD operations (create, read, update, delete) exposed via a NestJS controller. The implementation includes a CatDTO with class-validator decorators and a custom async validator (OwnerExistsRule) that checks for the existence of an owner in the database. Unit tests are added for both the CatController and CatService, mocking the PrismaService to verify the behavior of all endpoints and service methods.
apps/prisma-sample/src/cat · high confidence
Add WebSocket sample application
A new 'websocket-sample' application has been added to the workspace, featuring a NestJS backend that exposes a WebSocket gateway to handle 'message' events and a corresponding client-side interface that connects to the server, sends periodic messages, and displays the responses in the browser.
apps/websocket-sample/client, apps/websocket-sample/src · high confidence
Add file upload and download sample application
A new sample application named 'file-up-and-down-sample' has been added to the workspace. This NestJS-based application demonstrates file upload and download capabilities, including endpoints for retrieving data, uploading files, and serving files via streams. The addition includes the full application structure (controllers, services, modules), configuration files (project.json, tsconfig, eslint, jest), and comprehensive unit and end-to-end tests to verify the file handling logic.
apps/file-up-and-down-sample · high confidence
Add microservice sample with publisher/subscriber architecture
A new microservice sample application has been added to the workspace, featuring a publisher/subscriber pattern using NestJS. The sample includes a publisher module that sends events via a TCP-based client proxy, and a subscriber module that listens for 'change' events. The implementation includes controllers, services, and modules for both the publisher and subscriber components, along with corresponding unit tests for the publisher controller.
apps/microservice-sample/src · high confidence
Add public index template for app rendering
A new public/index.hbs template has been added to the project, providing the HTML structure for the application's main page. This template includes the standard HTML5 doctype, head section with charset and title, and a body containing a message placeholder, enabling the rendering of the app's public interface.
public · medium confidence
Add render-sample app with server-side rendering and E2E tests
A new 'render-sample' application has been added to the monorepo, demonstrating how to implement server-side rendering with a view engine (HBS) and configure Jest for both unit and end-to-end testing. The app includes a basic controller and service, along with corresponding unit and E2E tests that verify the rendered HTML output.
apps/render-sample · high confidence
Added HTTP sample application with Cats API
Introduced a new HTTP sample application in the \apps/http-sample\ directory, featuring a NestJS-based API for managing cats. The implementation includes controllers, services, and DTOs for creating, reading, updating, and deleting cat records, along with corresponding unit tests for the controllers and services.
apps/http-sample/src · high confidence
Added NestJS application for MongoDB transaction sample
A new NestJS application named 'mongodb-transaction-sample' has been added to the workspace. It includes a Cat module with controllers, services, and schemas for managing cat data, demonstrating MongoDB transaction handling. The entry also includes corresponding unit tests for the controllers and services, as well as Jest configuration and project build settings.
apps/mongodb-transaction-sample · high confidence
Added RxJS sample app with generic retry strategy
A new \rxjs-sample\ application was added to the codebase, featuring a NestJS-based service that implements a configurable, generic retry strategy for RxJS observables. The implementation includes a \RxjsService\ that applies a retry mechanism with configurable attempt counts, delays, and error filtering, alongside corresponding unit tests to verify the retry logic and error handling.
apps/rxjs-sample/src · high confidence
Initial Prisma schema and database migrations for cats and owners
The Prisma sample application now includes a complete database schema defining 'Cat' and 'Owner' models with a one-to-many relationship. This change introduces the initial database migration to create the 'cats' and 'owners' tables, establishing the data structure for the application's domain model.
apps/prisma-sample/prisma · high confidence
Project infrastructure and configuration updates
The repository has been updated with new configuration files to support a modernized development environment. This includes adding an ESLint configuration for TypeScript and Prettier formatting, setting up Jest for both unit and end-to-end testing, and configuring the Nx monorepo build system. Additionally, a Dockerfile and docker-compose.yml have been added to containerize the application and its dependencies (PostgreSQL, Redis, MongoDB, MySQL) for consistent testing environments. The project also introduces a Code of Conduct, a Contributing guide, and updates the README with badges and project structure information.
(repo-wide) · high confidence
Behavioural changes
Automated migration to Nx monorepo structure
A new migration script (\tools/nx-migrate.js\) has been added to automate the conversion of project configurations into the Nx monorepo format. This tool updates \workspace.json\ by generating standard build, test, and e2e configurations for each application, extending the correct Jest and TypeScript base configs as part of the upgrade to Nx version 16.
tools · medium confidence
Converted mongo-sample to a NestJS application
The mongo-sample application has been rewritten using the NestJS framework. This introduces a modular architecture with an AppController, AppService, and a CatModule, and connects to a local MongoDB instance on port 27017. The application now serves a 'Hello World!' response at the root endpoint and listens on port 3000.
apps/mongo-sample/src, apps/simple-sample/src · medium confidence
Simplified Prisma integration with global module and service
The Prisma integration has been refactored to follow the recommended NestJS setup. A new global PrismaModule was introduced to export the PrismaService, allowing it to be used across the application without custom injection tokens. The PrismaService itself was updated to extend PrismaClient with a logger and includes utility methods for database truncation and sequence resetting.
apps/prisma-sample/src/prisma · medium confidence
Test coverage
Added comprehensive unit tests for the complex-sample NestJS application; Added end-to-end test suite for the Sequelize sample application; Added end-to-end tests for complex-sample and mongo-sample apps; Added end-to-end tests for the Cat module; Added end-to-end tests for the Cats API; Added end-to-end tests for the GraphQL sample app; Added end-to-end tests for the WebSocket sample application.
Dependencies
Upgrade to NestJS v10 and modernize dependencies
The project has been upgraded to NestJS v10, with core packages like \@nestjs/common\, \@nestjs/core\, and \@nestjs/platform-express\ all set to version 10.2.5. This update is accompanied by a broad refresh of the dependency tree, including \rxjs\ to 7.5.7, \mongoose\ to 6.6.5, and \prisma\ to 3.1.1, alongside updates to testing tools like \jest\ 29.4.3 and \ts-jest\ 29.1.0.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 58 → 58 (+0.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 96 → 93 (-3.0)
- Architecture 100 → 96 (-4.5)
- Maturity 63 → 63 (+0.0)
- Readiness 42 → 42 (+0.2)
- Security 63 → 74 (+10.5)
Resolved (65)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- …and 45 more
New (182)
- Coverage not measured — JavaScript/TypeScript suite
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Documentation: no installation or build instructions (apps/rxjs-sample/README.md)
- Documentation: no installation or build instructions (apps/typeorm-sample/README.md)
- Documentation: no installation or build instructions (apps/websocket-sample/README.md)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- …and 162 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jmcdo29/testing-nestjs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 47ab935278c662b5165e07f6783d395db047db2d — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b84573e22831.