Inspiration
Most of us have joined a project and spent the first weeks figuring out how bad the code really is. Linters give you thousands of warnings, code review only looks at the diff in front of you, and if you ask an AI assistant you get a different answer every time. None of that tells you what a lead developer or a CTO wants to know. Is the system modular? Can we test it? Who actually knows how it works? What should we fix first? And when did it start going downhill?
We wanted something that answers those questions the way a good senior reviewer would. Same answer every time, every claim backed by something you can click on, and safe to run on code you don't trust.
That's why we made a clear decision early on: everything that can be measured gets measured, not guessed. Parsing, the dependency graph, the architecture rules, the scores and even the history analysis are plain deterministic code. Run it twice on the same commit and you get exactly the same report. An LLM only comes in at the very end, and only for the parts where language actually helps, like phrasing a summary or grouping findings into actions. It never decides what is a problem or how bad it is, and the whole tool works fine without it.
What it does
You give RepoMonitor a Git repository (or several that belong together, like a frontend and a backend) and it gives you back:
Scores. A score from 1 to 100 for six areas: modularity, analysability, modifiability, testability, security and knowledge distribution, plus an overall score. Each area shows which metrics it's made of, so you can see why a number is low.
A ranked list of findings. Every finding has the facts behind it, the relevant code and a permalink to the exact commit. That covers architecture problems like cycles, layering violations and god modules, but also duplication, complexity, linter results, leaked secrets, SAST and vulnerable dependencies. If an LLM is configured, it groups the most important findings into five concrete actions.
A "birth certificate" for each finding. It tells you in which commit and through which pull request the problem showed up. We work this out from the analysed snapshots and from git blame on the finding's own lines, skipping big reformatting commits. If we can't pin it down, we say so instead of guessing.
An erosion view. For things like dependency cycles or layer violations, it shows when the problem first appeared and how many bug fixes since then had to change code on both sides of it, compared with the time before. A small timeline makes the pattern easy to spot.
A timeline over up to seven points in the project's history, so you can see when things started to drift. On top of that there's ownership, code survival and knowledge concentration, all from the git history.
Exports. Managers can download a one-page PDF or a three-slide PowerPoint with the key numbers straight from the overview. There are also full reports (HTML, PDF, Markdown), a PowerPoint deck, SARIF for CI pipelines, and a comparison between two commits.
Links into your editor. Pick your local clone once in the settings and every finding opens at the right line in VS Code, Cursor or IntelliJ. There's also a VS Code extension that shows the findings directly in the editor.
The whole analysis is deterministic. The same commit always produces the same report. It never runs any code from the repository, and it works completely without an LLM. When an LLM is used, it only rewrites explanations, and a validator checks that it doesn't contradict the facts.
How we built it
The backend is written in Python with FastAPI. An analysis runs as a pipeline of about 100 small steps, from cloning and parsing the code to building a module graph, running the checks and writing the report. Workers pick up the jobs from a Postgres queue, and results are cached per file, so analysing the next commit only looks at what changed.
For the actual checks we rely on proven open-source tools like PMD, Checkstyle, gitleaks and trivy, and on tree-sitter for parsing. They run in a locked-down container that can't execute repository code or reach the network.
The birth certificates and the erosion view are not part of that pipeline. They're calculated when you open a finding, using data the analysis already stored, so they don't make the analysis slower.
The frontend is React with Tailwind and ECharts, and everything runs with Docker Compose. We split the project into about 40 small modules with clear interfaces, so the four of us could work in parallel without getting in each other's way.
Challenges we ran into
Getting identical output twice was harder than expected. Tool output order, timestamps, hash seeds, floating point: all of it had to be pinned down before two runs gave byte-identical reports.
We treat every repository as potentially hostile. Symlinks pointing outside the repo, huge files, weird file names. We built a "canary" repo that tries all of that, and the pipeline has to get through it.
The locked-down container broke tools in creative ways. One tool insisted on writing to its home directory, dot --version exits with an error code, and Windows line endings in a script took down the whole image build.
Figuring out "which commit introduced this" is messy in practice. Findings grow, files get renamed, a reformatting commit overwrites blame for half the file, and merges hide the real commit behind a PR. We decided early that "somewhere between these two snapshots" or "can't tell" is a better answer than a confident guess.
Accomplishments that we're proud of
It works end to end on real repositories, from pasting a Git URL to a scored and explained report.
Nothing is a black box. Every finding leads back to facts, code, a permalink, and now also the commit and pull request where it started.
The erosion view turns a lot of statistics into one sentence a manager can read, something like "this line from 2023, since then 14 bug fixes had to change code on both sides of it", and you can still click all the way down to every single commit.
What we learned
Explainability has to be in the data model from the start. Facts first, then verdicts, then text.
LLMs are good at phrasing things and bad at being the source of truth. Keeping them optional and checked made the whole thing more trustworthy.
Measure before you optimise. We were sure we knew where the time went, and we were wrong.
Not everything has to be in the pipeline. Computing history only for the findings people open kept the analysis fast and made the new features almost free.
Agreeing on interfaces first made it possible to build about 40 modules in parallel and still have them fit together.
What's next for RepoMonitor
Speed first: clone without the pull-request refs, spread the timeline across workers, cache more tools per file and only lint the latest commit. That should get a normal analysis under five minutes and big projects like Keycloak or Artemis well under half an hour.
Then plug the benchmark into the scores, so we can say things like "better than 80 % of comparable Java projects".
A GitHub Action that comments on each pull request with what changed in the architecture, including any new erosion.
Built With
- checkstyle
- docker
- duckdb
- echarts
- fastapi
- git
- gitleaks
- graphviz
- jscpd
- nginx
- opengrep
- pmd
- postgresql
- pydantic
- python
- react
- scc
- shiki
- sqlalchemy
- tailwindcss
- tanstack-query
- tree-sitter
- trivy
- typescript
- vite