Detect scams and misinformation in forwarded messages — built for elderly and non-tech-savvy users.
Paste an SMS, email, WhatsApp forward, or social post. SafeForward uses Google Gemini to return a clear verdict, plain-language explanation, and a concrete next step.
- Simple verdicts:
SAFE,SUSPICIOUS, orLIKELY SCAM - Plain English explanations written for seniors and less tech-confident users
- Red flags and a specific safe action to take
- Sample messages to try the analyzer quickly
- Larger text mode and a short safety guide in the UI
- Works locally with Express, or on Vercel via the serverless
/api/analyzeroute
- React 19 + TypeScript + Vite
- Tailwind CSS + Motion
- Express (local API)
- Google Gemini (
@google/genai) - Vercel serverless functions for production API
- Node.js 18+
- A Google Gemini API key
npm install
cp .env.example .envEdit .env and set:
GEMINI_API_KEY=your_gemini_api_keyAPP_URL is optional for local development.
npm run devOpen http://localhost:3000. The Express server serves the Vite app and the POST /api/analyze endpoint.
| Command | Description |
|---|---|
npm run dev |
Start the local Express + Vite development server |
npm run build |
Build the frontend and bundle the server |
npm start |
Run the production server from dist/ |
npm run preview |
Preview the Vite production build |
npm run lint |
Type-check with TypeScript |
npm run clean |
Remove build artifacts |
Request body:
{
"message": "Your forwarded text here"
}Example response:
{
"verdict": "LIKELY SCAM",
"confidence": 92,
"red_flags": ["Requests urgent money transfer", "Impersonates bank staff"],
"plain_explanation": "This message tries to scare you into sending money quickly. Real banks do not ask for this over text.",
"safe_action": "Do not click any links or reply. Delete the message and call your bank using the number on your card."
}- Connect the repo to Vercel.
- Set
GEMINI_API_KEYin the project Environment Variables. - Deploy. The serverless handler in
api/analyze.tsserves analysis requests.
├── api/ # Vercel serverless analyze route
├── assets/ # Static assets
├── src/
│ ├── components/ # UI components
│ ├── data/ # Sample messages
│ ├── App.tsx
│ ├── main.tsx
│ └── types.ts
├── server.ts # Local Express + Vite server
├── vercel.json
└── package.json
Messages you submit are sent to the Gemini API for analysis. Do not paste passwords, OTPs, full card numbers, or other highly sensitive personal data.
Private project — all rights reserved.