This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine Every developer knows the absolute chill of opening up a legacy file written back in 2014 full of var hoisting, global scope leaks, untyped object math, and deeply nested callback pyramids. It doesn't just feel messy; it feels haunted.
For Week 4's "Ghost in the Machine" theme, I built Dead Code Ouija, a lightweight, local-first code séance and exorcism tool. You drop in your most cursed legacy code snippets, and the "digital medium" reads through the syntax, diagnoses its spectral sins (like unhandled exceptions or archaic variable declarations), and casts an automated exorcism spell to refactor it into clean, modern code. With Hacktoberfest deadlines looming and resource constraints tightening, I wanted to lean heavily into open innovation ergonomics building something fast, resilient, and entirely client-side.
Frontend & Styling: Built using HTML5, vanilla JavaScript, and Tailwind CSS (via CDN) for a sleek, dark-mode terminal aesthetic.
Heuristic Spectral Engine: Instead of relying on expensive, paid cloud LLM APIs or heavy local wrappers that break under token limits, the tool utilizes custom AST-pattern heuristic matching to instantly parse legacy code constructs (var, old DOM selectors, callback hell) and map them to modern equivalent patterns
When dealing with legacy code, privacy and zero-friction execution are everything. Enterprise developers can't just paste proprietary, sensitive legacy codebases into closed, third-party commercial AI endpoints without risking compliance or data leaks.
Building an open-source, local-first tool means developers can audit every line of the analysis logic, run it completely offline or inside private environments, and customize the "curses" and refactor rules to match their own team's linting styles and all without paying a cent for API tokens or locking themselves into a vendor ecosystem.
N/A
When I tested it with an old snippet full of 2012-era var statements and document.all queries, watching the UI flash the spectral warning about scope hoisting genuinely made me laugh out loud. It turns the tedious chore of legacy refactoring into a fun, thematic experience that brings a bit of personality and humor back into code maintenance.