Inspiration
ContextBridge was born from the need to reduce uncertainty in moderation decisions. On platforms where reports often lack necessary background, moderators must choose between erring on the side of removal or leaving content that may violate rules. We wanted a lightweight way to let authors provide context directly and reliably, so moderators can act with better information and confidence.
What it does
ContextBridge requests and stores author-provided context for reported posts and comments, surfaces that context in a concise moderator decision card, runs simple triage and evidence heuristics, and offers reminder workflows to nudge authors when needed. The tool deduplicates concurrent triggers, stores state in Redis, and integrates with native moderation flows so moderators can approve, remove, or ignore with a single decision.
How we built it
- Server: Hono + @devvit/web for the app entrypoint and platform integration.
- Client: React 19 + Vite for the custom post UI and decision card.
- Storage & state: Redis for cases, locks, and queue indices.
- Core logic: TypeScript modules in core handle validation, triage scoring, message templating, queue indexing, and retry logic.
- Routes: routes contains the API endpoints, menu handlers, and triggers that connect platform events to the core logic.
- CI & tooling: TypeScript, ESLint, Prettier, and Vitest for type-safety, linting, formatting, and tests. The server exposes REST endpoints for the web UI to fetch context, persist responses, send reminders, and record moderator actions. The triage engine scores cases by reports, keywords, and response content to help prioritize moderator attention.
Challenges we ran into
- Race conditions when multiple reports arrive simultaneously — solved with Redis locks and deterministic merging of report counts.
- Balancing urgent triage heuristics with false positives — tuned weights and evidence discounts in reviewInsights.ts.
- UX for authors inside platform messaging constraints — built a minimal React UI and templates to keep the flow simple and mobile-friendly.
- Operating within platform rate limits and message timeouts — added retry/backoff and timeouts in core utilities.
Accomplishments that we're proud of
- Robust deduplication so repeated reports don't create duplicate request posts or PMs.
- Triage + mod-summary generator that extracts short claims, evidence markers, and a recommendation to help mods decide faster.
- A compact, testable codebase with clear validation (validation.ts) and modular utilities for easy extension.
What we learned
- Small, deterministic heuristics (with thresholds) scale better in moderation tooling than complex ML models for initial triage.
- Good defaults and configurable subreddit settings are essential — moderators expect control over thresholds, templates, and reminder behavior.
- Integrating closely with platform messaging and using TTL-backed Redis entries reduced stale state and improved reliability.
What's next for ContextBridge
- Add richer evidence extraction (attachments/screenshots metadata) and optional automated evidence fetching.
- Improve triage with optional ML signals while keeping a human-in-the-loop.
- Expand configurability per-subreddit, including custom templates and role-based mod workflows.
- Add analytics dashboards for mod response times and reminder effectiveness.
Built With
- eslint
- hono-platform-&-sdks:-devvit-platform
- languages-&-frameworks:-typescript
- prettier
- react-19
- typescript-apis-&-integrations:-reddit-api-(via-devvit)
- vite
- vitest
Log in or sign up for Devpost to join the conversation.