Scamurai is a browser extension designed to help elderly users detect scams on popular websites like Gmail and WhatsApp Web. The extension provides a simple, accessible interface for analyzing potentially suspicious content using Google's Gemini AI.
The project consists of two main components:
- Browser Extension - Chrome/Firefox extension that injects a floating samurai button on supported websites, allowing users to scan content for potential scams.
- Training Dojo - A user-interactive React & Flask webapp which provides custom-generated examples of scam emails/texts to teach the user how to recognize scams.
- Floating Action Button (FAB) - Large, accessible button that appears on supported websites
- Simple One-Click Scanning - Users can check suspicious content with a single click
- AI-Powered Analysis - Uses Google's Gemini AI to analyze content for scam indicators
- User-Friendly Results - Presents findings with clear threat levels and simple explanations in a cool samurai voice
- Clone this repository
- Navigate to the
scamurai-backenddirectory - Create a virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies
pip install -r requirements.txt - Create a
.envfile based on.env.templatecp .env.template .env - Get a Gemini API key from Google AI Studio and add it to the
.envfile - Start the backend server
python app.py
- Open Chrome and navigate to
chrome://extensions - Enable "Developer mode" (toggle in the top-right corner)
- Click "Load unpacked" and select the
scamurai-extensiondirectory - The Scamurai extension should now be installed and visible in your toolbar
- Open Firefox and navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Navigate to the
scamurai-extensiondirectory and select any file (e.g.,manifest.json) - The Scamurai extension should now be installed and visible in your toolbar
- Visit a supported website (currently Gmail or WhatsApp Web)
- Look for the Scamurai floating button in the corner of the page
- Click the button to analyze the current content for potential scams
- Review the results in the overlay window
- Follow the provided safety tips if a scam is detected
You can modify the list of supported websites by editing the manifest.json file:
- Update the
matchesarray in thecontent_scriptssection - Update the
host_permissionsarray
You can change the position of the floating button by modifying the buttonPosition property in the CONFIG object at the top of content-script.js:
- Options: 'bottom-right', 'bottom-left', 'top-right', 'top-left'
Update the backendUrl property in the CONFIG object in content-script.js to point to your deployed backend server.
The backend can be deployed to any service that supports Python/Flask applications:
- Heroku
- Render
- AWS Lambda
- Google Cloud Run
Remember to set the GEMINI_API_KEY environment variable in your deployment environment.
To publish the extension to the Chrome Web Store or Firefox Add-ons:
- Create a ZIP file of the
scamurai-extensiondirectory - Create a developer account on the respective store
- Submit your extension following the store's guidelines
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini API for the AI-powered scam detection
- All contributors and users who help improve this tool