DEV Community

Imran Ghafoor
Imran Ghafoor

Posted on

DocuMind AI — Turning Receipts into Business Insights with Open-Weight AI

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

Managing business expenses should not require spending hours copying information from receipts, invoices, and scanned documents into spreadsheets.

That's the problem I set out to solve with DocuMind AI — an open-source, AI-powered document intelligence platform that transforms unstructured financial documents into organized, reviewable expense records.

The idea is simple: Upload → Extract → Review → Confirm → Analyze.

Instead of treating AI-generated information as automatically correct, DocuMind AI keeps a human in control of the final financial records.

What I Built

I built DocuMind AI for freelancers, solo entrepreneurs, and small business owners who spend valuable time manually organizing their expense documents.

The Problem

Imagine a freelancer managing dozens of receipts and invoices every month. Some documents are digital PDFs, others are scanned copies or photographs.

To prepare an expense report, they typically need to:

  • Open each document individually.
  • Identify the vendor, date, subtotal, tax, and total.
  • Manually enter that information into a spreadsheet.
  • Categorize expenses and prepare summaries.
  • Review everything again for mistakes.

Traditional OCR can recognize printed text, but it doesn't necessarily understand which numbers represent the subtotal, tax, or final amount.

And an LLM can make mistakes too — especially when documents are unclear.

My Solution

DocuMind AI combines open-source document processing with open-weight AI to automate much of this workflow while preserving human verification.

Key features include:

  • Smart Document Upload: Accept PDF, JPG, and PNG invoices and receipts.
  • Hybrid Text Extraction: Use PyMuPDF for text-based PDFs and Tesseract OCR for scanned documents and images.
  • Open-Weight AI Extraction: Convert raw document text into structured fields using a Groq-hosted open-weight language model.
  • Human-in-the-Loop Review: Compare AI suggestions against the original document, make corrections, and explicitly confirm results.
  • Field Provenance: Identify whether a value came from AI, an extraction template, or a manual edit.
  • Review Queue: Keep incomplete, failed, and unconfirmed documents organized.
  • Expense Dashboard: Explore confirmed expenses with search, filters, and category breakdowns.
  • Reports and CSV Export: Summarize spending by vendor, category, and month.
  • Reusable Extraction Templates: Customize the fields and defaults used for recurring document workflows.

One important design decision: A document does not contribute to financial totals until a user reviews and confirms it.

Who Would Pay for It?

The potential customers are freelancers, independent consultants, and small businesses that process receipts regularly but do not need a complex enterprise accounting system.

A possible SaaS business model would offer a limited free plan, with paid tiers for higher document volumes, persistent storage, advanced reporting, and team collaboration.

This is an initial business hypothesis, not a claim of paying customers or validated pricing.

The value proposition is straightforward: spend less time entering documents and more time running your business.

Demo

🚀 Launch DocuMind AI — Live Application

The application is deployed on Render, with a React frontend and a Flask backend running in a Docker container.

Demo Access Code: Demo_documind@678!

Try It Yourself

  1. Open the live application.
  2. Enter the temporary demo access code.
  3. Upload a fictional receipt or invoice (PDF, JPG, or PNG).
  4. View the text extracted using PyMuPDF or Tesseract OCR.
  5. Inspect the structured fields suggested by the AI model.
  6. Correct any values that need adjustment.
  7. Confirm the document and explore the Expenses and Reports sections.

Application Screenshots

Document Workspace

DocuMind AI document management workspace

AI-Powered Extraction

DocuMind AI extraction interface

Human-in-the-Loop Review

DocuMind AI review queue

Expense Dashboard

DocuMind AI expense analytics

Demo note: This is a temporary shared-access prototype.After Refresh the previous upload data removed.Please upload synthetic documents only. The free hosting environment uses temporary storage, and the backend may take a moment to wake up after inactivity. The demo currently limits uploads to 3 MB and PDFs to 3 pages.

Code

💻 GitHub — DocuMind AI

The repository includes the React frontend, Flask API, document-processing services, AI extraction integration, Docker configuration, tests, documentation, and Render deployment Blueprints.

Repository structure:

  • frontend/ — React, TypeScript, Vite, and Tailwind CSS application.
  • backend/ — Flask API, database models, validation, OCR, and AI services.
  • docs/ — Deployment guides, validation notes, and screenshots.
  • render-free.yaml — Temporary free-tier demo deployment.
  • render.yaml — Separate persistent production-oriented deployment configuration.
  • .env.example — Environment variable reference without committed secrets.

The project is open source under the MIT license.

How I Built It

DocuMind AI follows a layered architecture designed to separate document processing, AI inference, business validation, and the user interface.

1. Frontend — React and TypeScript

I used React, TypeScript, Vite, and Tailwind CSS to create a responsive dashboard.

The interface brings together document uploads, original-file previews, AI extraction results, review workflows, expense management, and reporting.

2. Backend — Flask and Python

The Flask backend exposes REST endpoints for managing documents, processing files, reviewing AI results, and generating reports.

SQLAlchemy provides database access. The temporary demo uses SQLite, while the repository also includes a separate deployment configuration for persistent infrastructure.

