尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Multilingual scam checker for immigrant families and seniors in CA-14 (Congressional App Challenge 2026)
翻译准备中
正在加载完整 README。
查看完整 README ↗A multilingual scam checker for immigrant families and seniors in California's 14th district. Paste a message or upload a screenshot. Check First tells you, in your own language, how risky it is, which red flags it found, and exactly how to verify it with official sources before you pay anyone.
Congressional App Challenge 2026 entry (CA-14) by Viraj Mutti.
Live app: https://check-first-sepia.vercel.app
Families in Fremont, Union City and Hayward get scam texts, WhatsApp forwards and phone calls every week:
The people targeted most are often the least able to check. They may not read English well, may not know which government websites are real, and may be pressured to pay right now. Most scam-checking tools are English-only.
CA-14 is one of the most diverse districts in the country, with large Punjabi, Hindi-speaking, Spanish-speaking, Chinese and Afghan (Dari-speaking) communities, many of them seniors or recent immigrants. Check First works in all six of those languages, on a phone, with no account and no data saved.
.gov links matched to the scam type (21 links, each opened in a browser to confirm it loads).flowchart TD
U[User on phone] -->|paste text or screenshot| UI[Next.js page<br/>components/Checker.tsx]
UI -->|Layer 1: instant, offline| R[Rules engine<br/>lib/redFlags.ts]
UI -->|Layer 2: POST /api/analyze<br/>8 second timeout| API[Server route<br/>app/api/analyze/route.ts]
API -->|rate limit + zod input check| API
API -->|text and/or image| C[Claude or Gemini<br/>structured JSON output]
C --> API
API -->|zod-validated JSON| UI
R --> M[combineResults<br/>lib/combine.ts]
UI --> M
M -->|final risk = higher of the two| RC[Result card<br/>red flags, steps, official links, share]
L[locales/*.json<br/>6 languages] --> UI
D[data/resources.json<br/>official .gov links] --> RC
lib/redFlags.ts runs in the browser. It scores the message 0–100 using weighted keyword and pattern rules across nine categories (threats, unusual payments, government impersonation, guarantees, upfront fees, secrecy, notarios, prizes, suspicious links) in all six languages. It needs no internet and no API key, and every result is explainable: the screen shows the exact words that matched.app/api/analyze/route.ts sends the message (and screenshot, if any) to an AI on the server: Claude if an Anthropic key is set, otherwise Gemini (which has a free tier). Each provider lives in its own small file (lib/ai/claude.ts, lib/ai/gemini.ts) and shares one prompt (lib/ai/prompt.ts). The AI must answer in strict JSON: {risk, scamType, redFlags[{flag, explanation}], nextSteps[], summary}, written in the user's language. The server checks that JSON again with zod before trusting it.Getting a reliable answer in six languages from an AI that can fail, without ever leaving a scared user staring at a spinner or an error.
AI output can be slow, cut off, or shaped wrong, and a user checking a scam call is often under pressure. The solution has four parts:
AiAnalysisSchema). Anything that doesn't match is treated as a failure.AbortController) and the server SDK stop after 8 seconds.extractedText), and the rules engine re-runs on that text. A screenshot gets two independent checks too.A second challenge was multilingual text handling. JavaScript's \b word boundary only understands English letters, so Punjabi, Hindi, Chinese and Dari keywords need different matching. Dari also needs right-to-left layout, the invisible joiner character (ZWNJ) in words like پیامها, and its own font. A test (lib/locales.test.ts) guarantees every language has every string.
Requirements: Node.js 20+.
git clone <this repo>
cd check-first
npm install
cp .env.example .env.local # then add an Anthropic or Gemini API key
npm run dev # http://localhost:3000
Without an API key the app still works: it uses the rules engine only and says so.
| Command | What it does |
|---|---|
npm run dev | Development server |
npm test | Unit tests (rules engine, translations, official links) |
npm run typecheck | TypeScript check |
npm run lint | ESLint |
npm run build | Production build |
Environment variables (server only, never sent to the browser):
| Name | Required | Default |
|---|---|---|
ANTHROPIC_API_KEY | one of the two keys, for the AI layer | none |
ANTHROPIC_MODEL | no | claude-sonnet-5-5 |
GEMINI_API_KEY | used only if there's no Anthropic key (free tier at aistudio.google.com) | none |
GEMINI_MODEL | no | gemini-3.5-flash-lite |
Next.js (App Router) · TypeScript · Tailwind CSS · Anthropic SDK and Google GenAI SDK (server only) · zod · Vitest · Vercel.
This project used an AI coding assistant. AI_USAGE.md lists exactly what was AI-generated and what Viraj wrote. The rules engine logic in lib/redFlags.ts was written by the AI assistant at Viraj's request, building on his first line; Viraj chose its categories. LEARN.md walks through every file.
Check First gives general safety information and links to official sources. It is not legal advice. In an emergency, call 911.