Inspiration
All of our emails have been affected by unwanted mailing lists constantly filling up our inboxes and making it a hassle to search for the emails we want to read, so we made a tool to help with it.
What it does
It first prompts the user to sign in with their google account, and grant the permission for the website to access emails. Once logged in, it retrieves the past 100 emails and sends each emails sender, header and snippet to open router, which then returns whether or not these look like spam. The emails are organised by sender so that its clear who the main culprit is. Any emails flagged by the AI are selected in the UI by default. Then the user presses a button to unsubscribe all selected newsletters, and we handle the rest
How we built it
We built the frontend using Next.js (App Router) with TypeScript, Tailwind CSS, and Material UI for the user interface. Instead of using NextAuth, we implemented a custom Google OAuth flow to securely access Gmail data with the required permissions.
For AI processing, we integrated OpenRouter, which allows us to route prompts to large language models for tasks like identifying newsletter emails and extracting unsubscribe information from email content. The backend handles Gmail data retrieval, AI‑assisted parsing, and unsubscribe metadata extraction, while the frontend focuses on presentation, user interaction, and state management.
Challenges we ran into
Debugging Google OAuth and handling access tokens without NextAuth Managing environment variables and credentials across frontend and backend Handling the wide variety of unsubscribe formats used by different newsletters Integrating OpenRouter effectively and designing prompts that returned consistent results Coordinating work across multiple developers within a short hackathon timeframe
Accomplishments that we're proud of
Successfully building a custom Google OAuth flow without relying on NextAuth Integrating OpenRouter to add AI‑powered email classification Extracting unsubscribe data reliably from real‑world emails Designing a scalable and reusable frontend component structure Splitting frontend responsibilities cleanly across the team
What we learned
- How OAuth works at a lower level when not abstracted by libraries like NextAuth
- How to integrate OpenRouter and design effective AI prompts
- The importance of clear data contracts between frontend and backend
- How quickly configuration and authentication issues can impact development time
- How to collaborate efficiently under hackathon constraints
What's next for Bulk Unsubscriber
More advanced AI classification using OpenRouter for higher accuracy Support for additional email providers (Outlook, Yahoo) Inbox cleanup analytics and progress tracking Scheduled scans and smart unsubscribe recommendations
Log in or sign up for Devpost to join the conversation.