rmyndharis / openwa
Code health
Hotspots average 5.0, the place fixes pay off most.
Explore this codebase
- Code health map203hotspots across 1,052 files
- Ownership801sole-owned files: one author, no second reader
- Architecture6modules, 330 entry points
- Decisions107recorded, of which 0 in force and 107 background
- Refactoring64open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 3
5 things worth doing in the week to Jul 28, the last indexed commit, 2 of them now.
Worth planning
Start breaking up saveConfig (CCN 90, 224 lines): first lift lines 676-857
src/modules/infra/infra.controller.ts:676
saveConfig nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 13 commits; its file is imported by 28 files, changed 35 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 90, 224 lines, nests 6 deep
- severity
- high
Medium effort, worth a checkStart breaking up validateEnv (CCN 45, 154 lines): first lift lines 50-258
src/config/env.validation.ts:50
validateEnv has many paths; easier to read and change once split, which also removes a duplicate; function changed in 22 commits; its file is imported by 8 files, changed 22 times in 90 days.
- gain
- up to +2.8 health on this file(inferred)
- finding
- Complex method
- size
- CCN 45, 154 lines, nests 3 deep
- severity
- high
Medium effort, worth a checkStart breaking up bootstrap (CCN 37, 224 lines): first lift lines 45-381
src/main.ts:45
bootstrap has many paths; easier to read and change once split, which also removes a duplicate; function changed in 32 commits; its file is imported by 17 files, changed 36 times in 90 days.
- gain
- up to +0.7 health on this file(inferred)
- finding
- Complex method
- size
- CCN 37, 224 lines
- severity
- high
Medium effort, worth a check
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
Everything we found
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health1,735 open findingsCriticalUntested hotspot · src/core/plugins/plugin.interfaces.ts9 findings · 9.0 deducted
- Refactoring64 open opportunitiesMediumfromResponse+1.5 health, S effort · sdk/java/src/main/java/com/rmyndharis/openwa/errors/OpenWAApiError.java
- Decisions0 drifting from the codeHighPreload environment variables before importing application modulesActive decision drifting from the code it governs
- Ownership801 sole-owned filesMediumsrc/modules/session/session.service.tsOne author, no second reader
- Dead code21LowMESSAGE_TYPESUnreachable constant (15 lines)