Back to Projects
Case StudyOCR Expense Workflow

IAET AI – OCR Expense Assistant

Next.jsAIOCRAPIOpenAI

A workflow-driven AI system that converts payment slip images into structured financial records.

Product Surfaces

Screens from the IAET AI workflow covering dashboard review, chat-based slip parsing, API structure, and the OCR parsing contract.

Financial Dashboard

Financial Dashboard

Summary view with expense, income, and balance cards, plus filters by date, transaction type, and category.

Chat-based OCR Interaction

Chat-based OCR Interaction

Users submit a payment slip and the assistant responds with parsed transaction data that can be confirmed into the expense workflow.

Expense Timeline Panel

Expense Timeline Panel

The application stores categorized transaction records such as food, transport, shopping, bill, transfer, and other for dashboard review.

Slip Parsing Result

Slip Parsing Result

OCR text is passed through an AI parsing route that returns only normalized JSON for the transaction fields.

Overview

IAET AI – OCR Expense Assistant combines OCR, AI parsing, and a structured expense tracking workflow. Instead of leaving users with raw OCR text, the system converts payment-slip content into normalized financial records.

The available source screenshots show a full-stack Next.js application with API-driven processing, OpenAI-backed parsing, dashboard summaries, transaction routes, and an OCR route that returns structured JSON.

Problem

OCR alone produces noisy and inconsistent text. Payment slips may contain mixed language, bank metadata, reference numbers, timestamps, and merchant names that are not directly usable for expense tracking.

Manual expense entry is repetitive and error-prone because financial data from slips does not naturally flow from image to validated record to dashboard.

Solution

OCR text is passed into an AI parsing layer using the OpenAI SDK. The OCR route prompt instructs the model to extract financial transaction data, correct common OCR errors, and return only valid JSON.

The parser normalizes output into a strict transaction schema and integrates the parsed data into the dashboard and transaction workflow.

Delivery Scope

OCR Endpoint

API route for receiving OCR text from payment slip processing.

AI Parsing

OpenAI-backed parsing layer that normalizes OCR text into transaction JSON.

Transaction Schema

Structured fields for item, amount, type, category, merchant, bank, datetime, and reference.

Dashboard UI

Financial summary and transaction review surfaces for processed records.

Transaction Schema

Fields visible in the OCR route schema from the provided source screenshots

item
string

Description of payment

amount
number

Normalized financial amount

type
income | expense

Transaction direction

category
food | transport | shopping | bill | transfer | other

Expense classification

merchant
string

Merchant or counterparty name

bank
string | null

Bank name when available

datetime
string

Datetime returned by the parser

reference
string | null

Reference number when available

API Structure

API areas visible from the source tree and route screenshots

app/api/ocr/route.ts

OCR parsing endpoint using OpenAI and strict JSON output.

app/api/ai/route.ts

General AI route visible in the source tree screenshots.

app/api/transactions

Transaction API area for stored expense records.

app/api/summary

Summary API area for dashboard totals and financial overview.

Operational Modules

  • OCR endpoint integration
  • AI parsing logic using the OpenAI SDK
  • Transaction schema validation through a strict JSON contract
  • Chat interface for user interaction and confirmation
  • Dashboard and financial summary UI
  • API routes for transactions and summaries

Results

  • Converted unstructured OCR data into usable financial records
  • Reduced manual effort in expense tracking
  • Created a consistent pipeline from image to structured data to dashboard
  • Improved reliability of financial categorization

Tech Stack

Based on the portfolio repo and the provided source screenshots; no separate IAET source directory was present in this workspace.

Next.js App RouterWeb Framework
TypeScriptApp Logic
OpenAI SDKAI Parsing
OCR RouteAPI Processing
JSON SchemaStructured Output
Transactions APIExpense Workflow
Summary APIDashboard Data
PWA ManifestApp Surface

Need an OCR expense workflow?

Let's discuss how I can help turn OCR output into structured, reviewable records for finance and operational workflows.