Skip to content

docs(showcase): add docs/showcase/fact-dynamics.mdx for Fact Dynamics pr… #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions docs/showcase/fact-dynamics.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
title: Fact Dynamics | Real-time Fact-Checking Flutter App
description: Cross-platform app for real-time fact-checking of debates, speeches, and images using Perplexity's Sonar API
sidebar_position: 2
keywords: [Fact Dynamics, fact-checking, Flutter, Dart, real-time, speech-to-text, debate, image verification]
---

# Fact Dynamics | Real-time Fact-Checking Flutter App
<p align="center">
<img
src="https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/icon/icon.png"
alt="Fact Dynamics logo"
width="80"
height="80"
style="border-radius: 14px;"
/>
</p>

**Hackathon Submission** - Built for Perplexity Hackathon in Information Tools & Deep Research categories.

Fact Dynamics is a cross-platform Flutter app that provides real-time fact-checking for spoken content and images. Perfect for live debates, presentations, and on-the-fly information verification.


## Features

* Real-time speech transcription and fact-checking during live conversations
* Image text extraction and claim verification with source citations
* Claim rating system (TRUE, FALSE, MISLEADING, UNVERIFIABLE) with explanations
* Source Citations** - Provides authoritative URLs backing each verdict

* Debate mode with continuous speech recognition and streaming feedback
* User authentication via Firebase (Google, Email) with persistent chat history
* Cross-platform support for iOS, Android, and Web

## Prerequisites

* Flutter SDK 3.0.0 or newer
* Dart SDK 2.17.0 or newer
* Firebase CLI for authentication and database setup
* Perplexity API key for Sonar integration
* Device with microphone access for speech recognition

## Installation (Follow Detailed guideline on the Repository)

```bash
git clone https://github.com/vishnu32510/fact_pulse.git
cd fact_pulse
flutter pub get
```

## Usage

**Real-time Speech Fact-Checking:**
- Streams 5-second audio chunks through Flutter's `speech_to_text`
- Sends transcribed snippets to Sonar API with structured prompts
- Returns JSON with claims, ratings (TRUE/FALSE/MISLEADING/UNVERIFIABLE), explanations, and sources

**Image Analysis:**
- Uploads images/URLs to Sonar API for text extraction
- Verifies extracted claims against authoritative sources
- Provides comprehensive analysis with source attribution

## Screenshots

<table>
<tr>
<td>
<img
src="https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/2.%20Dashboard.png"
alt="Dashboard"
width="200"
/>
</td>
<td>
<img
src="https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/4.%20Fact%20Checks(Speech,%20Debate,%20Image).png"
alt="Fact checking interface"
width="200"
/>
</td>
</tr>
</table>

## Code Explanation

* Frontend: Flutter with BLoC pattern for state management targeting iOS, Android, and Web
* Backend: Firebase (Firestore, Authentication) for user data and chat history persistence
* Speech Processing: speech_to_text package for real-time audio transcription
* API Integration: Custom Dart client calling Perplexity Sonar API with structured prompts
* Image Processing: Built-in image picker with base64 encoding for multimodal analysis
* Data Architecture: Firestore collections per user with subcollections for debates, speeches, and images

## Open Source SDKs

Built two reusable packages for the Flutter community:
- **[perplexity_dart](https://pub.dev/packages/perplexity_dart)** - Core Dart SDK for Perplexity API
- **[perplexity_flutter](https://pub.dev/packages/perplexity_flutter)** - Flutter widgets and BLoC integration


## Links

- **[GitHub Repository](https://github.com/vishnu32510/fact_pulse)** - Full source code
- **[Live Demo](https://fact-pulse.web.app/)** - Try the web version
- **[Demo Video](https://youtu.be/92IoX19Djtc)** - Watch it in action
- **[Devpost Submission](https://devpost.com/software/fact-dynamics)** - Hackathon entry