## Inspiration 🌈

Our team has all experienced the struggle of jumping into a pre-existing codebase and having to process how everything works before starting to add our own changes. This can be a daunting task, especially when commit messages lack detail or context. We also know that when it comes time to push our changes, we often gloss over the commit message to get the change out as soon as possible, not helping any future collaborators or even our future selves. We wanted to create a web app that allows users to better understand the journey of the product, allowing users to comprehend previous design decisions and see how a codebase has evolved over time. GitInsights aims to bridge the gap between hastily written commit messages and clear, comprehensive documentation, making collaboration and onboarding smoother and more efficient.

## What it does 💻

* Summarizes commits and tracks individual files in each commit, and suggests more accurate commit messages.
* The app automatically suggests tags for commits, with the option for users to add their own custom tags for further sorting of data.
* Provides a visual timeline of user activity through commits, across all branches of a repository
Allows filtering commit data by user, highlighting the contributions of individuals

## How we built it ⚒️

The frontend is developed with Next.js, using TypeScript and various libraries for UI/UX enhancement. The backend uses Express.js , which handles our API calls to GitHub and OpenAI. We used Prisma as our ORM to connect to a PostgreSQL database for CRUD operations. For authentication, we utilized GitHub OAuth to generate JWT access tokens, securely accessing and managing users' GitHub information. The JWT is stored in cookie storage and sent to the backend API for authentication. We created a github application that users must all add onto their accounts when signing up. This allowed us to not only authenticate as our application on the backend, but also as the end user who provides access to this app.

## Challenges we ran into ☣️☢️⚠️

Originally, we wanted to use an open source LLM, like LLaMa, since we were parsing through a lot of data but we quickly realized it was too inefficient, taking over 10 seconds to analyze each commit message. We also learned to use new technologies like d3.js, the github api, prisma, yeah honestly everything for me

## Accomplishments that we're proud of 😁

The user interface is so slay, especially the timeline page. The features work!

## What we learned 🧠

Running LLMs locally saves you money, but LLMs require lots of computation (wow) and are thus very slow when running locally

## What's next for GitInsights

* Filter by tags, more advanced filtering and visualizations
* Adding webhooks to the github repository to enable automatic analysis and real time changes
* Implementing CRON background jobs, especially with the analysis the application needs to do when it first signs on an user, possibly done with RabbitMQ
* Creating native .gitignore files to refine the summarization process by ignoring files unrelated to development (i.e., package.json, package-lock.json, **pycache**).
## Inspiration

In the exciting world of hackathons, where innovation meets determination, **participants like ourselves often ask "Has my idea been done before?"** While originality is the cornerstone of innovation, there's a broader horizon to explore - the evolution of an existing concept. Through our AI-driven platform, hackers can gain insights into the uniqueness of their ideas. By identifying gaps or exploring similar projects' functionalities, participants can aim to refine, iterate, or even revolutionize existing concepts, ensuring that their projects truly stand out.

For **judges, the evaluation process is daunting.** With a multitude of projects to review in a short time frame, ensuring an impartial and comprehensive assessment can become extremely challenging. The introduction of an AI tool doesn't aim to replace the human element but rather to enhance it. By swiftly and objectively analyzing projects based on certain quantifiable metrics, judges can allocate more time to delve into the intricacies, stories, and the passion driving each team

## What it does

This project is a smart tool designed for hackathons. The tool measures the similarity and originality of new ideas against similar projects if any exist, we use web scraping and OpenAI to gather data and draw conclusions.

**For hackers:**

* **Idea Validation:** Before diving deep into development, participants can ascertain the uniqueness of their concept, ensuring they're genuinely breaking new ground.
* **Inspiration:** By observing similar projects, hackers can draw inspiration, identifying ways to enhance or diversify their own innovations.

**For judges:**

* **Objective Assessment:** By inputting a project's Devpost URL, judges can swiftly gauge its novelty, benefiting from AI-generated metrics that benchmark it against historical data.
* **Informed Decisions:** With insights on a project's originality at their fingertips, judges can make more balanced and data-backed evaluations, appreciating true innovation.

## How we built it

**Frontend:** Developed using React JS, our interface is user-friendly, allowing for easy input of ideas or Devpost URLs.

**Web Scraper:** Upon input, our web scraper dives into the content, extracting essential information that aids in generating objective metrics.

**Keyword Extraction with ChatGPT:** OpenAI's ChatGPT is used to detect keywords from the Devpost project descriptions, which are used to capture project's essence.

**Project Similarity Search:** Using the extracted keywords, we query Devpost for similar projects. It provides us with a curated list based on project relevance.

**Comparison & Analysis:** Each incoming project is meticulously compared with the list of similar ones. This analysis is multi-faceted, examining the number of similar projects and the depth of their similarities.

