尚未偵測到更新。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.