All projects

Case study

DealPrepare: an AI car buying advocate that shows its math

An AI car buying advocate: it reads the dealer’s quote, checks every fee, add-on and rate against real benchmarks, prices the car against live listings, and talks the buyer through what to say.

Role
Design, build and operations. Our own product, not a client engagement.
Running since
2026
Built with
Next.js, FastAPI, Supabase, Claude, Stripe

See it run

The report, the way a buyer sees it

A buyer uploads whatever the dealer handed them. Two minutes later they have a verdict with a dollar figure, the car's price against live listings, every fee against their state's average, every add-on judged on its own merits, the rate against their own pre-approval, and a sentence to say for each one. Then Miles, the chat, talks it through before they go back in.

What plays on the right is the real report components over a sample quote, served by dealprepare.com itself. When the product changes, this page changes with it.

How it is built

dealprepare.com · live
Live from dealprepare.com: the sample report the homepage plays, then the chat about it. Use the arrows to page through it.Open the full sample report

How it is built

A web app, a worker, and a database that enforces the rules

The shape is the one we recommend to clients: a thin web layer, a database that owns the constraints, slow work moved off the request path, and the AI calls wrapped in code that checks them. Nothing exotic, and every piece replaceable.

Frontend
Next.js 16, React 19 and Tailwind v4 on Vercel. Marketing pages and the reference library are static; the app shell is server-rendered.
Backend
FastAPI with SQLAlchemy 2.0 on Railway: a web service for requests and a separate worker (arq on Redis) for the scans, which take minutes. Without Redis the same code runs inline.
Data
Supabase PostgreSQL with row-level security, Supabase Auth (email and Google) and Supabase Storage with signed uploads, so documents never pass through the API server.
AI
Claude Opus 5 reads the documents and runs the live market research with web search; Claude Sonnet 5 is Miles, the chat, with a cached system prompt; Claude Haiku 4.5 runs the cheap price lookups.
Payments and email
Stripe Checkout for one-time products with webhook reconciliation of refunds and disputes; Resend for the results emails.
The sample deal report: a verdict card with four factor tiles, then the market price section with a range bar, a script to say, and three comparable listings

The sample report on dealprepare.com/scan/free: the verdict, then the market section. Every figure in it is computed by code from the quote.

The model reads. Code decides.

A language model is good at reading a messy dealer worksheet and bad at being consistent about money. So the model only extracts: the lines, the amounts, the printed rate. Every dollar on the report is then computed in code from reference data: the doc fee against a table of all fifty-one state averages, add-ons against benchmarks and the buyer’s own situation, the extra interest against the buyer’s own pre-approved rate. The savings figure is arithmetic, never the model’s impression, so the report, the chat and the email can never disagree. On the service side, a property test guarantees the read never loses or gains a printed dollar on any path.

Scans that cannot block the site.

An upload reserves the user’s entitlement with one conditional update, commits, and queues a job. The worker runs the document read while the market research runs on a parallel thread, and attaches both in the same commit. A scheduled reconciler fails out anything stuck and refunds exactly what was reserved. Two concurrent uploads can never spend one purchase twice.

Free tools with real cost controls.

The anonymous market check costs money per run, so it is budgeted per device, per connection and per day, with salted hashes rather than stored IP addresses. Results are cached for a week per vehicle, and a cached copy recomputes everything relative to the new visitor’s own price, so one person’s quote never shows up in another’s result.

Evaluated on real documents, not demos.

Every AI feature is tuned by replaying real production documents several times through the production code and reading the output the way the customer sees it: accuracy, speed, cost and whether a repeat run gives the same answer. That loop is how the figures below were measured, and it is the same method we use on client document work.

What we measured

Numbers from the eval loop, with their dates

These are engineering figures from replaying real documents through the production code, not marketing claims. Each is dated, because they move every time the method improves.

34 s

median live market lookup, from 156 s

The same accuracy, by asking for every search in one turn at a lower effort setting. Nine real cars, September 26, 2026.

35 s

per deal scan, from 40 to 88 s

By capping the model’s thinking budget and moving the arithmetic out of the prompt. Ten real dealer documents, three runs each, September 26, 2026.

0

dollar figures taken from the model’s own sums

Every amount on the report is computed in code from what the model read, so the report, the chat and the email cannot disagree. A property test guarantees the service read never loses or gains a printed dollar.

92

sourced reference pages

Fifty-one state doc fee pages, thirty-one service guides and ten add-on pages, each built from one reviewed data module with a last-reviewed date, so a fact changes in one place.

The same loop runs on client work. If a document pipeline matters to your business, this is how we tune it: AI and document automation.

A service quote check: $1,080 quoted across five services, $644 to $891 typical for the same work, $440 can wait, $451 could come off today

After the purchase

My Garage checks a service quote line by line: is the job on the manufacturer's own schedule at this mileage, is the price inside the typical national range, and is it an easy job to do yourself. The schedules are read from the makers' own documents and cached per car, so one owner's lookup serves the next. The service quote check.

The Illinois doc fee page: dealers in Illinois typically charge $347, with the title fee and typical registration beside it

The reference library

The same tables the scan judges against are published as pages anyone can read: the doc fee in every state, what each dealer add-on actually is, what the manufacturers' schedules call for at 30, 60 and 90 thousand miles. Each family is generated from one reviewed data module, so a correction lands everywhere at once. Doc fees by state.

Have a product like this in mind?

We build it the same way: data model first, slow work off the request path, and the AI checked by code. Discovery and planning cost nothing.