Bucharest Hackathon
The Team
Our team consists of three passionate members, all deeply focused on software development. We specialise in Java and Python, making these languages our daily tools of choice. Beyond our core expertise, we're highly interested in AI and other emerging technologies, always eager to explore the latest advancements. We thrive in hackathons, viewing them as the ultimate platform for networking and testing our skills in real-world scenarios. Our shared enthusiasm for continuous learning and development drives us to constantly improve and innovate in the ever-evolving tech landscape.
The Project
At The Bucharest Hackathon, we tackled two exciting challenges within a 24-hour window: Smart Test Generation and Smart/AI Generated Documentation. The first challenge required us to create a program that automatically generates unit tests for backend code from a given GitHub repository, utilizing large language models (LLMs) to understand the code and comments. The second challenge involved generating documentation or a helper chatbot for an API from source code, with easy deployment using a static site generator like Docusaurus. Our goal was to automate these processes, making them efficient and effortless.
We designed a pipeline that can seamlessly integrate with major Git providers, such as GitHub and GitLab. Specifically, we tested our solution using GitHub Actions, where it performed flawlessly. Our implementation centered around a Docker container that interacts with our backend, using parameters provided by the user during pipeline configuration. This setup allows for a smooth and straightforward deployment process, requiring just a few clicks and a few input variables.
The workflow begins with our backend cloning the current commit’s branch from the repository, even if it is a private repo. The code is then sent to an enterprise-grade LLM, ensuring that the LLM is not trained on the submitted code to maintain data privacy. We implemented logic to verify that the LLM comprehends the code accurately. From this understanding, we automatically generate documentation and publish it using Docusaurus. Additionally, we use abstract syntax trees (ASTs) to split the code into functions and classes, generating unit tests for each segment.
Subsequently, we run these tests, preform profiling and static code analysis. SonarQube is used to preform the static code analysis. This step helps identify code quality issues and vulnerabilities, ensuring that the generated tests are robust and effective. At the end of the process, users receive an email containing detailed results and information about the tests. If the user opts in, the generated tests can also be pushed back to the repository on a separate branch, allowing them to merge the changes at their discretion.
In conclusion, we successfully developed a working MVP that automates various mundane tasks typically performed by software developers. Our solution can execute these tasks at every commit, significantly streamlining the development process. While our current implementation only supports Python, the system is designed to be extensible, allowing for future enhancements. We are proud of our achievement, considering the project's complexity and the tight time frame. This MVP is a testament to our ability to innovate and deliver practical solutions in a fast-paced environment.
The Outcome
Our project aligns perfectly with the spirit and vision of The Bucharest Hackathon (TBH). This year's event emphasised bridging the gap between the digital realm and the real world using cutting-edge technologies like AI and blockchain, along with essential dev tools. By focusing on automating unit test generation and documentation creation using AI, we embraced the hackathon's challenge to explore new-age technologies. Our solution leverages the power of LLMs and integrates seamlessly with popular Git providers, embodying the innovative and forward-thinking mindset that TBH encourages.
Furthermore, our project addresses real-world developer needs by automating repetitive tasks and enhancing productivity. By providing an easy-to-use pipeline that generates high-quality unit tests and comprehensive documentation, we aimed to streamline the software development process, making it more efficient and less error-prone. This approach not only aligns with TBH's goal of creating groundbreaking software projects but also showcases the potential of AI to revolutionise the development landscape. Our work at the hackathon was a testament to our commitment to pushing the boundaries of what's possible, embodying the hackathon's mission to imagine a future iteration of our tech world and write history, one line of code at a time.