How eddieoz/atproto-scam-detector works
Main Components Identification
The system should be represented with these key components:
a) Core Service Layer:
• Main Bot Service (src/main.ts)
• Bot Session Manager (src/modules/botSession.ts)
• Database Systems
• SQLite Database (src/modules/database.ts)
• In-Memory Database (src/modules/memDatabase.ts)
b) Detection Modules:
• Scam Detection (src/modules/scamDetection.ts)
• Spam Detection (src/modules/spamDetection.ts)
• Ignore Watcher (src/modules/ignoreWatcher.ts)
c) External Services:
• BlueSky ATProto Integration
• DeepSeek-V3 API Integration
• Ozone Server Integration
┌─────────────────────────────────────────────────────────┐
• Crypto-Labeler Bot │
• ┌─────────────┐ ┌──────────────┐ ┌──────────┐ │
• Bot Session │────│ Main Service │────│ Helpers │ │
• ┘ └──────────────┘ └──────────┘ │
• ┌─────────────────────────────────────────────────┐ │
• Detection Modules │ │
• ┌──────────┐ ┌──────────┐ ┌─────────────┐ │ │
• Scam │ │ Spam │ │ Ignore │ │ │
• Detection│ │ Detection│ │ Watcher │ │ │
• ┘ └──────────┘ └─────────────┘ │ │
• ┘ │
• ┌─────────────────────────────────────────────────┐ │
• Storage Layer │ │
• ┌──────────┐ ┌─────────────┐ │ │
• SQLite │ │ In-Memory │ │ │
• Database │ │ Database │ │ │
• ┘ └─────────────┘ │ │
• ┘ │
• ┘ │
• ▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
• ATProto │ │ DeepSeek-V3 │ │ Ozone │
• (BlueSky) │ │ API │ │ Server │
• ┘ └──────────────┘ └─────────────┘
Important Elements to Highlight
a) Data Flow:
• How posts/content flows from BlueSky through the detection pipeline
• AI evaluation paths through DeepSeek-V3
• Database read/write operations
• Moderation action flows to Ozone
b) Integration Points:
• ATProto connection points
• AI API endpoints
• Database connections
• Moderation interfaces
Specific Implementation Details
• The bot's session management and persistence
• The separation between different types of detection (spam, scam, etc.)
• Database schema for ignored handles
• Integration with external AI services
• The role of pre-filters (scam terms and ignore lists)