DEV Community

Cover image for ExpiryGuard — From "I'll Remember" to "Already Handled".
LOKESH BETHALA
LOKESH BETHALA

Posted on

ExpiryGuard — From "I'll Remember" to "Already Handled".

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built ExpiryGuard for my friend, who regularly has to keep track of warranties, subscriptions, important documents, product expiry dates, and renewal deadlines.

The problem isn't simply remembering dates. These dates are often buried inside receipts, warranty certificates, documents, product labels. By the time someone notices the deadline, it may already be too late.

ExpiryGuard turns scattered expiry information into prioritized actions.

A user can upload a document or image, speak naturally, scan a barcode of any product, or enter information manually. Google Gemma understands the unstructured information and converts it into structured expiry data. The application then validates the result, evaluates the urgency, prioritizes what needs attention, and stores it in MongoDB Atlas.

The core workflow is:

Capture → Understand → Validate → Prioritize → Act → Remember

For example, a user can upload a warranty certificate containing:

"Dell Inspiron 15. Purchased on 12 April 2025. Warranty valid until 12 April 2027."

ExpiryGuard extracts the relevant information, validates the dates, calculates the risk, and determines what action is required.

Instead of simply saying:

"This expires in 20 days."

ExpiryGuard answers:

"This needs your attention next — and here's why...."

Key Features:

  • Gemma-powered Document Intelligence — Extract expiry information from warranties, certificates, receipts, invoices, and other documents.
  • OCR + AI Pipeline — Upload an image instead of manually entering every field.
  • Voice Input — Describe an item naturally and convert it into structured information.
  • Barcode Scanning — Quickly identify supported products.
  • Smart Priority Queue — Classify items as Critical, High, Medium, or Low priority.
  • AI Expiry Briefing — Summarize what needs attention today.
  • Renewal & Action Workflow — Move from simply tracking an expiry to actually handling it.
  • Expiry Verification & Conflict Detection — Detect suspicious dates, conflicting dates, and other inconsistencies.
  • Duplicate Detection — Help prevent the same item from being tracked multiple times.
  • Natural-Language Smart Search — Ask questions such as "Which warranties expire in the next 60 days?"
  • Explainable Risk — Show users why an item received its priority.
  • Expiry Health Score — Provide a quick overview of how well important items are being managed.
  • Confidence-Based Confirmation — Uncertain AI extraction is shown to the user for confirmation instead of being blindly saved.
  • Smart Notifications — Remind users before important deadlines arrive.

The philosophy behind the project is simple:

Gemma understands. The backend validates. The risk engine prioritizes. MongoDB Atlas remembers. The user decides.


Demo

Live Demo: https://expiry-guard-frontend.onrender.com


Code

GitHub logo Lokesh11868 / Expiry_Guard

AI-powered expiry intelligence built for a friend, powered by Gemma, MongoDB Atlas, turning documents into smart reminders, risk insights, and renewal actions.

ExpiryGuard

An open-source AI-powered expiry intelligence system that turns everyday documents, products, warranties, subscriptions and certificates into actionable reminders before they become problems.


Problem

Important items expire silently. From warranties and passports to subscriptions and medicines, keeping track of expiration dates is a tedious manual task. When these dates are missed, it results in financial loss, wasted products, or significant bureaucratic headaches.

Solution

ExpiryGuard intelligently discovers, understands, tracks, and prioritizes expiration-related information hidden inside everyday items. It automatically determines the risk of expiration and suggests recommended actions, saving users time and preventing loss.

Key Features

  • Expiry Intelligence: Determines risk score and urgency based on item type and time remaining.
  • Action Recommendations & Renewals: Dedicated tracking for active workflows, renewals, and overdue tasks.
  • Smart Add Hub: Unified upload process through OCR, Voice, Barcode, or manual entry.
  • Natural-Language Smart Search: Instantly query and filter inventory using natural language…

The repository contains the complete frontend, backend, AI integration, database integration, and supporting services.


