Inspiration

Reddit moderators are volunteers managing thousands of posts daily with almost no automation. A single active subreddit can receive hundreds of posts per hour. Mods burn out. Harmful content slips through. We
wanted to change that.

## What it does

Mod Copilot is an AI-powered moderation dashboard built natively on Devvit. The moment a post is submitted to a subreddit, it is automatically analyzed against the subreddit's own rules using OpenAI GPT-4o-mini. Every post gets:

  • A violation verdict (yes/no)
  • A confidence score (0–100%) with a color-coded bar
  • The specific rule broken (name and number)
  • A one-sentence reason explaining the decision
  • A tone classification: threatening, hateful, deceptive, spam, angry, invasive, or clean

Flagged posts appear instantly in the moderator dashboard. Mods can approve, flag for review, or remove with a single tap — without ever leaving Reddit.

## How we built it

  • Devvit 0.12 with @devvit/web — Hono server for API routes, React + Tailwind CSS for the webview dashboard
  • OpenAI GPT-4o-mini via server-side HTTP (Devvit's sandbox requires all external AI calls to happen server-side)
  • Redis sorted sets for the flagged post queue with 7-day TTL and automatic pruning to the 50 most recent flags
  • onPostSubmit trigger for real-time analysis on every new post
  • Configurable confidence threshold — mods set the score above which posts are auto-flagged

## Challenges

Devvit's server sandbox only permits outbound HTTP to two pre-approved AI providers. All other domains are blocked at the gRPC proxy level, and client-side fetch is blocked by the iframe Content Security Policy. This forced a full server-side AI pipeline — every analysis goes through the Devvit server, not the browser. Solving this architecture was the core technical challenge.

## Accomplishments

We tested Mod Copilot against 10 posts covering spam, hate speech, illegal content, doxxing, misinformation, and normal valid posts. It correctly identified every violation category and assigned appropriate
confidence scores. The tone classifier added a layer of insight no standard mod tool provides.

## What we learned

Building within Devvit's constraints taught us to design tightly scoped server-side pipelines. The platform's Redis and trigger system is powerful — the real challenge is understanding what the sandbox allows
and designing around it.

## What's next

  • Bulk approve/remove actions
  • Direct ban from the dashboard
  • Weekly moderation summary sent to mod team
  • Support for image and link post analysis

Built With

Share this project:

Updates