A full-stack mobile application for verifying video content credibility using AI analysis with Firebase AI Logic.
Sentinelle is a real-time credibility assessment layer for short-form video content in Singapore's four official languages (English, Chinese, Malay, Tamil). It uses AI to automatically analyze video content and provide instant credibility insights.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mobile App (React Native) β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Feed View β β StatusBadge β β Badge Modal β β
β β (tap badge) ββ β (circular UI)ββ β (show results)β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Firebase AI Logic (Gemini 2.5 Flash) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β firebaseAnalysis.ts β β
β β 1. Upload video to Firebase Storage β β
β β 2. Transcribe with Gemini (multimodal) β β
β β 3. Extract claims (structured JSON) β β
β β 4. Verify claims with web search grounding β β
β β 5. Calculate credibility score β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Firebase Services β
β ββββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ β
β β Firestore DB β β Firebase Storage β β Firebase AI β β
β β (Posts/Users) β β (Videos) β β Logic β β
β ββββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- React Native + Expo 54
- Redux Toolkit
- TypeScript
- Firebase SDK v13+
- Firebase Firestore (Database)
- Firebase Storage (Video Storage)
- Firebase AI Logic (Gemini 2.5 Flash)
- Firebase AI Logic with Gemini 2.5 Flash
- Multimodal video analysis
- Structured JSON output for claim extraction
- Web search grounding for verification
hackomania-mobile/
βββ src/
β βββ components/
β β βββ general/post/overlay/
β β βββ StatusBadge.tsx # Circular badge with built-in modals
β βββ services/
β β βββ firebaseAILogic.ts # Gemini initialization
β β βββ firebaseAnalysis.ts # Video analysis with Gemini
β β βββ posts.ts # Firestore posts service
β β βββ chat.ts # Firestore chat service
β β βββ user.ts # Firestore user service
β β βββ storage.ts # Firebase Storage uploads
β βββ hooks/ # Custom React Hooks
β βββ redux/ # Redux store & slices
β βββ data/ # Data & mapping
βββ types/ # TypeScript types
βββ assets/
β βββ dummy/ # Dummy video files
β βββ demo_videos/ # Demo video documentation
βββ firebaseConfig.ts # Firebase configuration
βββ package.json
- Multilingual Support: English, Chinese, Malay, Tamil
- Client-Side Analysis: Video analysis directly on device using Firebase AI Logic
- StatusBadge Component:
- Circular badge icons with distinct designs for each status
- β
Verified (green):
check-decagramicon - β AI-generated (yellow):
roboticon - β Fake (red):
alert-octagonicon - Built-in modals for detailed information
- AI Nutrition Label for AI-generated content
- Fact check details for fake content
- Verification details for verified content
- Credibility Categories:
- β Verified (80-100)
- β Unverified (60-79)
- β Misleading (40-59)
- β Disinformation (0-39)
- Singapore Context: Verification against MOH, SPF, MAS, MOE, CNA, ST
- Real-time Updates: Firestore onSnapshot listeners for live data
- Demo Mode: Anonymous user mode with DEMO_USER_ID
- Firebase project with Blaze plan (for AI Logic)
- Gemini Developer API enabled
- Node.js 18+
- Expo CLI
- Clone and Install
git clone https://github.com/codeandconquersg/hackathon.git
cd hackathon
npm install-
Firebase Configuration
The project is configured with Firebase project:
codeandconquer-fb59cFirebase services used:
- β Firestore Database
- β Firebase Storage
- β Firebase AI Logic (Gemini Developer API)
-
Run the App
npx expo start- Scan QR Code with Expo Go app or run on emulator
- Upload: Video uploaded to Firebase Storage
- Transcribe: Gemini 2.5 Flash transcribes video (multimodal)
- Extract Claims: Structured JSON output for claims
- Verify Claims: Web search grounding for verification
- Calculate Score: Aggregated credibility score
- Store Results: Save to Firestore
import { analyzeVideo } from "./services/firebaseAnalysis";
const result = await analyzeVideo(videoUri, videoId, {
onProgress: (progress) => {
console.log(`${progress.step}: ${progress.progress}%`);
},
onComplete: (result) => {
console.log("Credibility Score:", result.status_info.score);
},
});All data operations use Firebase Firestore and Storage directly from the client.
post- Video posts with analysis resultsuser- User profileschats- Chat messagescomments- Post comments
videos/- Uploaded video filesimages/- Uploaded image files
| Category | Score Range | Status Type | Badge |
|---|---|---|---|
| verified | 80-100 | verified | β |
| unverified | 60-79 | ai-generated | β |
| misleading | 40-59 | fake | β |
| disinformation | 0-39 | fake | β |
- English (en)
- Chinese (zh)
- Malay (ms)
- Tamil (ta)
| Service | Usage | Est. Cost |
|---|---|---|
| Gemini 2.5 Flash | 100 videos analyzed | ~$2-5 |
| Firestore Free Tier | 50K reads/day | $0 |
| Firebase Storage | 10GB stored | ~$0.26 |
| Total | ~$2.26-5.26/month |
Demo videos are provided in assets/dummy/ directory:
- clip1.mp4 through clip5.mp4
- img1.jpg through img10.jpg
npx expo startnpx tsc --noEmitnpx expo export --platform webContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License
Built for Singapore Hackathon 2024
Note: This project uses Firebase AI Logic (Gemini Developer API) for all AI-powered features. No backend server required.