Skip to content

A Ruby on Rails API for managing receipts, payments, and photos, with OCR text extraction using Tesseract OCR.

Notifications You must be signed in to change notification settings

WilliamPerezBeltran/receipts_api

Repository files navigation

receipts_api

Public Repository – Developed by William Pérez Beltrán

receipts_api is a Ruby on Rails API application for managing receipts, payments, and photos. The API includes OCR text extraction functionality and integrates with Tesseract OCR for text recognition from images.

Features

  • Create and manage receipts with associated payments and photos
  • Text extraction using Tesseract OCR
  • PostgreSQL or SQLite support for development
  • RESTful API endpoints for receipt management
  • Example JSON responses in json_examples

Ruby Version

  • Ruby 3.x (as specified in .ruby-version)

System Dependencies

  • Rails 7.x
  • Tesseract OCR (for text extraction)

Installing Tesseract OCR

On Linux:

sudo apt-get install tesseract-ocr

On MacOS (with Homebrew):

brew install tesseract

Configuration

  • Configure database in config/database.yml
  • Supports PostgreSQL for production and SQLite for development

Database Setup

rails db:create
rails db:migrate
rails db:seed # optional

Running the Test Suite

rspec
# or
rails test

Running the API Server

rails server

The API will be available at http://localhost:3000

Services

  • Tesseract OCR for text extraction
  • Rails ActiveJob (optional) for background tasks

Deployment Instructions

  • Make sure PostgreSQL is installed on the production server
  • Set environment variables for database credentials
  • Precompile assets if needed:
rails assets:precompile
  • Start the server using rails server or a web server like Puma or Passenger

Author

William Pérez Beltrán

About

A Ruby on Rails API for managing receipts, payments, and photos, with OCR text extraction using Tesseract OCR.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •