Inspiration
Reddit runs on volunteer labor - and the scale of it is staggering.
According to a 2022 study from Northwestern University, Reddit moderators collectively contribute 466 hours of moderation labor every single day across active communities. Annualized, that is ~170,000 hours per year - valued at a minimum of $3.4 million using a $20/hr freelancer baseline. That is 2.8% of Reddit's entire annual revenue, contributed entirely for free by ~60,000 daily-active volunteer moderators (Reddit Transparency Report, 2023).
The burden is not shared equally. Research shows Gini inequality indexes as high as 0.90 in some subreddits - meaning a single moderator handles up to 72% of all moderation actions in their community. These people are burning out.
But there is a deeper problem that nobody has solved: the evidence disappears.
When a moderator removes a post or bans a user for harassment, the user often deletes their comment or edits it to remove the rule-breaking content seconds later. Then they file a ban appeal, claiming innocence.
Reddit processed 407,000+ content and account appeals in H2 2024 alone, with an 18.6% reversal rate (Reddit Transparency Report, H2 2024). Moderators are being overruled regularly. Often because they have no evidence left to present. One in seven moderation cases is internally disputed. The moderator took the right action, but they have no receipt.
We built Evidence Vault to fix that.
What it does
Evidence Vault is a native Reddit app built entirely on Devvit that gives moderators a secure, tamper-resistant evidence management system that lives directly inside Reddit.
- ๐ One-Click Vaulting: Right-click any comment or post โ "Vault this Comment." The original text, author, timestamp, severity level, and moderator case notes are instantly locked in a tamper-resistant Redis store.
- ๐ Rolling Buffer with Edit Interception: Every post and comment across the subreddit is automatically cached for 48 hours. When a user edits their content, Evidence Vault intercepts the update and preserves both the original body and the edited version.
- ๐ Dedicated Moderator Dashboard: A full evidence dashboard is created as a pinned post in the subreddit. The entire mod team can view all vaulted evidence with severity, search by username, filter edit status, and open full evidence detail modals.
- ๐ CSV Export: One-click export of the full evidence log as a structured CSV - ready for Reddit admin escalation, formal dispute resolution, or team review.
- ๐ GDPR Compliance: Built-in user data erasure tools. Moderators can remove all evidence records tied to a specific user to ensure compliance with privacy regulations.
- ๐งน Nuke + Evidence: The "Mop" feature removes entire toxic comment threads and logs the evidence simultaneously in a single action.
- โก Built for Scale: Cursor-based pagination, O(1) Redis cardinality queries, and incremental client-side rendering. The dashboard loads instantly whether the vault has 10 records or 10,000.
How I built it
- Runtime: Devvit Web (Hono.js server + Vite client - TypeScript throughout)
- Data Layer: Two-tier Devvit Redis architecture. A Rolling Buffer (48-hour TTL cache) intercepts submission and edit events in real-time. A Vault Store (permanent ZSet + Hash store) manages permanent logs with O(1) cardinality (
zCard) and cursor-based pagination (zRangeby rank). - Frontend: Zero-dependency vanilla JavaScript + CSS dashboard rendered as a Devvit WebView iframe. The client bootstraps instantly from server-side rendered initial data to eliminate loading flicker.
- Security: All dashboard routes verify moderator permissions via
isModerator()before serving any content, operating entirely within Reddit's native permission model.
Challenges I ran into
- The Dual-Codebase Sync: Devvit's WebView architecture requires client JavaScript to exist both as a standalone file and as an embedded string inside a server Hono template literal. We built a custom synchronization script that auto-escapes backticks, template string interpolation (
${), and regex backslashes to propagate changes between both environments. - Vite Template Literal Escaping: Embedding 1,000+ lines of vanilla JavaScript inside Hono template literals creates a minefield of string conflicts. Our sync script resolves this by handling escaping backslashes first, then backticks, then interpolation brackets.
- Scalability: Our initial implementation loaded all evidence records into memory on the server, causing timeouts. We refactored the entire data layer to use Redis
zRangewith rank offsets and implemented anIntersectionObserver-powered infinite scroll on the client for constant-time performance. - GDPR vs. Evidence Integrity: Balancing user privacy rights with persistent evidence records. We resolved this by organizing records under user-namespaced keys (
vault:user:{username}), allowing clean, single-user erasure without affecting the rest of the database.
Accomplishments that I'm proud of
- Zero-Flicker SSR Bootstrap: The dashboard renders server-side with the first 50 records pre-injected, then activates client-side logic instantly.
- Edit Interception: We capture what a user said before they edited it. This capability does not exist natively in Reddit's moderation toolset.
- Complete Chain of Custody: Every vaulted record includes the original content, current content, edit flag, author, creation timestamp, vault timestamp, moderator identity, severity classification, and case notes.
- GDPR Compliance by Design: surfacing user data erasure as a primary, secure moderator action.
What I learned
- Devvit's WebView sandbox is powerful but demands precision at the boundary between server-rendered HTML and client JavaScript. Code synchronization requires robust automation rather than manual transcription.
- Redis ZSets are incredibly well-suited for paginated, time-sorted logs when paired with hash maps for field-level access.
- Moderator tooling is dramatically underserved. Every moderator we spoke to had experienced users deleting evidence before it could be documented.
- Designing for trust requires more than data storage; moderators need simple tools like CSV exports to present their evidence convincingly.
What's next for Evidence Vault
- Rule-Based Severity Classifier: Automatically assign severity levels based on keyword matching and repeat-offender history.
- User Timeline View: Visualizing all evidence against a specific user in a chronological timeline to trace patterns of behavior.
- Audit Log: A secondary ledger tracking every mod action taken against vaulted evidence for team-wide accountability.
- Cross-Subreddit Evidence Sharing: Allowing shared moderator teams to flag repeat offenders across multiple communities.
Built With
- css3
- devvit
- hono.js
- html5
- javascript
- reddit-developer-platform
- redis
- typescript
- vite