跳到正文
DEV Community· Aayush Sharma·· 3 小時前AI 評分39

Receipt Raccoon:以本機 AI 管理收據和保養資料

Receipt Raccoon: A Local-First AI for the Receipts We Never Want to Find

AI 導讀

Receipt Raccoon 是一款以本機為先的收據及保養資料管理工具,使用 Gemma 3 和 Ollama 擷取收據資料、以自然語言搜尋收據。收據資料及原始檔案儲存在瀏覽器的 IndexedDB,AI 功能在本機運行,毋須使用託管 AI API。管理功能包括保養期限追蹤、重複收據提示,以及備份與還原。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

What I Built

Meet Receipt Raccoon 🦝 — a local-first receipt and warranty organizer built to solve a surprisingly annoying problem: finding the bill you need when you actually need it.

You buy a phone, an appliance, or a computer. You keep the receipt somewhere safe. Months later, you need it for a warranty claim, and suddenly that “safe place” is nowhere to be found.

I built Receipt Raccoon to make that process less painful.

Here's what it can do:

  • Read receipts with AI: Upload a supported receipt image and use Gemma to extract information such as the product name, seller, purchase date, amount, and warranty expiry date. You can review and correct the results before saving.
  • Find receipts with natural language: Ask questions such as “Find the refrigerator bill from last year” instead of trying to remember an exact filename.
  • Track warranties: See which warranties are active, expiring soon, or expired.
  • Detect potential duplicates: Get a warning when a receipt looks similar to one already saved.
  • Manage documents: Search, open, and delete receipts, clear the collection, and download or restore backups.

Receipt records and original files are stored in the browser's IndexedDB. The goal is to make keeping track of important purchases easier without requiring a complicated account or a cloud database.

Demo

Live website: Try Receipt Raccoon

Source code: GitHub — Receipt Raccoon

Video walkthrough

The hosted demo lets you explore the document-management interface, warranty tracker, and backup features.

One important detail: AI reading and natural-language search require Ollama running locally with the Gemma model. Those AI features are not enabled on the hosted Vercel demo, so they need to be demonstrated using the local application.

That separation is intentional. I wanted to make the interface accessible online without pretending that my computer's local AI service was available to everyone on the internet.

Code

The project is built with Next.js and TypeScript.

The main parts of the implementation include:

  • app/api/analyze-receipt/route.ts — handles receipt-image analysis.
  • app/api/search-receipts/route.ts — handles natural-language receipt search.
  • lib/receipts.ts — manages receipt records in IndexedDB.
  • lib/backup.ts — handles backup creation and restoration.
  • app/page.tsx — brings the receipt-management interface and features together.

Explore the complete implementation in the GitHub repository.

How I Built It

I built Receipt Raccoon with Next.js, React, TypeScript, and CSS. IndexedDB stores receipt information and the original documents locally in the browser.

For the AI features, I used Gemma 3 through Ollama, running on my own computer.

The receipt-reading flow sends a supported receipt image to the local application endpoint, which passes it to Ollama for analysis. The extracted fields are then placed into a form so the user can verify them against the original receipt before saving.

The search feature takes a different approach: it sends receipt metadata to the local Ollama service rather than sending the original bill images. The model helps interpret the user's question and identify matching receipts.

I also added deterministic duplicate-detection rules, warranty-expiry calculations, individual and bulk deletion, and JSON backup and restore.

One lesson from building this was that the AI model is only one part of the experience. The surrounding application needs to handle uncertain extraction results, storage failures, duplicate warnings, and recovery just as carefully.

Why Does Open Innovation Matter?

Receipts can reveal more than a purchase. They can contain names, addresses, transaction details, and information about the products someone owns.

That made local inference an important design choice for this project.

Because Gemma runs locally through Ollama, the local AI workflow can process receipt images on the user's own computer rather than requiring a hosted AI inference API. The natural-language search also uses local inference, with receipt metadata sent to the local service instead of the original images.

Once the model has been downloaded and installed, local inference can work without an internet connection, provided Ollama and the application are running correctly.

This approach also avoids per-request charges from a hosted AI API, although it still uses the computer's hardware and electricity.

Open-weight models give developers the flexibility to run models in their own environment and build around them. That makes experimentation possible without committing every inference request to one external service.

There are trade-offs. Local inference depends on the user's available hardware, and initial installation requires downloading the model. A hosted model may be more convenient on devices that cannot run AI locally.

For Receipt Raccoon, I chose the local approach because control over personal documents is part of the product, not just an implementation detail.

The Lazy Payoff

I haven't measured a specific number of minutes saved, so I won't invent one.

The intended payoff is simple: less time searching drawers, opening random files, typing purchase details manually, and trying to remember warranty dates.

A family could use Receipt Raccoon to keep appliance bills together. Someone replacing a phone could find the purchase details they need. And when a warranty is about to expire, the information is already organized.

The aim is to do a little organizing once and make future searches easier.

That's the kind of laziness I wanted to build for: not avoiding something important, but removing the unnecessary effort around it.

Prize Categories

Best Use of Gemma — Receipt Raccoon uses Gemma 3 for local receipt extraction and natural-language receipt search through Ollama.


Building this project reinforced something I appreciate about open innovation: useful AI doesn't always need to live behind a remote API. Sometimes the best solution is a model running on your own machine, doing a small but genuinely useful job.

Thanks for checking out Receipt Raccoon! 🦝

來源:DEV Community · dev.to