A package for detecting mobile money fraud in Ghana using AWS Bedrock AI models. Analyzes SMS messages and transaction screenshots with in-memory processing.
# CatchDem - Ghana Mobile Money Fraud Detector
A comprehensive fraud detection package for mobile money transactions using AWS Bedrock AI models. This package helps users identify fraudulent SMS messages and transaction screenshots commonly used in mobile money scams in Ghana. Supports multiple AWS Bedrock models with Nova Lite as the default.
## Features
- 🔍 **Text Analysis**: Analyze SMS messages for fraud patterns
- 🖼️ **Image Analysis**: Analyze transaction screenshots and images (in-memory processing)
- ☁️ **AWS Integration**: Uses AWS Bedrock AI models (Nova Lite default, customizable)
- 🎯 **Flexible Models**: Support for multiple AWS Bedrock models (Claude, Nova, etc.)
- 🛡️ **Ghana-Focused**: Specifically trained on Ghana mobile money fraud patterns
- 📊 **Detailed Results**: Provides confidence scores and detailed analysis
- 🚀 **Easy to Use**: Simple API with TypeScript support
- ⚡ **No S3 Required**: Direct in-memory image processing
## Installation
```bash
npm install momo-fraud-detector
```
## Quick Start
### Text Analysis
```typescript
import { FraudDetector, AWSConfig } from "momo-fraud-detector";
const awsConfig: AWSConfig = {
region: "us-east-1",
accessKeyId: "your-access-key-id",
secretAccessKey: "your-secret-access-key",
};
// Using default Nova Lite model
const detector = new FraudDetector({ aws: awsConfig });
// Or using a custom model
const detectorWithCustomModel = new FraudDetector({
aws: awsConfig,
modelId: "anthropic.claude-3-sonnet-20240229-v1:0", // Custom model
});
// Analyze SMS text
const result = await detector.analyzeText({
text: "Congratulations! You have won GHS 10,000. Send your PIN to claim your prize.",
});
console.log(result);
// Output:
// {
// status: "FRAUD",
// confidence: 95,
// analysisDetails: "FRAUD - This message requests PIN information which legitimate services never do. The urgent language and promise of money are classic fraud indicators."
// }
```
### Image Analysis
```typescript
import { FraudDe …