The NoBullFit Worker is a background service that automatically verifies and moderates content in the NoBullFit platform. It runs continuously to ensure content quality, safety, and platform integrity.
This worker service is part of the NoBullFit ecosystem, handling automated verification and moderation tasks for user-submitted content. It operates independently from the main application, processing content on a continuous basis to maintain quality and safety standards. Currently, the worker handles recipe verification and moderation, with the architecture designed to support additional verification tasks and background jobs as the platform grows.
The worker automatically verifies public content that hasn't been verified yet. Currently, this includes recipe verification, where it checks each recipe to ensure:
- Content Validity: Uses AI to analyze recipe content and verify that it's a legitimate, complete recipe with proper ingredients and instructions
- Image Verification: Confirms that recipe images exist in storage and are accessible
- Quality Standards: Ensures recipes meet basic quality requirements before being marked as verified
The worker performs comprehensive content moderation to protect the platform and its users:
- Text Moderation: Analyzes content text for inappropriate material using OpenAI's moderation API
- Image Moderation: Uses AI vision models to analyze images, detecting inappropriate content or images unrelated to the content type
- Illegal Content Detection: Identifies and flags illegal content (such as child exploitation, illegal drugs, or illegal activities)
- Automatic Actions: Immediately makes flagged content private and sends email notifications to support when illegal content is detected
The worker implements intelligent scheduling to avoid excessive processing:
- Only processes content that hasn't been verified in the last 6 hours
- Skips content that has already been flagged
- Prevents duplicate email notifications for the same flagged content
The worker runs continuously, checking for unverified content every minute. Currently, it processes recipes. For each item, it:
- Checks if the content has already been flagged (skips if so)
- Performs content moderation checks on text and images
- Makes content private if inappropriate content is detected
- Sends email notifications only for illegal content
- Validates content using AI to ensure it meets quality standards
- Verifies that associated images exist in storage
- Marks content as verified if all checks pass
The worker is built with Python and integrates with several services:
- Database: PostgreSQL for content data storage
- AI Services: OpenAI API for content analysis, moderation, and vision processing
- Storage: Cloudflare R2 for image storage
- Email: Amazon SES for notification delivery
The worker processes content data to maintain platform quality and safety. All moderation decisions are logged, and flagged content is immediately made private to protect users. Email notifications are only sent for illegal content that requires immediate attention.
This project is part of the NoBullFit ecosystem. See the LICENSE file for details.