nestjs
Copilot instructions2.8k starsChanged 7 months agoMITView on GitHub
This is a pnpm monorepo containing a collection of NestJS modules and utilities. Each package lives under packages/ and is published independently to npm under the @golevelup scope. Running pnpm i also registers Git hooks via Husky. Integration tests require external services. Use docker-compose.yml to start them locally: Environment variables for integration tests:
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 113
All code is TypeScript with strict: true.
- Very specific: line 114
Follow existing NestJS module patterns: modules export a DynamicModule via a static forRoot() or forRootAsync() method.
- Very specific: line 115
Use decorators and metadata reflection (reflect-metadata) for NestJS integration points.
- Very specific: line 116
Prefer async/await over raw Promises or callbacks.
- Distinctive: line 117
All new features must include corresponding unit tests.
- Distinctive: line 119
Do not add new dependencies without checking for existing alternatives already present in the workspace.
- Very specific: line 146
Do not manually edit package.json version fields or CHANGELOG.md files.
- Distinctive: line 160
All steps must pass before a PR can be merged.
- Very specific: line 164
Do not modify pnpm-lock.yaml directly.
- Very specific: line 165
Do not commit build artifacts (lib/, *.tsbuildinfo) — they are gitignored.
- Distinctive: line 166
Do not skip or delete existing tests to make a build pass.
- Distinctive: line 167
Do not introduce breaking changes to public APIs without a corresponding changeset and major version bump.
- Very specific: line 168
Do not use Jest for unit or integration tests.
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions for golevelup/nestjs
Repository Overview
This is a pnpm monorepo containing a collection of NestJS modules and utilities. Each package lives under packages/ and is published independently to npm under the @golevelup scope.
Packages
| Package | Path | Purpose |
@golevelup/nestjs-common | packages/common | Shared types and mixins |
@golevelup/nestjs-discovery | packages/discovery | Find providers, controllers, and handlers by metadata |
@golevelup/nestjs-modules | packages/modules | Dynamic module creation helper |
@golevelup/nestjs-rabbitmq | packages/rabbitmq | RabbitMQ pub/sub and RPC integration |
@golevelup/nestjs-hasura | packages/hasura | Hasura event handler integration |
@golevelup/nestjs-graphql-request | packages/graphql-request | GraphQL client dependency injection |
@golevelup/nestjs-webhooks | packages/webhooks | Webhook processing middleware |
@golevelup/nestjs-stripe | packages/stripe | Stripe client and webhook integration |
@golevelup/nestjs-google-cloud-pubsub | packages/google-cloud-pubsub | Google Cloud Pub/Sub integration |
@golevelup/nestjs-graphile-worker | packages/graphile-worker | Graphile Worker job queue integration |
@golevelup/ts-jest | packages/testing/ts-jest | Jest utilities for NestJS testing |
@golevelup/ts-sinon | packages/testing/ts-sinon | Sinon utilities for NestJS testing |
@golevelup/ts-vitest | packages/testing/ts-vitest | Vitest utilities for NestJS testing |
Tech Stack
- Language: TypeScript 5.x (strict mode enabled)
- Framework: NestJS v11
- Package manager: pnpm v10 (workspaces)
- Monorepo tooling: Lerna v9 (independent versioning)
- Unit tests: Vitest v4 (Jest is only used inside the
@golevelup/ts-jestand@golevelup/ts-sinonpackages) - Integration tests: Vitest v4
- Linter: Oxlint
- Formatter: Oxfmt
- Versioning/changelog: Changesets
- Commit conventions: Conventional Commits via Commitizen + CommitLint
Setup
pnpm iRunning pnpm i also registers Git hooks via Husky.
Build
# Build all packages (excludes rabbitmq-integration and google-cloud-pubsub-integration)
pnpm build
# Build in watch mode
pnpm build:watch
# Clean build artifacts
pnpm cleanTesting
# Run all unit tests
pnpm test
# Run unit tests in CI mode (with coverage)
pnpm test:ci
# Run integration tests (requires running RabbitMQ - see docker-compose.yml)
pnpm test:integration
# Run integration tests in CI mode
pnpm test:ci:integration
# Run Vitest unit tests
pnpm test:vitest
# Run Vitest in CI mode with coverage
pnpm test:vitest:ciIntegration tests require external services. Use docker-compose.yml to start them locally:
docker compose up -dEnvironment variables for integration tests:
RABBITMQ_HOST– RabbitMQ hostname (default:localhost)RABBITMQ_PORT– RabbitMQ port (default:5672)
Linting & Formatting
# Lint
pnpm lint
# Format all files
pnpm format
# Check formatting without modifying files
pnpm format:checkType Checking
pnpm lerna:typecheckCoding Conventions
- All code is TypeScript with
strict: true. Do not disable strict checks. - Follow existing NestJS module patterns: modules export a
DynamicModulevia a staticforRoot()orforRootAsync()method. - Use decorators and metadata reflection (
reflect-metadata) for NestJS integration points. - Prefer
async/awaitover raw Promises or callbacks. - All new features must include corresponding unit tests.
- Tests live alongside source files (e.g.,
src/foo.spec.ts) or in a dedicated__tests__directory within the package. - Do not add new dependencies without checking for existing alternatives already present in the workspace.
- Each package has its own
package.json. Add package-level dependencies to the correct package, not the root.
Commit Conventions
Commits must follow the Conventional Commits specification. Use the interactive prompt to generate compliant messages:
pnpm commitReference issue numbers in the commit footer using closes #<number> or refs #<number>.
Branch naming:
feature/{number}-short-descriptionfix/{number}-short-descriptiondocs/short-description
Versioning & Publishing
Versions are managed independently per package using Changesets. To create a changeset for your changes:
pnpm prep-releaseDo not manually edit package.json version fields or CHANGELOG.md files; let the Changesets tooling handle those.
CI
The CI pipeline (.github/workflows/ci.yml) runs on every pull request and executes:
- Install dependencies (
pnpm i --prefer-offline) - Build all packages (
pnpm build) - Lint (
pnpm lint) - Type check (
pnpm lerna:typecheck) - Unit tests (
pnpm test:ci) - Vitest tests (
pnpm test:vitest:ci) - Integration tests (
pnpm test:ci:integration)
All steps must pass before a PR can be merged.
What Not to Do
- Do not modify
pnpm-lock.yamldirectly; letpnpm imanage it. - Do not commit build artifacts (
lib/,*.tsbuildinfo) — they are gitignored. - Do not skip or delete existing tests to make a build pass.
- Do not introduce breaking changes to public APIs without a corresponding changeset and major version bump.
- Do not use Jest for unit or integration tests; use Vitest instead. The only exception is the
@golevelup/ts-jestpackage itself.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about golevelup/nestjs
- ssilve1989/ulti-project“chore(deps-dev): bump @golevelup/ts-vitest from 0.5.2 to 2.2.0”GitHub · Feb 2, 2026 · 1 reactions
- Stack Overflow“nestjs-rabbitmq Node.js package not handling messages”Stack Overflow · Jul 10, 2022 · 1 votes
- Stack Overflow“Nestjs using discovery package to modify controller?”Stack Overflow · Oct 13, 2020 · 1 votes
- alphagov/content-block-picker“Bump @golevelup/ts-vitest from 4.0.0 to 4.0.1”GitHub · Oct 30, 2026
- Volontariapp/npm-packages“chore(deps): bump the majors group across 1 directory with 10 updates”GitHub · Oct 28, 2026
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on GitHub and Stack Overflow (53 times).
On GitHub · 50
- Feb 2, 2026chore(deps-dev): bump @golevelup/ts-vitest from 0.5.2 to 2.2.0 — ssilve1989/ulti-project1 reaction · 1 comment
- Oct 30, 2026Bump @golevelup/ts-vitest from 4.0.0 to 4.0.1 — alphagov/content-block-picker0 reactions
- Oct 28, 2026chore(deps): bump the majors group across 1 directory with 10 updates — Volontariapp/npm-packages0 reactions · 5 comments
- Oct 28, 2026Bump the minor-and-patch group across 2 directories with 54 updates — Eunice-Amirtharajan/quote-iq0 reactions · 1 comment
- Oct 28, 2026Bump the minor-and-patch group across 2 directories with 40 updates — Eunice-Amirtharajan/quote-iq0 reactions · 2 comments
45 more on GitHub
- Oct 6, 2026npm-backend: bump the backend-minor-updates group across 1 directory with 9 updates — bcgov/SIMS0 reactions · 2 comments
- Oct 5, 2026build(deps): bump the routine group across 1 directory with 14 updates — AliEgemenKaplan/solar-grid0 reactions · 1 comment
- Sep 11, 2026Bump @golevelup/ts-jest from 0.4.0 to 3.0.0 — tryptophan36/rehold0 reactions
- Aug 1, 2026chore(deps-dev): bump @golevelup/ts-jest from 0.7.0 to 3.0.0 — kalinom7/workouter0 reactions · 1 comment
- Jul 28, 2026chore(deps-dev): bump @golevelup/ts-jest from 0.4.0 to 3.0.0 — hiddenlayerai/hiddenlayer-artifactory-workers0 reactions · 1 comment
- Jul 22, 2026chore(deps-dev): bump the dev-dependencies group with 7 updates — Voyagier-Travel/voyagier-cli0 reactions · 2 comments
- Jun 28, 2026Bump @golevelup/nestjs-rabbitmq from 7.1.2 to 9.0.2 in /nest-forms-backend — bratislava/konto.bratislava.sk0 reactions
- Jun 21, 202614 — Consumer retry classification + DLQ — Wordllban/flash-sale0 reactions
- Jun 21, 202610 — Consumer: persist Order + Ledger — Wordllban/flash-sale0 reactions
- Jun 21, 202609 — Relay: Redis Stream → RabbitMQ — Wordllban/flash-sale0 reactions
- Jun 21, 202608 — RabbitMQ topology (golevelup) — Wordllban/flash-sale0 reactions
- Jun 5, 2026chore(deps-dev): bump the testing group with 6 updates — parasite2060/jarvis-serversays it tested it0 reactions · 2 comments
- May 25, 2026chore(deps-dev): bump @golevelup/ts-jest from 0.7.0 to 3.0.0 — mrkhachaturov/docker-dns-operator0 reactions
- May 24, 2026chore(deps): bump @golevelup/nestjs-rabbitmq from 7.1.2 to 9.0.2 in /nest-city-account — bratislava/konto.bratislava.sk0 reactions · 1 comment
- May 24, 2026chore(deps-dev): bump @golevelup/ts-jest from 1.2.1 to 3.0.0 in /nest-city-account — bratislava/konto.bratislava.sk0 reactions · 1 comment
- May 13, 2026chore(deps-dev): bump @golevelup/ts-jest from 1.2.1 to 3.0.0 — BenLorantfy/nestjs-zod0 reactions
- May 10, 2026chore(deps-dev): bump @golevelup/ts-jest from 1.2.1 to 3.0.0 in /nest-forms-backend — bratislava/konto.bratislava.sk0 reactions · 1 comment
- May 7, 2026Bump @golevelup/ts-vitest from 2.2.0 to 4.0.0 — alphagov/content-block-picker0 reactions
- Apr 30, 2026Bump @golevelup/ts-jest from 0.6.2 to 3.0.0 — humanprotocol/marketing-tasks0 reactions · 2 comments
- Apr 1, 2026Bump @golevelup/ts-jest from 1.2.1 to 3.0.0 — souyang/nestjs-rest-examples0 reactions · 1 comment
- Mar 30, 2026chore: bump @golevelup/ts-jest from 0.7.0 to 3.0.0 — ecarrizo2/sst-oop-starter-kit0 reactions
- Mar 29, 2026chore(deps-dev): bump @golevelup/ts-jest from 1.2.1 to 3.0.0 in /nest-tax-backend — bratislava/konto.bratislava.sk0 reactions · 1 comment
- Mar 28, 2026chore(deps-dev): bump @golevelup/ts-jest from 0.6.2 to 3.0.0 — humanprotocol/human-protocol0 reactions · 1 comment
- Mar 25, 2026chore(deps-dev): bump @golevelup/ts-jest from 1.2.1 to 3.0.0 — chaynHQ/bloom-backend0 reactions
- Mar 25, 2026chore(deps-dev): bump @golevelup/ts-jest from 2.0.0 to 3.0.0 in /reputation-oracle — Hu-Fi/hufi0 reactions
- Mar 25, 2026chore(deps-dev): bump @golevelup/ts-jest from 2.0.0 to 3.0.0 in /recording-oracle — Hu-Fi/hufi0 reactions · 2 comments
- Mar 25, 2026chore(deps-dev): bump @golevelup/ts-jest from 2.0.0 to 3.0.0 in /campaign-launcher/server — Hu-Fi/hufi0 reactions · 1 comment
- Mar 24, 2026npm-backend: bump the backend-major-updates group in /sources/packages/backend with 3 updates — bcgov/SIMS0 reactions · 3 comments
- Mar 23, 2026Bump @golevelup/ts-jest from 1.2.1 to 3.0.0 — ministryofjustice/hmpps-digital-prison-reporting-mi-ui0 reactions · 2 comments
- Mar 20, 2026Allow separate RabbitMQ consumer/publisher connections — HDkit/meowlish0 reactions
- Mar 19, 2026chore(deps-dev): bump @golevelup/ts-jest from 2.0.0 to 3.0.0 in /packages/nestjs-zod — GlobalArtInc/ecosystem0 reactions
- Mar 19, 2026chore(deps): bump @golevelup/ts-jest from 2.0.0 to 3.0.0 — US-EPA-CAMD/easey-common0 reactions
- Mar 19, 2026Bump @golevelup/ts-jest from 2.0.0 to 3.0.0 — anilahir/nestjs-authentication-and-authorization0 reactions
- Mar 19, 2026chore(deps-dev): bump @golevelup/ts-jest from 2.0.0 to 3.0.0 — US-EPA-CAMD/easey-camd-services0 reactions · 1 comment
- Mar 6, 2026build(deps): bump @golevelup/nestjs-stripe from 0.9.3 to 1.2.0 — marcuthus/backend-template-subscription-saas-without-free-plan0 reactions
- Jan 1, 2026Bump qs, @nestjs/cache-manager, @nestjs/core, @nestjs/platform-express, @nestjs/swagger, @nestjs/typeorm, @golevelup/nestjs-discovery, express and @nestjs/testing — webenot/subscriptions-state-machinesays it tested it0 reactions
- Dec 31, 2025Bump qs, @golevelup/nestjs-rabbitmq, @nestjs/core, @nestjs/event-emitter, @nestjs/platform-express, @nestjs/sequelize and @nestjs/testing — argentinaluiz/fc3-admin-catalogo-de-videos-typescriptsays it tested it0 reactions
- Dec 22, 2025Bump the major-updates group across 1 directory with 7 updates — CredenceNG/SIMS0 reactions · 1 comment
- Nov 25, 2025Bump body-parser, @golevelup/nestjs-rabbitmq, @nestjs/core, @nestjs/event-emitter, @nestjs/platform-express, @nestjs/sequelize and @nestjs/testing — argentinaluiz/fc3-admin-catalogo-de-videos-typescriptsays it tested it0 reactions
- Oct 20, 2025chore(deps-dev): bump @golevelup/ts-jest from 0.6.0 to 0.7.0 — trisquareeu/TchKafka0 reactions · 1 comment
- Apr 11, 2025Bump the npm_and_yarn group across 1 directory with 9 updates — funidata/kaiku0 reactions
- Nov 17, 2024Bump @golevelup/ts-jest from 0.4.0 to 0.6.1 — cortip/isomera0 reactions · 1 comment
- Nov 13, 2024chore(deps-dev): bump @golevelup/ts-jest from 0.5.0 to 0.6.1 — CodyTseng/nostr-relay-nestjs0 reactions
- Nov 11, 2024Bump @golevelup/ts-jest from 0.5.3 to 0.6.0 — hpi-schul-cloud/shd-client0 reactions
- Jul 18, 2024Commander broken with nestjs v8 — jmcdo29/nest-commander0 reactions · 1 comment
On Stack Overflow · 3
- Jul 10, 2022nestjs-rabbitmq Node.js package not handling messages1 vote · 1 answer
- Oct 13, 2020Nestjs using discovery package to modify controller?1 vote
- Dec 16, 2022Cannot Inject Stripe Client in NestJS (https://www.npmjs.com/package/@golevelup/nestjs-stripe)0 votes · 2 answers
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

