Flair Verifier Tool— Hackathon Submission
Inspiration
Managing user flairs in large or highly specialized subreddits can be a logistical nightmare. When specific flairs carry weight—such as "Verified Professional," "Trusted Contributor," or "Expert"—moderators need a reliable way to vet users before granting them these titles. Manually messaging users, asking for proof, and tracking who has been approved or denied is incredibly time-consuming, disorganized, and frustrating for both the moderation team and the community members. We were inspired to build a tool that completely automates and standardizes this gatekeeping process, bringing transparency to users and sanity back to moderators.
What it does
Flair Verifier is an advanced, automated user flair management application that acts as a comprehensive gatekeeping system. It streamlines flair management through three integrated systems:
- Deeply Configurable Mod Forms: Moderators select an existing flair and attach a custom verification form to it. They dictate exactly how many questions (1 to 50), the input types (Short Text, Long Text, Numbers, Yes/No, Dropdowns), and which are mandatory.
- Seamless User Application: Users simply select "Apply for Flair" from the subreddit menu and fill out the custom questions right within the Reddit UI.
- Interactive Mod Dashboard: Instead of cluttering modmail, moderators get a dedicated, interactive Custom Post. This "Review Hub" lists all pending applications, allowing mods to review answers, approve (which auto-assigns the flair), or decline with a single click.
- Automated Workflow & Anti-Spam: The app handles sending approval/decline modmails automatically, prevents duplicate applications, and enforces a strict 24-hour cooldown if a user is declined, preventing queue spamming.
How we built it
We built Flair Verifier entirely on the Reddit Devvit platform.
- Frontend/UI: We utilized Devvit's interactive Blocks framework to build the custom Review Dashboard post, complete with pagination, status filtering, and expandable detail cards. We used Devvit Forms to create the dynamic, multi-input application processes.
- Backend/Data: We heavily leveraged the Devvit Redis plugin for data persistence. We structured our data using Hashes to store application details and Sorted Sets to manage queues (Pending, Approved, Declined) and enforce our 24-hour anti-spam cooldown timers efficiently.
- Integrations: We hooked into the Reddit API via Devvit to automatically assign user flairs upon approval and to send clean, formatted Modmail notifications to users keeping them in the loop.
Challenges we ran into
- Dynamic Form Generation: Devvit forms are traditionally static. Building a system where a moderator could input a specific number (e.g., 20) and have a form dynamically generate exactly 20 distinct question slots with varying configurations required careful state management and temporary Redis caching to pass context between consecutive form submissions.
- Data Modeling for Pagination: Designing the Redis structure to support a fast, filterable, and paginated dashboard for potentially thousands of applications. We had to move away from simple key-value pairs and utilize Redis Sorted Sets to rank applications chronologically and filter them by status without loading the entire database into memory.
Accomplishments that we're proud of
- The Clean Modmail Philosophy: We are extremely proud of keeping the moderation workflow out of Modmail. While the app sends a single alert when an application is submitted, the actual review happens entirely on the Interactive Dashboard. This prevents messy back-and-forth threads and turns a chaotic moderation task into an organized checklist.
- Deep Configurability: The sheer flexibility of the form builder. Knowing that every subreddit is unique, allowing mods to tailor the exact number and type of questions per individual flair was a massive leap forward for the user experience.
What we learned
We gained a deep understanding of Devvit's component lifecycle and state management, particularly how to chain form submissions and pass context using short-lived Redis TTL keys. We also learned advanced Redis data modeling techniques specific to the constraints and capabilities of the Devvit environment to ensure the app remains highly performant at scale.
What's next for Flair Verifier Tool
- Bulk Actions: Adding the ability for moderators to select multiple applications on the dashboard and approve or decline them simultaneously.
- Devvit Web Migration: As the platform evolves, we plan to migrate the dashboard from Blocks to Devvit Web (React-based webviews) to provide an even richer, more complex user interface for moderators.
- Media Uploads: If/when Devvit supports it natively, allowing users to upload image proof (like a verified ID or certificate) directly within their flair application form.
Built With
- devvit
- node.js
- typescript
Log in or sign up for Devpost to join the conversation.