How I Built It

I built ExpiryGuard around Google Gemma, an open-weight AI model, as the core intelligence layer of the application. Instead of using AI as a separate chatbot feature, Gemma is integrated directly into the application's data and decision workflow.

The architecture follows:

ExpiryGuard architecture showing user inputs flowing through OCR and Google Gemma for structured expiry extraction, validation, risk analysis, MongoDB Atlas storage, and dashboard features.

Gemma as the Intelligence Layer

Gemma processes unstructured information and extracts useful fields such as:

  • Item name
  • Category
  • Purchase date
  • Expiry date
  • Expiry type
  • Confidence score

For example, a user can provide:

"Dell Inspiron 15. Purchased on 12 April 2025. Warranty valid until 12 April 2027."

Gemma converts this into structured information that the application can validate and store.

Gemma is also used for document understanding, natural-language search, and generating concise expiry briefings.

MongoDB Atlas as the Memory Layer

The validated information is stored in MongoDB Atlas, including expiry dates, categories, risk levels, confidence scores, action status, and other metadata.

This means the AI doesn't just answer once and forget. The extracted knowledge becomes persistent application data that can be searched, prioritized, monitored, and acted upon later.

AI + Deterministic Logic

I deliberately kept the final risk calculation outside the LLM.

Gemma understands the input, while the backend validates it and a deterministic risk engine calculates the final priority based on factors such as time remaining, expiry type, urgency, and action status.

This gives the system a safer and more explainable workflow:

AI proposes → Application validates → Risk engine decides → User confirms

The frontend is built with React, Vite, Tailwind CSS, and Chart.js, while the backend uses FastAPI and Python. OCR, barcode scanning, notifications, and observability are integrated around the core AI workflow.

The result is an AI-powered expiry management system where Gemma provides the intelligence, MongoDB Atlas provides the memory, and the application turns both into actionable decisions.


Why Does Open Innovation Matter?

Open innovation made it possible for me to build ExpiryGuard around a real problem without treating AI as a closed black box.

At the core of the application, Google Gemma transforms messy, real-world information from documents, voice input, and other sources into structured expiry data. Because the AI is integrated into my own application workflow, I can decide how its output is validated, stored, prioritized, and presented to the user.

This is especially important for ExpiryGuard because AI should understand the information, but it should not have complete control over the final decision.

The workflow:

Gemma understands → Backend validates → Risk engine decides → MongoDB Atlas remembers → User confirms

Open innovation also made it possible to combine different technologies around the same problem. Gemma provides the intelligence layer, while MongoDB Atlas provides the persistent memory layer that allows extracted information to become useful over time.

A closed AI API could provide an answer, but ExpiryGuard goes further by turning that answer into structured, persistent, searchable, prioritized, and actionable information.

Most importantly, open innovation lowers the barrier for developers to experiment, build, and create solutions for problems that may be too specific for existing products.

For me, that's the real value:

The model doesn't have to be the product. It can be the intelligence inside a product built for a real person.


Prize Categories

Best Use of Gemma

  • Google Gemma powers the core AI intelligence layer.
  • Converts unstructured documents, voice input, and user descriptions into structured expiry data.
  • Integrated directly into the workflow:

Unstructured Input → Gemma → Structured Data → Validation → Risk Analysis → Action

  • Gemma is an essential part of the product, not an add-on chatbot.

Best Use of MongoDB Atlas

  • MongoDB Atlas serves as ExpiryGuard's persistent memory layer.
  • Stores expiry dates, categories, AI confidence, risk levels, action status, and supporting metadata.
  • Makes AI-generated information persistent, searchable, prioritized, and actionable over time.

Best Use of Render

  • Render hosts the React frontend and FastAPI backend as separate services.
  • Provides the production environment for accessing the AI-powered expiry workflow remotely.
  • Deployment architecture:

React Frontend → FastAPI Backend → Gemma AI → MongoDB Atlas

Top comments (0)