**Result Compilation:** Post-analysis, we present users with an 'originality score' alongside explanations for the determined metrics, keeping transparency.

**Output Display:** All insights and metrics are neatly organized and presented on our frontend website for easy consumption.

## Challenges we ran into

**Metric Prioritization:** Given the timeline restricted nature of a hackathon, one of the first challenges was deciding which metrics to prioritize. Striking the balance between finding meaningful data points that were both thorough and feasible to attain were crucial.

**Algorithmic Efficiency:** We struggled with concerns over time complexity, especially with potential recursive scenarios. Optimizing our algorithms, prompt engineering, and simplifying architecture was the solution.

*Finding a good spot to sleep.*

## Accomplishments that we're proud of

We took immense pride in developing a solution directly tailored for an environment we're deeply immersed in. By crafting a tool for hackathons, while participating in one, we felt showcases our commitment to enhancing such events. Furthermore, not only did we conceptualize and execute the project, but we also established a robust framework and thoughtfully designed architecture from scratch.

Another general Accomplishment was our team's synergy. We made efforts to ensure alignment, and dedicated time to collectively invest in and champion the idea, ensuring everyone was on the same page and were equally excited and comfortable with the idea. This unified vision and collaboration were instrumental in bringing HackAnalyzer to life.

## What we learned

We delved into the intricacies of full-stack development, gathering hands-on experience with databases, backend and frontend development, as well as the integration of AI. Navigating through API calls and using web scraping were also some key takeaways. Prompt Engineering taught us to meticulously balance the trade-offs when leveraging AI, especially when juggling cost, time, and efficiency considerations.

## What's next for HackAnalyzer

We aim to amplify the metrics derived from the Devpost data while enhancing the search function's efficiency. Our secondary and long-term objective is to transition the application to a mobile platform. By enabling students to generate a QR code, judges can swiftly access HackAnalyzer data, ensuring a more streamlined and effective evaluation process.
## 💡Inspiration

When you're working on a repository with other people, you sometimes miss a lot of commits from your fellow collaborators. It could be because you've been on a break, were on vacation, or have gotten busy with schoolwork. However, reading through hundreds of lines of code to be able to understand what you've missed does get tedious, even for experienced developers. That's when we had the idea to create GitGest, a website that summarizes GitHub repositories for easy reading.

## 💪What it does

GitGest takes in a repository URL and a user's username and grabs all commit comments since the user's most recent commit (or grabs all commit comments if the User hasn't made any contributions) and summarizes them into a clear description of all changes.

## 🪛How we built it

We built this by using React, HTML, and CSS for the front end and Flask, GitHub API, and Cohere's summarization API for the backend. After logging in through GitHub via OAuth, the user provides a repository URL and a username. We then use GitHub's API to GET request the commit history and compare the authors with the username given, compiling the commits whose authors don't match the username into a list. This list is sent to Cohere's summarization AI through a GET request. The summary from the JSON response of the API is then put into the frontend of the website.

## 🚧Challenges we ran into

One of our major problems was deciding on an idea. We went from an app that uses the Paybilt API to a GitHub game and finally to this! It was 4:00 AM on Saturday morning that we finally decided. Naturally, this also means we were more behind than other teams in the development process. Our group also struggled to understand how to make requests from the backend to the frontend, retrieve the commit history from a GitHub repository URL, make the frontend do what we wanted due to a lack of experience in CSS, and manage our time as 3 of our 4 group members are first university students with midterms (that we are absolutely going to fail) the day after the hackathon. We were also new to authentication on web applications, so implementing the OAuth login system was a challenge. Finally, we tried to deploy our app through Google Cloud Services, however, it proved to be beyond our abilities within the time allowed.

## 🏅Accomplishments that we're proud of

Being able to successfully use OAuth to allow GitHub logins and let users access private respositories. Getting used to REST.APIs for sending requests between the frontend and backend, getting used to third-party services such as Cohere, creating an aesthetically pleasing and cohesive website that works as intended, and understanding how to access a GitHub repository's information.

## 🏫What we learned

We learned to program in Python with Flask and Javascript with React, we learned how to store environments in variables, how to communicate with the Cohere API, make the front end communicate with the backend, deal with all the dynamic components on the frontend, and make sure that all possible cases are accounted for. We also learned how to implement OAuth in our application.

## ⏭️What's next for GitGest

Our future plans for GitGest are to use Cohere API to read the code itself and summarize that information alongside the commit comments in case the comments provided by the contributors are less than adequate. Furthermore, we would also like to use Cohere API to read the commit comments and rate them on their usefulness and readability for other contributors helping to reinforce the habit of good commenting.