Inspiration
Moderating a subreddit means juggling reports, spam, toxic language, and unclear context—all while keeping a clear audit trail. Mod tools are powerful but scattered. We built ModAiGuard so moderators can analyze content, get AI-backed recommendations, and act on the mod queue without leaving Reddit, using Devvit Web.
What it does
ModAiGuard is an AI moderation copilot for subreddit mods:
- Toxicity Analyzer — scores harmful language (insult, threat, hate) via OpenAI
- Spam Detector — flags links, repetition, and promo patterns
- Report Review — triage the real mod queue with AI banners and one-click actions (approve, remove, spam, needs context)
- Auto-Moderation — process the entire mod queue automatically from a single button
- Auto-Responder — trigger-based reply rules when content matches
- Logs, History & Moderations Panel — full audit trail with scores and recommendations
- Demo Mode — fake posts for judges/demo days (no Reddit API calls)
- Activity notifications — recent moderation events in the header
Mods open the panel from the subreddit menu: “Abrir ModAiGuard Panel”.
How we built it
We used Devvit Web (Reddit’s app platform) with:
- Backend: TypeScript + Hono REST API (
/api/toxicity,/api/spam,/api/ai/recommend,/api/report-actions,/api/auto-moderation,/api/demo, etc.) - Frontend: React 19, React Router, Vite, Tailwind CSS 4
- Storage: Redis for moderation logs (
AI_LOGS_<subreddit>) and demo posts - Reddit API: mod queue, approve, remove, mark spam, ignore reports
- AI: OpenAI
gpt-4o-minifor toxicity; heuristic engine for spam; threshold-based recommendation engine
Every API returns { ok: true, data } or { ok: false, error } for consistent error handling.
Challenges we ran into
- Wiring a full React dashboard inside Devvit’s playtest/simulator iframe
- Keeping log fields consistent across human actions, auto-moderation, and demo simulations
- Balancing real auto-moderation (powerful but risky) with Demo Mode (safe for demos)
- Making risk scores visually clear (green / yellow / red) across many modules
Accomplishments that we're proud of
- End-to-end flow: analyze → recommend → act → log
- Real batch auto-moderation on the mod queue
- Demo Mode so anyone can try the product in under a minute
- Unified moderation history with toxicity, spam, AI recommendation, and auto flag
What we learned
Devvit is a strong fit for mod-facing tools: rich UI + server + Redis in one stack. Splitting analysis, recommendation, and action made the system easier to test and explain to users—and essential for hackathon demos.
Built With
- devvit
- hono
- lucide
- node.js
- openai-api-(gpt-4o-mini)
- react
- redis
- tailwind-css
- typescript
- vite

Log in or sign up for Devpost to join the conversation.