Inspiration
The idea behind CodeLens came from a simple problem. Understanding a large codebase and finding potential issues can take a lot of time, especially when a project contains many files. We wanted to build something that could make this process easier and help developers understand their projects better.
What it does
CodeLens is a desktop application that analyzes source code using static analysis and AI. It scans project files, identifies potential security risks, detects duplicate files, and generates AI-powered summaries. It also creates downloadable PDF reports containing the analysis and findings.
How we built it
We built CodeLens using Python and PySide6 for the desktop interface. We integrated OpenRouter to access AI models for code analysis. Python AST and custom static checks help identify potentially unsafe patterns, while SHA-256 is used for duplicate detection. Pillow and ReportLab are used for the PDF reporting system. We also used PyInstaller to package the application into a Windows executable.
Challenges we ran into
One of our biggest challenges was handling large projects without losing important code during AI analysis. We also faced issues with API responses, model compatibility, environment variables, and packaging the application into a standalone executable. Getting all the different components to work together smoothly took quite a bit of testing.
Accomplishments that we're proud of
We are proud of building a complete desktop application that combines static analysis, AI-powered code intelligence, risk detection, and PDF report generation in one place. We also made it possible to package the application as a Windows executable, making it easier for others to use.
What we learned
We learned a lot about integrating external AI APIs into Python applications, handling large amounts of source code, building desktop interfaces, and generating structured reports. We also understood that AI analysis needs to be supported by traditional programming techniques to produce more useful results.
What's next for CodeLens
We want to improve the accuracy of risk detection, support more programming languages, add deeper project architecture analysis, and introduce better code comparison features. We also plan to improve the reporting system and make CodeLens useful for larger and more complex software projects.