## Inspiration

Online social platforms connect millions of people daily, but safety remains an afterthought. Stories of catfishing, scams, and harassment are everywhere — yet most apps do nothing until after the damage is done. We wanted to flip that. What if an application could protect you in real-time while you're chatting? And what if you
couldn't even see someone's face until you'd earned that trust through genuine conversation?

## How We Built It

SociaSafe is a cross-platform application built with React Native and Expo, powered by Firebase (Auth, Firestore, Storage) on the backend and Google Gemini AI for intelligence.

The safety system works in two layers:

### Layer 1 — Local Keyword Engine (instant, free, offline) Every incoming message is scanned on-device against a dictionary of red flag patterns across 7 categories: personal info requests, financial scams, drug references, inappropriate content, threats, suspicious links, and platform switching pressure. Flagged messages instantly turn red in the chat.

### Layer 2 — Gemini AI Explanation (on-demand) When a user taps a red message, only then does the app call Gemini to generate a detailed explanation of why the message is harmful. This keeps costs near zero:

$$\text{API Cost} \approx \$0.01 \times n_{\text{taps}}$$

compared to the naive approach:

$$\text{API Cost} \approx \$0.01 \times n_{\text{messages}}$$

### Progressive Blur System

Profile photos start fully blurred and reveal as trust builds. The blur radius is calculated as:

$$B(d) = \max\left(0,\ 70 - 5d\right)$$

where $d$ is the number of mutual active chat days. Full face reveal requires $d = 14$ days of real conversation from both sides.

### AI-Powered Analysis

Gemini also powers:

  • Face Analysis — age range, gender, celebrity lookalike, and distinctive features from a single selfie
  • Chat Compatibility — tone detection, compatibility scoring ($\text{High} \mid \text{Medium} \mid \text{Low}$), and behavioral pattern insights across the full conversation history
Share this project:

Updates