# How to Vibe Code Your Own ScanToExcel (and Stop Paying for It)

> Convert documents, receipts & invoices to Excel with AI

- Site: https://scantoexcel.ai
- Category: Document Processing SaaS
- Platforms: Web app, iOS app
- Verdict: **Solid side project** (72/100 vibecodeable)
- Estimated effort: 2-3 weeks part-time

## Verdict

You can build a fully functional personal version of ScanToExcel, but robust multi-page PDF document slicing and precise .xlsx number formatting will require patient prompt engineering.

Constructing the Next.js frontend, file dropzones, and database credit tracking takes very little time with modern AI coding tools. Calling a vision model like Claude 3.5 Sonnet to extract JSON data from receipts or invoices is also straightforward. However, you will hit friction when turning that JSON into a pristine, mathematically sound .xlsx file where currencies and numbers are actual values rather than text strings, and when processing messy 50-page bank statements without blowing past serverless timeouts or duplicating repeating table headers. Because the commercial tool costs around $40/month, building this is primarily a rewarding technical exercise rather than a financial necessity.

### What you can't replicate

- The app store distribution and active user base of 12,400+ scanned documents
- Optimized native mobile scanning optics and edge-detection filters

## What it does

AI-powered document extraction tool that converts physical or digital files into clean, editable spreadsheets like .xlsx, .csv, and .json.

### Core features

- Document drag-and-drop web interface supporting PDF, JPG, and PNG files
- Multimodal AI vision extraction mapping visual bounding boxes to table schema
- Native .xlsx spreadsheet generation with correct data typing (numbers, dates, currency)
- Multi-page PDF parsing, page slicing, and deduplicated header stitching
- Batch file uploads up to 20 files concurrently
- Developer REST API for programmatic document parsing and webhook callbacks
- User account page credit tracking and consumption metering

## The business

### Pricing

- Free: $0
- Page Pack — 50: $4.99
- Pro Plan: $39.99 / month
- API Plan: $59 / month

## The hard parts

- Reliably generating properly typed .xlsx files (ensuring numerical cells hold raw numbers, not string representations, so formulas evaluate)
- Chunking and orchestrating multi-page PDFs (such as 50-page bank statements) concurrently through vision LLMs without duplicating repeating headers across page boundaries
- Handling document noise including severe camera skew, low-light phone photos, messy handwriting, and irregular regional bank statement alignments
- Managing robust background processing queues for large batch uploads to prevent serverless execution timeouts

## How to vibe code ScanToExcel

### Prerequisites

- Node.js (free): Required runtime for executing the Next.js full-stack framework and package managers.
- GitHub (free): Source control and deployment pipeline integration.
- Anthropic API Key (Pay-as-you-go (~$3/M input tokens)): Provides the frontier vision model capabilities required for pixel-by-pixel document extraction.

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for bootstrapping full-stack features, setting up database schemas, and iterating through complex file-processing logic.

### Stack

- Frontend: Next.js with Tailwind CSS and Shadcn UI components
- Backend: Next.js Server Actions and API routes
- Database: Turso (serverless SQLite for storing user credits and scan history)
- Auth: better-auth
- Payments: Stripe (skipped for personal use, or use test keys)
- Other: Vercel AI SDK for structured LLM vision parsing, exceljs for generating native .xlsx files with correct cell data types, pdf2image / sharp for handling and splitting uploaded PDF pages into image frames

### Hosting

- Vercel (Hosting the Next.js frontend, API endpoints, and serverless execution routes.): $0-20/mo
- Turso (Serverless SQLite database for tracking user scans and remaining page credits.): $0/mo

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js project with Tailwind CSS and configure Turso with better-auth and Drizzle ORM to track user profiles and available page credits.

```
Create a new Next.js project configured with TypeScript, Tailwind CSS, and App Router. Set up Turso with Drizzle ORM to support user accounts and page credit tracking. Define a schema for 'users' (id, email, credits_remaining) and 'scans' (id, user_id, filename, status, created_at). Integrate better-auth for email/password authentication. Ensure all configuration files are complete and type-safe.
```

2. **Frontend Document Upload & Dropzone UI** — Build a responsive dashboard and drag-and-drop upload zone supporting JPEG, PNG, and multi-page PDF files with client-side preview rendering.

```
Build a dashboard page in Next.js featuring a drag-and-drop file upload zone supporting JPEG, PNG, and PDF files up to 5 pages. Display remaining user scan credits in the header. When files are dropped, validate file type and size on the client side, show a loading progress indicator, and pass the files to a server action for processing. Include a history table listing past document extractions with download links.
```

3. **PDF Slicing and Image Preprocessing Pipeline** — Implement server-side utilities using sharp and pdf2image to convert uploaded multi-page PDFs and images into standardized frames for the vision model.

```
Create a backend utility module in Node.js that accepts uploaded file buffers (PDF, PNG, JPEG). If the file is a multi-page PDF, use a library like pdf2image or pdf-parse to convert each page into a separate high-resolution image buffer. Ensure temporary files are cleaned up properly. Return an array of image buffers ready to be passed to the vision LLM extraction pipeline.
```

4. **Vision LLM Structured Extraction Engine** — Integrate the Anthropic API using Vercel AI SDK to analyze document layouts pixel-by-pixel and extract structured tabular data schemas.

```
Implement the document extraction engine using the Anthropic API and Vercel AI SDK. Send the processed document page image buffers to Claude 3.5 Sonnet with a detailed system prompt instructing the model to analyze the visual layout, recognize table structures, rows, columns, headers, and format numerical values and currencies correctly. Force structured JSON output matching a unified tabular schema (headers array, rows 2D array). Handle multi-page stitching by deduplicating repeating headers across page boundaries.
```

5. **Native .xlsx, .csv, and .json Exporter** — Build an export service using exceljs that converts the structured JSON extraction into a native, correctly-typed spreadsheet file.

```
Create a spreadsheet generation service using 'exceljs'. Given the structured tabular JSON from the vision extraction engine, generate a native .xlsx file. Ensure that numerical strings are explicitly cast and stored as numeric data types so Excel formulas (like SUM and AVERAGE) work immediately. Auto-fit column widths for readability. Also implement fallback endpoints to export the exact same data as clean .csv and .json files. Add download buttons for each format on the result review screen.
```

6. **Developer REST API & Webhook Notifications** — Build a protected REST API endpoint allowing programmatic document uploads and webhook callbacks for automated workflows.

```
Build a REST API route in Next.js (/api/v1/extract) protected by bearer token authentication. Allow external developers to POST a document file or image URL alongside their API key. Trigger the asynchronous PDF slicing and vision extraction pipeline, store the result, and dispatch a webhook notification to a registered callback URL upon completion. Return the structured JSON and download link for the generated .xlsx file.
```

### Cost vs paying

**Starting costs (one-time):**

- Domain name (optional): $12/yr
- Anthropic API starter credits: $10
- Total: ~$22 one-time

**Ongoing costs (monthly):**

- Vercel Hobby / Pro Hosting: $0-20/mo
- Anthropic Vision API usage (~100 docs): ~$3-5/mo
- Total: ~$5-25/mo

- Paying for the SaaS instead: $39.99 / mo (Pro Plan)
- Build time: 25-35 hours
- AI tool credits: $20 (Claude Pro)
- Break-even: 1 month of Pro subscription

## Sources

- [ScanToExcel Official Website & Home Page](https://scantoexcel.ai)
- [ScanToExcel Pricing Page](https://scantoexcel.ai/pricing)
- [Apple App Store - ScanToExcel Document Scanner Listing](https://apps.apple.com/us/app/scantoexcel-document-scanner/id6504535352)