Skip to content

About

Receipt manager system that process data and sends them through email.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

Intelligent Receipt Management System

AI and automation application that processes digital receipts (images and PDFs), extracts key data via OCR, manages states in a database, and coordinates approval flows through interactive emails.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Acknowledgments

About The Project

This application automates receipt processing and approval using modern Computer Vision and AI technologies. It facilitates the receipt lifecycle from reception to final resolution.

Key Features:

  • Intelligent Processing: Text extraction from images and PDFs and identification of fields (Amount, Date, Vendor) using Tesseract OCR and RegEx.
  • State Management: SQLite database to track the lifecycle ("In Process" → "Approved" / "Rejected").
  • Interactive Notifications: HTML email delivery with functional buttons to approve or reject receipts directly.
  • RESTful API: Backend built with FastAPI to upload files and handle decision Webhooks.
  • Audit: Automatic recording of timestamps and justification comments.

(back to top)

Built With

  • Python
  • FastAPI
  • Tesseract
  • SQLite
  • SQLAlchemy

(back to top)

Getting Started

Follow these steps to set up the project locally.

Prerequisites

  • Python 3.8 or higher.
  • Tesseract OCR: Must be installed on the operating system.
    • Windows: Download installer here. Important: Select "Spanish" (spa) language in "Additional script data" during installation.
  • Poppler for Windows: Required to convert PDFs to images. Ensure the path matches POPPLER_PATH in ocr_engine.py.
  • Gmail Account: With a generated "App Password" for email sending.

Installation

  1. Clone the repo
    git clone https://github.com/jerichd4c/receipt-manager.git
  2. Create and activate virtual environment
    python -m venv venv
    .\venv\Scripts\Activate  # Windows: .\venv\Scripts\Activate, Linux/Mac: source venv/bin/activate
  3. Install dependencies
    pip install -r requirements.txt

Configuration

Create a .env file in the root (based on .env.sample) and configure your variables:

Variable Description Example
DATABASE_URL DB connection string sqlite:///./receipts.db
SMTP_SERVER Email server smtp.gmail.com
SENDER_EMAIL Your email (sender) youremail@gmail.com
SENDER_PASSWORD App Password (16 characters) abcd efgh ijkl mnop
API_URL Base URL where the API runs http://localhost:8000
EMAIL_GERENTE Email that will receive requests manager@example.com

(back to top)

Usage

  1. Start the server:
    python run.py
  2. Access the interface: Open your browser at http://127.0.0.1:8000/docs to see the Swagger UI.
  3. Full Flow:
    • Upload a receipt via POST /api/upload.
    • Receive email notification with decision buttons.
    • Click "Approve" or "Reject" and verify the state change in the database.

For more details on the architecture, check ocr_engine.py and notifications.py files.

(back to top)

Acknowledgments

(back to top)

About

Receipt manager system that process data and sends them through email.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages