i inherited a broken codebase. here’s what i found and what i built
lagos
It started with a TikTok video.
I was in a rut. I was building solo projects, getting no traction, and wondering if any of it was actually moving the needle. Then I came across a video about a developer community. I joined the WhatsApp group and posted some of the things I'd built.
A few days later, someone reached out. They had a project, and they needed developers. There was no pay, but equity was on the table. More importantly, it was real experience on something that wasn't just mine.
I said yes.
The project was Chari Nexus, an all-in-one cybersecurity platform for enterprise companies. Their previous version had run into serious problems, so they were starting again from scratch. Or so I thought.
I was supposed to join alongside a frontend developer. She didn't show up. A pay dispute, most likely. I probably should have taken that as a sign. Instead, I thought: how difficult can it be?
I was about to find out.
What I Walked Into
I got access to the private repository, cloned the main and update branches, and was handed a folder of documentation. The documentation was useless. I ended up writing six documents of my own just to map out what the platform was supposed to do.
Then I started reading the code.
- Half-commented files. The working code started in the middle of a file. The top half was a graveyard of commented-out logic nobody had cleaned up.
- Broken import links.
- Routes that led nowhere.
- Mock data where real database calls should have been, passed off as if it worked.
- A UI that looked unfinished. No proper validation. No consistent error handling.
This wasn't a rough draft. Someone had presented it as a working product. I now had roughly six weeks to turn it into one.
The scope was five modules: vulnerability management, risk management, compliance, a report engine, and incident response. Another developer would handle incident response. I owned the other four. And before I could build anything, I had to clean up everything that was already there.
The Cleanup
I started with triage. No new code. Just understanding the full damage before touching anything.
The first pass was about getting the app to run at all. I fixed the broken links, finished the incomplete routes, and ripped out the mock data. The commented-out code at the top of files got deleted. The bloat, features that were half-started and added nothing, got removed. The schema was a mess, so I redesigned it module by module as I went.

Only after that did I start building.
The Redesign

The original dashboard. It worked, but it was generic.

The redesigned dashboard, built to read like an enterprise security product.
Module 1: Vulnerability Management
This was the most technically demanding of the four. It had to do three things: find the assets, scan them for vulnerabilities, and write a plan to fix what it found.
Finding the assets. An asset here means anything in the customer's technical setup: servers, API endpoints, database instances, cloud resources. I built a GitHub Actions workflow that scans the repository and pulls these out automatically. The platform then shows them with a simple label, asset or non-asset, that you can switch between.
Scanning them. Once the assets were defined, the scans could run. There were three kinds:
- SAST (static application security testing) reads the source code and the CI/CD configuration for vulnerabilities without running the app. I used Semgrep, wired straight into the GitHub Actions pipeline.
- DAST (dynamic application security testing) tests the live, deployed app by simulating real attacks against its endpoints. It needs Docker to run.
- Container scanning checks Docker images and Kubernetes clusters for known vulnerabilities in dependencies and base images.
DAST gave me a problem I didn't see coming. My laptop can't run Docker, so I couldn't test it the usual way. My fix was to move DAST into CI/CD. When code is pushed, GitHub Actions starts the Docker container and runs the DAST scan there. It's not the typical setup, but it works, and the scan runs the same way no matter whose laptop the code came from.
Fixing what it found. For each flagged vulnerability, the platform writes a structured plan: severity, affected asset, recommended fix, and priority order. It's technical enough for a developer to act on, and clear enough for a security lead to review without reading raw scan output.
Module 2: Risk Management
Vulnerability management looks at code and infrastructure. Risk management takes a wider view: physical and digital assets together.
It tracks risk signals across both. Physical servers, on-premise infrastructure and office network exposure sit next to cloud services and APIs. It works as a second layer of coverage. It catches the risk signs the vulnerability scanner might miss on its own, and it feeds a compliance signal into the next module.
Module 3: Compliance
This one was more straightforward. But I had to understand the frameworks well enough to implement them properly, not just display them.
I implemented two:
- FATF 40, the Financial Action Task Force's forty recommendations, mostly about stopping money laundering and financial crime.
- ISO 27001, the international standard for managing information security.
The module compares the customer's current setup against each framework's requirements and flags the gaps. It isn't checkbox compliance. The logic checks actual behaviour against the standard's controls.
It's modular on purpose. As the platform moves into other regions, like the EU and the US, frameworks such as GDPR or SOC 2 can be added without rebuilding what's already there.
Module 4: Report Engine
This was the module I enjoyed building most, and the one that needed the most product thinking.
Security data is useless if you can't get it to the people who need to act on it. A developer and a CEO need very different documents. So I built one report engine that works from a single source of truth. It pulls live data from all four modules and shapes the report for whoever is reading it.

- Technical reports, for auditors, security engineers and developers, include raw scan output, vulnerability details, CVSS scores, affected assets and remediation steps.
- Non-technical reports, for executives, product managers and the board, show risk posture, compliance status and priority actions. Nobody has to know what a CVSS score means to read one.
One engine, two outputs. The formatting and pagination were harder than I expected, because live data doesn't always sit cleanly inside a PDF layout. But the result is a report that works for everyone in the organization, not just the engineers.
The Incident Response Layer
Incident response was technically another developer's module. I was still closely involved, because it depended entirely on the logs coming from the four modules I'd built.
It works as an event listener. Each module writes structured logs as it runs. I used Ingest to generate and manage them, with a deliberate filter: not everything gets logged. Only high and critical events make it through.
When one of those events is detected, an incident is created automatically and escalated to the right people: the CTO, the security lead, whoever holds the authority in the customer's organization.

The restraint was the point. Logging everything creates noise that hides the important signals. Logging only what matters means that when an alert fires, people take it seriously.
What Two Months Actually Looked Like
By the time I was done, I had:
- refactored a broken codebase into something that could actually ship
- redesigned the database schema across four modules
- built automated security scanning into CI/CD
- implemented two international compliance frameworks
- built a report engine with two outputs
- wired in structured logging for incident escalation
- contributed to a full UI redesign proposal and rebuilt the landing page
It was a team of four, loosely coordinated, working without pay, against a deadline that kept moving. Not ideal conditions. But there's something clarifying about inheriting a mess. It forces you to understand a system completely before you can trust anything in it.
What I'd Tell Another Developer in the Same Situation
- Don't trust the README. Read the code first. The documentation I got described a platform that didn't exist yet. The code told the truth.
- Triage before you write a single line. When you see a broken codebase, the instinct is to start fixing. Resist it. Map the damage first, or you'll fix one thing and break three others.
- Mock data is worse than no data. An empty function is honest. Mock data makes a system look like it works, so the real problem stays hidden until someone uses it in production. I'd rather inherit a skeleton than a fake.
- Document as you go. I wrote six documents just to understand what I'd inherited. By the end there was real documentation, not because anyone asked for it, but because the next developer shouldn't have to do what I did.
The platform launches this month. Four modules, ready for production. Automated security scanning in CI/CD. Two compliance frameworks. A report engine that works for a developer and a board member alike.
No mock data. No broken links. No routes to nowhere.
If you've ever cloned a repo, run the install, and felt that sinking feeling as the errors started appearing, you're not alone. And for what it's worth, it's fixable.
It just takes longer than they told you.
newer: building courseflow: bridging the gap in university academic tracking
first published on medium.