DEV Community

Athul Jenson
Athul Jenson

Posted on

Inbox Zen: Privacy-First File Sorting with Local Gemma

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

"Inbox Zen" is a privacy-first AI agent that automatically categorizes and archives cluttered local files or emails overnight. It scans a designated "clutter" directory, reads the text, and intelligently sorts them into appropriate folders (like "Invoices", "Reading List", or "Personal Notes") using a local AI model. Finally, it generates a simple morning summary so you can wake up to a clean digital workspace without the dread of manually sorting files.

This directly targets the "Slow and Steady" theme: automating a tedious, repetitive daily chore.

Demo

Here is the live link to my daily "Inbox Zen" summary dashboard deployed on Render:
https://inbox-zen.onrender.com

(Note: If you visit, you'll see the latest summary of the files Gemma successfully sorted on my local machine!)

Code

You can find the full Python script and Flask server code in my GitHub repository here:
https://github.com/2AJ0/inbox-zen

How I Built It

I built this project completely manually focusing on a local-first approach to protect sensitive data:

  • AI Engine: I used Google's open-weight Gemma 2B model running completely offline via Ollama.
  • The Logic: A Python script uses the requests library to send file contents to the local Gemma instance, prompting it to strictly categorize the text. The script then uses shutil to move the files and generates a zen_summary.txt log.
  • Monitoring: I integrated the Sentry Python SDK to capture performance traces. I wrapped my main sorting function in a sentry_sdk.start_transaction() block and used .flush() to ensure trace data was sent before the script closed.
  • Deployment: I built a lightweight Flask web service to serve the text summary and deployed it directly from GitHub to Render.

Why Does Open Innovation Matter?

Open innovation is the absolute core of this project. Because I am dealing with personal files (like invoices or personal notes), sending this data to a closed, proprietary API in the cloud is a massive privacy risk. By utilizing an open-weight model like Gemma and running it locally with Ollama, my sensitive data never leaves my machine. It also means the tool is completely free to run with zero API costs, demonstrating how open-source AI democratizes powerful automation.

The Lazy Payoff

This agent saves me about 10-15 minutes of dragging and dropping files every single morning. More importantly, it removes the "digital tax" and mental friction of starting my day staring at a messy downloads folder. I just check my dashboard, see what was filed where, and start working.

Prize Categories

I am entering this submission for the following partner categories:

  • Best Use of Gemma (Primary focus: 100% local, privacy-first inference using Gemma 2B)
  • Render (Deployed the Flask summary dashboard)
  • Sentry (Integrated the Python SDK for performance tracing)

Top comments (0)