Skip to content

Repository files navigation

Scanvice

AI receipt and invoice scanner.
Upload a receipt image and get structured, exportable data back — powered by Claude vision.

License: MIT Next.js 16 React 19 TypeScript Tailwind CSS v4


Scanvice is a landing site plus an AI-powered receipt and invoice scanner. Upload a photo of a receipt, invoice or bill and the app calls Anthropic's Claude vision model to read it and return clean, structured JSON — vendor, transaction details, totals, line items, a category guess and a per-field confidence score — which is rendered in the UI and can be exported (e.g. to XLSX).

Features

  • Receipt/invoice extraction. POST /api/extract-receipt sends the uploaded image to Claude Sonnet 4.5 (vision) and returns structured data matching a typed ExtractedReceipt schema.
  • Rich structured output. Vendor info, transaction details, totals and an amount breakdown, itemised line items, a category guess and per-field confidence scores; low-quality images still extract with lowered confidence and warnings.
  • Rendered results. Vendor card, transaction details, line-items table, amount breakdown, confidence indicators and warning banners.
  • Export. One-click export of results, including XLSX (via SheetJS).
  • Server-side guardrails. Request-level rate limiting, image MIME-type and size validation (10 MB max), a request timeout, and metadata-only logging — receipt content is not retained.
  • Marketing site + blog. Landing sections (hero, problem/solution, trust, CTA) and an MDX-style blog, with SEO built in (sitemap.ts, robots.ts, dynamic OG icon).

Tech stack

Getting started

Requirements

1. Install

npm install

2. Configure environment

Create a .env.local file in the project root:

ANTHROPIC_API_KEY=sk-ant-...

ANTHROPIC_API_KEY is required — the extraction endpoint returns a server_misconfigured error without it.

3. Run

npm run dev      # http://localhost:3000

Build

npm run build
npm run start
npm run lint

How extraction works

app/api/extract-receipt/route.ts runs on the Node.js runtime. It validates the upload (accepted image MIME types, 10 MB limit), applies a per-IP rate limit, and calls the Anthropic Messages API with the image and a strict extraction prompt (lib/receipt.ts). The model returns JSON only, which is parsed into the ExtractedReceipt type and sent back to the client for rendering and export.

License

Released under the MIT License © 2026 Olivier Lüthy. You're free to use, modify and distribute this software, including commercially, as long as the copyright notice and license are included.

Author

Built by Olivier LüthyGitHub.

About

Next.js 16 landing site and AI receipt/invoice scanner that uses Anthropic Claude vision to extract structured JSON (vendor, totals, line items) from an uploaded image.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages