Inspiration
The idea came from a simple thought: wouldn’t it be great if understanding code was easier, not just for developers but also for non-developers? I wanted to create something that helps developers understand complex logic faster and also enables people like project managers or business stakeholders to review the code from a business perspective. By visualizing functions as UML diagrams, even those without technical expertise can see how the implementation aligns with business requirements and provide their input. It’s all about bridging the gap between technical and non-technical teams.
What it does
CodeTori analyzes the method where your cursor is placed and generates a UML diagram to explain what the method does. The diagram pops up in a neat scrollable dialog, making it easier to visualize the code logic. It’s perfect for understanding unfamiliar code quickly or for sharing knowledge with others.
How I built it
The plugin integrates with OpenAI to do the heavy lifting. When you click on a method, it sends the method's content to the API, which first creates a JSON explanation of the code. That JSON is then used to generate a UML diagram in PlantUML format. In IntelliJ, the diagram is displayed in a popup dialog. For the UI, I focused on keeping it simple and intuitive—loading first, then showing the UML.
Challenges I ran into
Getting consistent UML output from OpenAI was tricky. Sometimes, the UML wouldn’t parse correctly, which made me rethink how to approach the problem. Switching to a two-step process (JSON explanation first, UML next) improved things but made it slower. Another challenge was designing the UI to handle large diagrams—it had to scroll and stay user-friendly. Balancing accuracy and speed while keeping the plugin lightweight was tough.
Accomplishments that we're proud of
I’m proud that CodeTori takes a big problem—understanding code—and simplifies it into a visual form. The fact that it works seamlessly inside IntelliJ and gives developers a “lightbulb moment” when they see their code as a diagram is really satisfying. Adapting OpenAI to improve the accuracy of the UML generation was another big win.
What I learned
This project taught me a lot about building tools for developers. I learned how to build a plugin in IntelliJ. Most importantly, I learned how valuable good visualizations can be when working with code.
What's next for CodeTori
The next step is improving speed and reliability—maybe exploring how to fine-tune or use a custom AI model for this. I’d also love to expand support to other programming languages, support to other IDEs, add more types of diagrams, and maybe even include offline functionality for teams working in secure environments. The goal is to make CodeTori a must-have tool for developers everywhere.
Built With
- intellij-idea
- java
- nestjs
- openai
- typescript
Log in or sign up for Devpost to join the conversation.