Inspiration

Moderators often see harmful or promotional campaigns only after the pattern has already spread. A single post can look harmless: one recommendation, one repeated phrase, one unusual link. The real signal is distributed across threads, timing, wording, reports, and link obfuscation.

CampaignLens was inspired by that gap. I wanted to build a Devvit-native mod tool that helps moderators see the pattern without turning the app into an automatic enforcement system or a user-profiling tool.

The goal was simple: make coordinated behavior easier to investigate, while keeping moderators in control.

What it does

CampaignLens detects campaign-shaped activity inside a subreddit and turns it into explainable evidence dossiers.

It watches Reddit triggers for posts, comments, reports, deletions, Automod filters, and moderator actions. It extracts signals such as repeated domains, brand-like phrases, configured watchlist terms, obfuscated links, near-duplicate phrasing, thread spread, timing bursts, and reports.

When enough signals line up, CampaignLens creates a dossier showing:

  • total score and score breakdown
  • why the pattern surfaced
  • evidence excerpts and matched fragments
  • timeline
  • campaign replay
  • category such as commercial promotion or possible harmful narrative
  • safe moderation action preview
  • item-level action history

CampaignLens does not automatically ban, remove, lock, accuse, profile users, or send content to external AI services.

How I built it

CampaignLens is built with Devvit Web, React, TypeScript, Hono, Redis, and Reddit’s Developer Platform APIs.

The app has three major layers:

  1. Devvit integration layer
    All Reddit, Redis, realtime, trigger, and context access is isolated behind src/devvit/*. This keeps the rest of the app protected from SDK changes.

  2. Detection and scoring layer
    The backend extracts compact evidence samples and scores them with deterministic signals:

    • domain burst
    • brand burst
    • thread spread
    • near-duplicate similarity
    • participation/timing pattern
    • obfuscation
    • reports
    • moderator-configured watch terms
  3. Moderator workflow layer
    The dashboard shows dossiers, review queue, settings, diagnostics, action preview, confirmation, and action history.

For Reddit compliance, the inline custom post is only a compact launch view. The full dashboard opens in user-initiated Expanded Mode so the inline view does not trap Reddit scrolling gestures.

Challenges I faced

The biggest challenge was making a real Devvit app behave reliably inside Reddit, not just building a local dashboard.

Some specific challenges:

  • Devvit SDK instability
    I hit opaque SubmitCustomPost runtime errors in older Devvit builds. I solved this by pinning a tested Devvit version and isolating SDK calls behind an adapter layer.

  • Inline scroll trap review feedback
    Reddit review flagged the first dashboard version because the inline webview could scroll inside a Reddit post. I redesigned the flow so the inline post is only a launch card and the full app opens in Expanded Mode.

  • Fresh subreddit behavior
    New subreddits start with no baseline and no dossiers. I had to make sure this felt like a normal empty state instead of an error state.

  • Moderator safety
    Because CampaignLens can preview and execute moderation actions, I added explicit confirmation, item-level results, rollback warnings, subreddit scope checks, disabled ban/mute actions, and no automatic enforcement.

  • Hackathon demo friction
    A judge should not need to create ten posts and guess the right thresholds. I tuned the defaults so a safe three-post test can demonstrate the core loop clearly.

What I learned

I learned that mod tools need a different product mindset than normal dashboards. The UI must be fast and clear, but also careful. A moderation tool should avoid overclaiming. “This pattern is worth review” is safer and more useful than “this user is bad.”

I also learned that Devvit Web is powerful, but production readiness depends on details: permissions, view modes, realtime fallback, Redis failure handling, app review expectations, and clean install instructions.

The most important technical lesson was to keep the Devvit SDK behind a boundary. That made it much easier to respond to API/version changes without rewriting the whole app.

What makes CampaignLens different

CampaignLens is not another AI moderation classifier. It is an evidence-first pattern detection tool.

The app does not ask moderators to trust a black box. It shows the signals, the evidence, the timeline, and the reason a dossier surfaced. Moderators decide what to do.

That matters because coordinated campaigns are often not obvious at the single-post level. CampaignLens gives moderators a broader view while preserving human judgment.

What’s next

The next version would focus on:

  • better onboarding for first-time moderators
  • richer replay visualization
  • exportable diagnostics with content redaction
  • reviewer assignment workflows
  • more frontend interaction tests
  • optional semantic harmful-narrative classification, only with clear safety review and moderator control

CampaignLens v1.0.1 is focused on the complete hackathon-ready loop: detect, explain, review, preview, confirm, execute, and audit.

Built With

Share this project:

Updates