Skip to content

Implement Content Moderation Pipeline #1695

Description

@RUKAYAT-CODER

Overview

The keyword filter service returns a stub and the external moderation API service is not wired. Quest titles and submission proof content are stored without any moderation.

Background

ModerationService has all the structural pieces: KeywordFilterService, ImageModerationService, ExternalModerationApiService, and ContentClassifierService. They need to be implemented and wired into the quest and submission creation flows.

Specifications

Features:

  • Keyword filter with configurable block list (env-driven)
  • External API integration (e.g. OpenAI moderation or Perspective API)
  • Auto-reject submissions with flagged content

Tasks:

  • Implement KeywordFilterService.filter(text)`n- Integrate external moderation API with fallback to keyword-only
  • Wire moderation check in SubmissionsService.create`n

Impacted Files:

  • BackEnd/src/modules/moderation/filters/keyword-filter.service.tsn- BackEnd/src/modules/moderation/filters/external-moderation-api.service.tsn- BackEnd/src/modules/submissions/submissions.service.ts`n

Acceptance Criteria:

  • Blocked keywords cause quest/submission rejection with clear error
  • External API failures fall back to keyword filter

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignStellar WaveIssues in the Stellar wave programbackendenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions