Inspiration

The inspiration came from an outdated JavaScript Library called jQuery. Although jQuery's the library itself is still active and they have mentioned that they will be releasing jQuery version 4.0 soon, their last release was in 2023. Scrolling down in jQuery's homepage, the other jQuery's project include jQuery UI and jQuery Mobile, but they are already in maintence-only and deprecated status. jQuery is a lightweight library but it has existed for too long and considering the main library's last release was two year ago (in terms of version 4 release, it might be more than two years ago), their dependency packages probably revolved a lot too. So I was thinking: "What if there is an app that can analysis a code base, provide result about the problems the code base has (overall issues and specific file issues), give a proper proposal how to keep the code base up to date with a plan how to upgrade everything, and user has the option to export the result? With the skills level I have now, there is no way I can write this whole thing by myself - I won't have enough time to learn everything and I won't have enough time, and I believed that it's time to use Kiro to make an impact.

What it does

Haunted Refactorium transforms the often tedious process of reviewing legacy code into a more engaging experience - particularly fitting for the Halloween season. Rather than simply cataloging issues, it immerses you in a setting where problematic files are labeled as “cursed,” outdated dependencies become “ghostly,” and tangled code is flagged as “haunted hotspots.” The tool also provides a severity scale, ranging from “spooky” to “cursed,” so you can prioritize what requires immediate attention.

Beyond merely identifying issues, Haunted Refactorium delivers actionable guidance for modernizing your codebase. It suggests architectural improvements and supplies downloadable scaffolds to support your refactoring efforts. You have the flexibility to run it online through Railway for a swift analysis, or maintain complete privacy by operating it locally with Docker and Ollama which is ideal for sensitive projects that must remain offline.

How I built it

First, I sat down to brainstorm all the features I wanted, considered the tech stack, and ensured the project would be inclusive. Following that, I discussed the details with Kiro to finalize the specifications so we’d have a clear starting point. We maintained an ongoing dialogue, delving further into steering documents and refining specific features, project flow, and routing. Once those elements were in place, I immediately began coding alongside Kiro. Since Kiro had already developed much of the codebase, I was able to proceed directly to testing. Over the next few days, I continued refining the AI integration, introduced additional features, and updated the routing to ensure smooth connectivity between the documentation and API reference. Honestly, I’ve never dedicated this much time to planning before building anything, it’s a different pace for me.

Challenges I ran into

Kiro is very smart, so it created some mock output, the problem is that these mock outputs overrode the Qwen/Qwen2.5-Coder-32B-Instruct HuggingFace AI instruction, so no matter the repository language is written in JavaScript, Java, C#, Python, Go, or Rust, it would still return recommended tech stacks like react, typescript, etc. So we did a little bit to adjustment until we finally got every detection correctly, recommended stacks correctly, and every proposal is tailored for each repository. But we ran into another problem: it has wrong detection between Java and JavaScript, and some repository that uses multiple languages (e.g. Go + JavaScript, C + JavaScript), it only scans the JavaScript files and completely missed out the other languages. This took quite a relatively long time to fix. I have also encountered a lot of build fails and deployment crashes while deploying the app to Railway.

Accomplishments that I'm proud of

I seriously think participating in Kiroween is already a big enough accomplishment because this is the first hackathon in my life. This web app overall is very powerful and I'm really proud I had the courage to participate in this hackathon and create this web app with Kiro.

What I learned

This project helped me strengthen my knowledge in implementing REST API and routing. Because the first time I have to run Haunted Refactorium, I need three terminals to run npm run dev:frontend, npm run dev:backend, and npm run docs:dev separately, so they end up running on three different ports. It took me quite awhile to figure out how to redirect and connecting them with each other because during deployment, it will be a big pain to deploy to three different platforms and with three different links. I have also encountered that the routings works locally, but after deployment it failed, so the continuous fix really helped me to understand REST API better.

Comparing to Cursor and VSCode with GitHub Copilot and VSCodium with Cline, Kiro also made me realise one more thing: I no longer need to give up on features I want to implement because AI doesn't understand me. Kiro build all the features perfectly, I ask Kiro to add, it either adds them or gives me explanation why it wouldn't work and give me alternative choices.

What's next for Haunted Refactorium

There are actually some features that I wasn't able to implement even though I had planned with Kiro, and the biggest part is internationalization. I talked about inclusiveness above and I wanted to provide Haunted Refactorium in multiple languages so developer all over the world can use it without language barriers. Hopefully, Haunted Refactorium can support self-hosted git repositories as well instead of archive upload.

I also have to workout to find alternative platforms where I can host Haunted Refactorium because the free tier will end in 30 days. I will need a platform that can handle the frontend and backend without any file size issues, and it has to be able to run the app, documentation, and api reference smoothly together.

Another ongoing issue is the AI-integration, right now the online version is using free tier HuggingFace model as well and the local version is using Ollama. But I want in the future to maybe allow users to use specific API keys maybe from OpenAI and Claude, so that they can have more accurate result.

Built With

Share this project:

Updates