3. Document Processing — PyMuPDF and Tesseract

Not every PDF requires OCR.

DocuMind AI first attempts native PDF text extraction using PyMuPDF, avoiding unnecessary image processing when selectable text already exists.

If a PDF is scanned or an uploaded file is an image, Tesseract OCR extracts its text instead.

Tesseract is installed inside the backend's Docker image during deployment, so users do not need to install OCR software on their computers.

4. AI Extraction — Open-Weight Language Model

The extracted text is passed to OpenAI's open-weight GPT-OSS 20B model, served through the Groq API.

The model is instructed to identify fields such as:

  • Document type and vendor
  • Transaction date and currency
  • Subtotal, tax, and total amount
  • Expense category
  • Short transaction summary

The backend requests structured JSON, validates the returned fields, and handles missing or invalid values.

I deliberately kept AI inference behind a configurable provider interface instead of tightly coupling document processing to one proprietary model API.

5. Human Verification

This is the part I consider especially important.

OCR and language models can misread financial documents. An incorrect total should not silently become part of a business report.

DocuMind AI therefore separates AI suggestions from confirmed business records.

Users can inspect the original document, review extracted text, edit fields, and confirm the final result.

If AI extraction fails, the document can still be handled manually rather than being presented as successfully processed.

6. Deployment — Render and Docker

I deployed the application using Render:

  • Render Static Site: Hosts the React frontend.
  • Render Docker Web Service: Runs the Flask backend, PyMuPDF, and Tesseract.
  • GroqCloud: Serves the open-weight model through an external inference API.
  • Environment Variables: Keep API credentials and demo access secrets out of source control.

I also separated the temporary free-demo configuration from the more durable production-oriented configuration.

That distinction matters because a prototype should not pretend to provide the same storage guarantees or security controls as a production SaaS.

Processing Architecture

User uploads PDF / Image
          |
          v
     Flask Backend
          |
          v
  Document Validation
          |
          v
   Text Extraction
     /         \
 PyMuPDF     Tesseract
 (PDF text)    (OCR)
     \         /
          v
   Extracted Text
          |
          v
 Groq + GPT-OSS 20B
          |
          v
 Structured JSON Fields
          |
          v
 Backend Field Validation
          |
          v
 Human Review and Editing
          |
          v
   Confirmed Expense
          |
          v
 Dashboard / Reports / CSV
Enter fullscreen mode Exit fullscreen mode

What I Tested

I deployed the frontend and backend successfully and tested the application with a synthetic receipt.

The backend health endpoint reported the database and OCR engine as available, and the deployed document workflow was exercised through the browser.

This confirms the basic prototype workflow, but it is not a formal evaluation of extraction accuracy across diverse real-world invoices.

Why Does Open Innovation Matter?

I believe open innovation matters because useful AI products should not require every developer to train a model from scratch or depend entirely on a closed, expensive platform.

DocuMind AI demonstrates this through three decisions.

Open-Source Document Processing

PyMuPDF and Tesseract provide practical document-processing capabilities without requiring a proprietary OCR subscription for every uploaded file.

This helps keep the architecture accessible to independent developers and makes it easier to inspect and modify the processing pipeline.

Open-Weight AI Instead of a Closed-Model Dependency

GPT-OSS provides an open-weight foundation for the document-understanding stage.

Using Groq for hosted inference allowed me to build and deploy the prototype without running a large model locally. At the same time, the model configuration remains separate from the OCR and application logic.

This creates opportunities to experiment with different models, compare outputs, or adopt another compatible inference environment.

An important distinction: The current demo still sends extracted text to a hosted inference provider. It is not an offline or fully local application, and it does not claim that document text stays exclusively on the user's device.

Transparency Over Blind Automation

Open components make it easier to inspect how information flows from the uploaded file through text extraction, model inference, validation, and human review.

I wanted to build more than an impressive AI response screen. I wanted a workflow where the user can understand the source of a field and correct it before it affects financial reporting.

For financial document automation, I believe that distinction is essential.

What Comes Next

DocuMind AI is currently a working prototype rather than a production-ready financial platform.

Future improvements include individual user accounts, persistent encrypted document storage, background processing, duplicate detection, bulk uploads, accuracy benchmarking, and subscription billing.

My longer-term goal is to explore whether this could become an affordable document-to-expense service for freelancers and small businesses.

Prize Categories

Best Use of Render

I am entering Best Use of Render.

Render hosts both the application frontend and the containerized Flask backend, including the server-side OCR runtime. Its deployment configuration, environment management, and public hosting made it possible to deliver a working demonstration without requiring users to install the application locally.

The repository includes a dedicated render-free.yaml Blueprint documenting this deployment approach.


Final thought

Building DocuMind AI reinforced something important for me: an AI side hustle does not need to start with a massive model or a complicated platform.

It can begin with one repetitive, real-world problem, open technologies that make the solution achievable, and a practical workflow that people can understand.

DocuMind AI is my attempt to turn document clutter into useful, reviewable business information — one receipt at a time.

🚀 Try the Live Demo | 💻 Explore the Source Code

Top comments (0)