Inspiration

In the contemporary digital epoch, social media platforms have regrettably transitioned into the most prevalent conduit for the viral spread of misinformation and malicious disinformation, consequently posing an existential threat to digital trust and the foundational integrity of public discourse. This unchecked, algorithmic amplification exacerbates the erosion of public confidence and necessitates an immediate, robust defence; therefore, to decisively counter this digital deluge and fortify user environments with cognitive security, we developed "Klink," an AI-powered verification utility designed to provide instantaneous, evidence-based fact-checking by integrating the state-of-the-art Gemini API with real-time web grounding.

What it does

Klink is engineered as a seamless, real-time verification utility powered by the Gemini API to assess message authenticity instantly. The core process begins by accepting text in any language via the web app and automatically translating it for processing. The message is then submitted to the Gemini model, which uses the Google Search grounding tool to verify claims against current web results, effectively mitigating AI hallucination. This analysis yields two critical outputs: a quantitative Fact Score (0-100) for immediate user assessment, and a concise Analysis Report that summarizes the verification evidence, ultimately transforming misleading messages into validated, evidence-based reports.

How we built it

The working of 'Klink' is characterized into three main checkpoints. Frontend, Backend and Deployment. FrontEnd : The front-end of Klink, built with HTML, CSS, and JavaScript, was engineered to be a responsive, non-blocking interface that provides a seamless user experience while communicating asynchronously with the Python Flask back-end. For asynchronous processing and for communication with the backend we using async function sendMessage() and also the Fetch API for connection between frontend and backend. BackEnd : The backend was completely written in Python. Using Flask Server, communication was established with the frontend. The backend also send the data for calculation to the Gemini via API calls coded in python. We used the Gemini's latest 2.5 flash model to perform the calculation and return the result. Deployment : Deployment was done using the "pythonanywhere" which helps in deploying the python code. Dependency Management: We ensured all project dependencies (Flask, Flask-CORS, google-genai) were listed in the requirements.txt file. On the PythonAnywhere console, we used pip install -r requirements.txt within the virtual environment to guarantee a consistent environment. Virtual Environment: A dedicated virtual environment was created and activated on the PythonAnywhere server to keep our project dependencies isolated and prevent conflicts with other system packages.

Challenges we ran into

The major challenge in building Klink stemmed from the decoupled architecture, where the client-side JavaScript was separate from the Python (Flask/Gemini) back-end. This required extensive work to establish a reliable network bridge for the API, specifically to navigate and overcome the Same-Origin Policy (SOP) using Flask-CORS during deployment on PythonAnywhere. The technical core presented two additional hurdles: ensuring API reliability against Gemini content filtering (which often caused server-side blocks, requiring robust exception handling), and enforcing structured JSON output through strict prompts to prevent JSON decode error when processing the verification results.

Accomplishments that we're proud of

Our top accomplishments with Klink centered on building a highly resilient and powerful AI verification service. We successfully engineered the Full-Stack communication barrier, establishing a reliable network bridge between JavaScript and the Python API on PythonAnywhere via Flask-CORS. We achieved AI integrity by commanding the Gemini API to perform multilingual translation and web grounding in a single request, resulting in high-quality, evidence-based verification. Finally, we ensured application stability by implementing robust error handling to gracefully manage API blocks (like StopCandidateException) and enforce a strict Structured JSON Output, delivering both a reliable Fact Score and a detailed Analysis Report to the user interface.

What we learned

As this was our first hackathon project as a team, there were many key takeaways from the project. We learnt about deployment, APIs and how to call them, how to connect and communicate from the frontend to the backend, systematic error handling, web designing and also the most important thin "importance of working in team and encouraging and helping each other".

What's next for Klink

Klink is extensively dependent on an external service like Gemini, for giving an output, so we are deciding to build a complete system specifically designed for fact-checking purpose after learning AI-ML. Moreover, Klink is unable to check the very recent updates and often would provide faulty outputs, this is another major issue that we'll overcome after building our own system. We are also going to make the UI more interactive and enhancing the design as much as possible. Our long-term goals also include implementing automated queue processing to handle bulk message verification, integrating sentiment analysis to better understand the message's intent, and deploying on a scalable cloud provider like Google Cloud Run to ensure Klink can handle high-volume demand and move toward becoming a generalized, production-ready tool for fighting misinformation.

Built With

Share this project:

Updates