11---
2- title : Fact Dynamics
3- description : A Flutter app for real-time fact-checking of debate, speech and images uses Perplexity's Sonar API.
2+ title : Fact Dynamics | Real-time Fact-Checking Flutter App
3+ description : Cross-platform app for real-time fact-checking of debates, speeches, and images using Perplexity's Sonar API
44sidebar_position : 2
5- keywords : [Sonar API, Flutter, Dart, fact‑ checking, hackathon, real-time, speech-to-text, image- verification]
5+ keywords : [Fact Dynamics, fact- checking, Flutter, Dart, real-time, speech-to-text, debate, image verification]
66---
77
8- # Fact Dynamics
9-
8+ # Fact Dynamics | Real-time Fact-Checking Flutter App
109<p align = " center" >
1110 <img
1211 src = " https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/icon/icon.png"
@@ -17,163 +16,86 @@ keywords: [Sonar API, Flutter, Dart, fact‑checking, hackathon, real-time, spee
1716 />
1817</p >
1918
20- Fact Dynamics is a cross‑platform Flutter application that leverages Perplexity's Sonar API to provide real‑time fact‑checking for spoken and visual content—perfect for debates, presentations, or on‑the‑fly image verification. Built as a Perplexity Hackathon submission in the Information Tools & Deep Research & Education categories.
19+ ** Hackathon Submission** - Built for Perplexity Hackathon in Information Tools & Deep Research categories.
20+
21+ 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.
22+
2123
2224## Features
2325
24- - ** Real‑time Speech Analysis** - Transcribes live audio (via ` speech_to_text ` ) and fact‑checks each snippet instantly
25- - ** Image Fact Verification** - Extracts text from images and verifies claims on‑device
26- - ** Claim Rating System** - Classifies claims as ** TRUE** , ** FALSE** , ** MISLEADING** , or ** UNVERIFIABLE**
27- - ** Source Citations** - Surfaces authoritative URLs backing each verdict
28- - ** User Authentication** - Firebase Auth (Google & Email) with secure Firestore persistence
29- - ** Debate Mode** - Continuous speech recognition with streaming feedback
30- - ** Cross‑platform** - iOS, Android, Web (macOS testing; Windows coming soon)
26+ * Real-time speech transcription and fact-checking during live conversations
27+ * Image text extraction and claim verification with source citations
28+ * Claim rating system (TRUE, FALSE, MISLEADING, UNVERIFIABLE) with explanations
29+ * Source Citations** - Provides authoritative URLs backing each verdict
30+
31+ * Debate mode with continuous speech recognition and streaming feedback
32+ * User authentication via Firebase (Google, Email) with persistent chat history
33+ * Cross-platform support for iOS, Android, and Web
3134
3235## Prerequisites
3336
34- - Flutter SDK installed on your development machine
35- - Firebase account for authentication and data persistence
36- - Perplexity Sonar API key
37- - Device with microphone access for speech recognition
38- - Camera access for image capture (optional)
39-
40- ## Installation
41-
42- 1 . ** Clone the repository**
43- ``` bash
44- git clone https://github.com/vishnu32510/fact_pulse.git
45- cd fact_pulse
46- ```
47-
48- 2 . ** Install Flutter dependencies**
49- ``` bash
50- flutter pub get
51- ```
52-
53- 3 . ** Configure Firebase for your platform**
54- - Create a Firebase project at [ Firebase Console] ( https://console.firebase.google.com/ )
55- - Enable Authentication (Google, Email) and Firestore Database
56- - Install and configure FlutterFire CLI:
57- ``` bash
58- dart pub global activate flutterfire_cli
59- flutterfire configure
60- ```
61- - Follow the prompts to select your Firebase project and platforms (iOS/Android/Web)
62-
63- 4 . ** Set up API key**
64- - Create a ` .env ` file in the project root (use ` .env.template ` as reference)
65- - Add your Perplexity Sonar API key:
66- ```
67- PERPLEXITY_API_KEY=your_api_key_here
68- ```
69-
70- 5 . ** Configure platform permissions**
71- - For Android: Microphone and camera permissions are configured in ` android/app/src/main/AndroidManifest.xml `
72- - For iOS: Permissions are configured in ` ios/Runner/Info.plist `
73-
74- 6 . ** Run the application**
75- ``` bash
76- flutter run
77- ```
37+ * Flutter SDK 3.0.0 or newer
38+ * Dart SDK 2.17.0 or newer
39+ * Firebase CLI for authentication and database setup
40+ * Perplexity API key for Sonar integration
41+ * Device with microphone access for speech recognition
42+
43+ ## Installation (Follow Detailed guideline on the Repository)
44+
45+ ``` bash
46+ git clone https://github.com/vishnu32510/fact_pulse.git
47+ cd fact_pulse
48+ flutter pub get
49+ ```
7850
7951## Usage
8052
81- ### Demo & Screenshots
53+ Run the Flutter development server:
8254
83- - [ Watch the demo video] ( https://youtu.be/92IoX19Djtc )
84- - [ Web Demo] ( https://fact-pulse.web.app/ )
55+ ``` bash
56+ flutter run
57+ ```
58+
59+ ## Screenshots
8560
8661<table >
8762 <tr >
88- <td >
89- <img
90- src = " https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/1.%20Login.png"
91- alt = " Login screen"
92- width = " 200"
93- />
94- </td >
9563 <td >
9664 <img
9765 src = " https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/2.%20Dashboard.png"
9866 alt = " Dashboard"
9967 width = " 200"
10068 />
10169 </td >
102- <td >
103- <img
104- src = " https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/5.%20Profile.png"
105- alt = " Profile screen"
106- width = " 200"
107- />
108- </td >
109- </tr >
110- </table >
111-
112- <table >
113- <tr >
114- <td >
115- <img
116- src = " https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/3.%20Facts%20Checked%20List(Speech,%20Debate,%20Image).png"
117- alt = " Facts checked list"
118- width = " 300"
119- />
120- </td >
12170 <td >
12271 <img
12372 src = " https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/4.%20Fact%20Checks(Speech,%20Debate,%20Image).png"
124- alt = " Fact checks screen "
125- width = " 300 "
73+ alt = " Fact checking interface "
74+ width = " 200 "
12675 />
12776 </td >
12877 </tr >
12978</table >
13079
131- 1 . ** Authentication** : Sign in with Google or email through Firebase Auth
132- 2 . ** Speech Mode** : Tap the microphone to start real-time speech transcription and fact-checking
133- 3 . ** Image Mode** : Upload an image or provide a URL to extract and verify text claims
134- 4 . ** Debate Mode** : Enable continuous speech recognition for live debate fact-checking
135- 5 . ** View Results** : Check claim ratings, explanations, and source citations
136-
13780## Code Explanation
13881
139- ### Perplexity Sonar API Integration
140-
141- The app integrates with Perplexity's Sonar API in two main ways:
82+ * Frontend: Flutter with BLoC pattern for state management targeting iOS, Android, and Web
83+ * Backend: Firebase (Firestore, Authentication) for user data and chat history persistence
84+ * Speech Processing: speech_to_text package for real-time audio transcription
85+ * API Integration: Custom Dart client calling Perplexity Sonar API with structured prompts
86+ * Image Processing: Built-in image picker with base64 encoding for multimodal analysis
87+ * Data Architecture: Firestore collections per user with subcollections for debates, speeches, and images
14288
143- 1 . ** Debate Fact‑Checking**
144- - Stream 5‑second audio chunks → transcribe → send ` textSnippet ` to Sonar
145- - Parse JSON response for ` { claim, rating, explanation, sources } `
89+ ## Open Source SDKs
14690
147- 2 . ** Image Analysis**
148- - Upload or URL‑point to image → Sonar extracts on‑image text → verify each claim
149-
150- ``` dart
151- final client = PerplexityClient(apiKey: env.SONAR_API_KEY);
152- final response = await client.analyzeClaim(textSnippet);
153- print('Rating: ${response.rating}, Confidence: ${response.confidence}');
154- ```
91+ Built two reusable packages for the Flutter community:
92+ - ** [ perplexity_dart] ( https://pub.dev/packages/perplexity_dart ) ** - Core Dart SDK for Perplexity API
93+ - ** [ perplexity_flutter] ( https://pub.dev/packages/perplexity_flutter ) ** - Flutter widgets and BLoC integration
15594
156- The app processes audio in real-time, transcribes it using Flutter's speech-to-text package, and sends each snippet to the Sonar API for immediate fact verification with source citations.
157-
158- ### Custom SDKs Used
159-
160- This project uses custom-built Perplexity API SDKs developed specifically for this hackathon:
161- - ** perplexity_dart** - Core Dart SDK ([ pub.dev] ( https://pub.dev/packages/perplexity_dart ) , [ docs] ( perplexity-flutter ) )
162- - ** perplexity_flutter** - Flutter widgets and utilities ([ pub.dev] ( https://pub.dev/packages/perplexity_flutter ) , [ docs] ( perplexity-flutter ) )
16395
16496## Links
16597
166- - [ GitHub Repository] ( https://github.com/vishnu32510/fact_pulse )
167- - [ Live Demo] ( https://fact-pulse.web.app/ )
168- - [ Devpost Submission] ( https://devpost.com/software/fact-dynamics )
169- - [ Demo Video] ( https://youtu.be/92IoX19Djtc )
170-
171- ## Limitations
172-
173- - Speech recognition accuracy depends on audio quality and background noise
174- - Fact-checking is limited to claims that can be verified through available online sources
175- - Image text extraction quality varies based on image resolution and text clarity
176- - Real-time processing may experience latency depending on network connectivity
177- - Cross-platform compatibility is still being tested for macOS and Windows
178- - API rate limits may affect continuous usage in high-volume scenarios
179- - Android microphone access permissions need to be added for long duration listening
98+ - ** [ GitHub Repository] ( https://github.com/vishnu32510/fact_pulse ) ** - Full source code
99+ - ** [ Live Demo] ( https://fact-pulse.web.app/ ) ** - Try the web version
100+ - ** [ Demo Video] ( https://youtu.be/92IoX19Djtc ) ** - Watch it in action
101+ - ** [ Devpost Submission] ( https://devpost.com/software/fact-dynamics ) ** - Hackathon entry
0 commit comments