← Back to portfolio

PROJECT 02 • DATA PIPELINE • IN DEVELOPMENT

Receipt to Home Database

A self-hosted household system that turns receipts into structured purchase history for spending analysis, price comparison and inventory tracking.

PostgreSQLSQLn8nPaperless-ngxOllamaDocker

Why I am building it

I wanted a better view of household spending and a practical inventory tracker for everyday items. It is easy to walk into a store, forget what is already at home, spend more time than necessary and still leave without what we actually needed. Bank tools can show where money went at a high level, but they rarely explain exactly what was purchased, why the basket cost what it did or what the same item cost previously.

In a way, receipts tell a story. I want to uncover that story so my wife and I can make better household decisions with a budget-friendly, self-hosted system that either of us can use.

Questions I want the data to answer

Collecting data is not the goal by itself. The useful part is being able to answer practical household questions with history instead of guesses.

01

Is Costco actually worth it?

Compare membership-driven shopping against actual household purchase history.

02

Did buying in bulk save money?

Separate lower unit cost from simply buying more than necessary.

03

Was the specialty-store trip worth it?

Compare item prices while considering the extra trip cost and shopping pattern.

04

Where is this item usually cheaper?

Build product price history across stores and over time.

05

What do we already have at home?

Use inventory status to reduce forgotten items and duplicate purchases.

06

Where is household spending going?

Review spending by store, category, product and household attribution.

System architecture

The design separates document capture, automation, local AI extraction, structured storage, inventory and analytics. PostgreSQL is the authoritative structured source of truth; Paperless-ngx remains the document archive, n8n orchestrates the workflow, Grocy is the inventory side and Metabase is intended for analytical views.

Architecture diagram for the Receipt to Home Database project

On smaller screens, scroll the diagram horizontally to keep the labels readable.

Data quality before analytics

Receipt extraction is only the beginning. The workflow needs to preserve raw information, clean and validate extracted values, normalize products and aliases, resolve household attribution, detect duplicate processing and keep unresolved cases in review instead of silently pushing uncertain data downstream.

Raw

Preserve original OCR/extraction output for traceability.

Staged

Parse and clean values into a consistent structure.

Normalized

Validate, standardize, map and categorize records.

Analytics

Expose curated views for spending, price history and operational monitoring.

Database & workflow design

Receipts & line items

Separate receipt-level data from each purchased line item while retaining source-document references.

Canonical products & aliases

Map store-specific descriptions to reusable canonical products without duplicating the product catalogue.

Review & idempotency

Keep low-confidence or unresolved cases reviewable and prevent duplicate workflow actions.

Household attribution

Support household member, shared-household and guest/external attribution without losing unresolved splits.

Inventory outbox

Separate database completion from external inventory writes so synchronization can be retried safely.

Analytics views

Curated PostgreSQL views support spending, price history, review queues and processing health.

Visuals to add as the data grows

These spaces are intentionally reserved for real dashboards and charts once enough validated household history is available. No spending totals or accuracy metrics are fabricated.

FUTURE VISUALHousehold spending over time
FUTURE VISUALStore / basket comparison
FUTURE VISUALProduct price history
FUTURE VISUALInventory / restock snapshot

Skills demonstrated

PostgreSQLSQLData ModellingData QualityWorkflow AutomationData IntegrationAPI Integrationn8nPaperless-ngxOllamaProblem Solving