We wanted to test Technical Debt Radar on a real codebase — not a toy example, but a project that NestJS developers actually reference. So we scanned the most starred NestJS example app on GitHub.
The experiment
- Repo: nestjs-realworld-example-app (the most starred NestJS reference implementation)
- Command:
npx technical-debt-radar scan . - Scan time: 8 seconds
- Result: 14 real violations, 0 false positives
What we found
The scan identified 14 missing null guards after database queries. Every one of them is a real bug — a code path where a null return from the database would cause a runtime crash.
Example: Article lookup without null check
// ❌ What the code does
const article = await this.articleRepository.findOne({ slug });
return article.title; // TypeError if article is null
// ✅ What it should do
const article = await this.articleRepository.findOne({ slug });
if (!article) throw new NotFoundException(`Article '${slug}' not found`);
return article.title;
Example: User profile without null check
// ❌ Crashes if username doesn't exist
const user = await this.userRepository.findOne({ username });
return { profile: { username: user.username, bio: user.bio } };
// ✅ Handle the null case
const user = await this.userRepository.findOne({ username });
if (!user) throw new NotFoundException(`User '${username}' not found`);
return { profile: { username: user.username, bio: user.bio } };
These bugs don't show up in happy-path testing. They only crash when a user navigates to a deleted article or a nonexistent profile — exactly the kind of bug that reaches production.
Why the architecture preset mattered
Our first scan used the "layered" architecture preset and found 76 violations, including 16 architecture false positives. The realworld app uses NestJS feature modules, not strict DDD layers.
We switched to the "feature-module" preset:
npx technical-debt-radar init # auto-detected feature-module
npx technical-debt-radar scan . # 14 violations, 0 FP
The radar init command correctly auto-detected the feature-module architecture. When we used its recommended config, false positives dropped to zero.
The AI fix loop
Here's the fastest way to fix all 14 issues:
# 1. Get violations in AI-friendly format
npx technical-debt-radar scan . --format ai-prompt
# 2. Paste into Claude Code, Cursor, or any AI tool
# The AI sees: file, line, rule, context, suggested fix
# 3. AI generates all fixes
# 4. Verify
npx technical-debt-radar scan . # 0 violations
The --format ai-prompt flag outputs violations in a format optimized for AI code editors. Each violation includes the file path, line number, code context, and a specific fix suggestion.
Try it on your repo
npx technical-debt-radar init
npx technical-debt-radar scan .
First scan free. No account needed. Takes less than 10 seconds. See what's hiding in your NestJS codebase.