TrustLayer is an AI-powered scam protection platform that helps vulnerable communities detect, understand, and share scam warnings before people get tricked.
Scammers target people who may not recognize warning signs quickly, especially immigrants, international students, older family members, and people reading messages in a second language.
TrustLayer helps by:
- Detecting suspicious messages
- Explaining why something is a scam in simple language
- Translating scam warnings for different communities
- Showing scam patterns other people are seeing
- Helping families and communities warn each other faster
TrustLayer provides an accessible, multilingual interface for evaluating suspicious messages and sharing alerts across communities. The platform combines AI-driven fraud scoring and explanation with demo-ready mock data so the app can be shown reliably during a hackathon.
- 47% of immigrants are targeted by scams within their first two years in the US
- Scammers exploit language barriers, unfamiliar systems, and fear of authorities
- Existing spam filters use keyword matching and do not explain why a message is dangerous
- TrustLayer is built to detect scams, explain risks in simple language, and warn people in their own languages
TrustLayer uses a multi-stage protection pipeline:
- Detect language and translate incoming text to English if needed
- Apply rule-based keyword and pattern scoring on the translated text
- Run an OpenAI fraud-scoring call to assess scam likelihood
- Aggregate rule and AI scores to classify messages as
Safe,Suspicious, orScam - When fraud is confirmed, generate a warning in the detected language and send it via Resend
All analysis is logged to Supabase and shown on the dashboard, giving users visibility into processed messages, risk scores, red flags, and alert history.
The app supports mock and in-memory data for a stable hackathon demo flow. A built-in demo mode can simulate email processing so the experience works even without a full SendGrid / email-forwarding setup.
Next.js- web app frameworkReact- frontend UITypeScript- safer codeTailwind CSS- styling and responsive designOpenAI API- scam detection, fraud scoring, explanations, translation supportSupabase- user and data infrastructureResend- sending scam alert emailsLucide React- iconsGitHub- team collaboration and version controlMock / in-memory data- reliable hackathon demo flowMultilingual UI- English, Chinese, Spanish, Bengali, Haitian Creole, and moreclaude-api- AI assistant integrationhugging-face-fraud-detection-models- fraud detection model supportnext.js-16/next.js-api-routes- app architecture and API routingsupabase-ready- deployment-ready backend support
- Open a terminal and change into the project folder:
cd trust-layer- Create a
.env.localfile intrust-layerwith your environment keys:
OPENAI_API_KEY=your-openai-api-key
NEXT_PUBLIC_SUPABASE_URL=https://your-supabase-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
RESEND_API_KEY=your-resend-api-key- Install dependencies if needed:
npm install- Start the development server:
npm run devOpen http://localhost:3000 with your browser to view the app.
app/- Next.js app routes, pages, and componentslib/- shared utilities, API integrations, and helper functionspublic/- static assets and social imagesscripts/- demo and testing scripts
This project is designed to demonstrate AI-powered scam protection for communities that need faster, clearer warnings and multilingual support.