Designed in Figma, built for real. The Figma side of LedgerLens follows one claim from start to finish: one invoice, paid twice, $1,058. A clickable Figma Design prototype shows that claim in four states: Discover, Prove, Prepare, Review. An AI agent built it through Figma MCP, then read the Figma variables back out as design tokens committed to the repo; the paper and blue are the exact values the live app uses. Every stage, with its time, rating and what broke, is logged in my Figma Slides deck.
Inspiration
A small online shop runs on thin margins and nobody watches the books full time. A supplier raises a unit cost by a few dollars, an invoice gets paid twice, a $69 tool quietly becomes $119, and a product sits underpriced for months. No single one of these is dramatic, so nobody notices. Together they are thousands of dollars a year. I wanted an agent that does the watching, and that never asks the owner to trust a number it can't show the records for.
What it does
LedgerLens reads six months of a shop's sales and bank lines and lays every record out on one screen, one square each. An investigation then works through ten steps on its own. It finds the leaks, pulls live competitor prices with a custom Apify Actor, measures each leak in exact cents, and lights up the records each one rests on.
For every leak it prepares the fix: a refund request email, a plan review email, or a ready price change. The owner approves one at a time, and every decision goes to an audit log. For the seeded demo company, Acme Outdoor Co., it finds four leaks worth $4,286 a year:
- A duplicate supplier payment ($1,058 one-time)
- A bottle whose supplier cost rose 31.8% while its price stayed at $49 ($1,872/yr)
- An underpriced daypack ($756/yr)
- A software plan that rose from $69 to $119 a month ($600/yr)
A fast loop runs beside it. Each incoming payment is screened before it posts, and lookalike payees, reused invoice numbers, new bank details and unusual amounts are held at a gate. The owner sets the limits autopilot works inside. Ask your books answers questions with Claude through read-only tools. Each answer cites its records, and every dollar figure is checked against the tool results.
On Market check, the Actor crawls real retailer pages for a comparable 24L daypack. In the October 25 capture, Quest Outdoors, Al's Sporting Goods and Gregory all listed it in stock at $99.95. LedgerLens turned that into a $79 to $89 price test worth $90 a month, or $1,080 a year, if unit sales hold.
How I built it
- Convex is the whole backend. The schema has 18 tables. Every investigation step is a mutation, so each finding and approval reaches every open browser the moment it commits, with no polling. The engine runs as a Node action started through the scheduler, a daily cron starts a fresh investigation every morning, and payments are screened inside the mutation that receives them.
- Apify: a custom Actor (Actor ID
aidengrails/ledgerlens-competitor-pricing, opaque IDr1XmOWedMNF9AKMbr) built on Crawlee's CheerioCrawler. It extracts price, currency and availability from JSON-LD (including ProductGroup variants), meta tags, microdata and price selectors. It checks expected product-name tokens and rejects ambiguous prices. Pages it can't read go to a FAILURES record instead of producing a guessed price. Source and docs: apify/ledgerlens-competitor-pricing. - Claude plans which products are worth researching, writes the plain-English explanation of each finding, and runs the Ask agent's tool loop.
- Figma: the evidence-to-action flow (Discover → Prove → Prepare → Review) is a clickable prototype in Figma Design, built with an AI agent through Figma MCP, and its color variables were read back out as CSS tokens and committed to the repo (design/figma). The stage log deck documents each stage.
- Deterministic finance: a language model never calculates money. Every amount is integer cents from pure TypeScript functions. Model output is checked with Zod, any dollar figure it mentions must match the evidence, and it can move confidence by only a bounded amount.
- Next.js 15 on Vercel for the app, with no secrets in the client bundle; a verify step scans the built bundle to enforce that. There are 197 Vitest tests, and the investigation tests run the real Convex functions in memory through convex-test.
Challenges I ran into
- Making AI output safe to show next to money. Every model claim had to be traceable to a record, or the model's text was replaced.
- Real retailer pages are messy: variants in ProductGroup JSON-LD, sale and list prices run together, and pages with no currency. The Actor had to reject bad data instead of guessing.
- Keeping the demo honest. Fixture data, the sandbox storefront and real retailer captures are labelled differently everywhere they appear.
Accomplishments that I'm proud of
- Every number on screen can be traced to the records it came from.
- The whole loop works end to end on the live deployment: investigation, Apify crawl, Claude explanation, owner approval and audit trail.
- One person built the whole stack: data model, finance engine, agent, crawler and interface.
What I learned
An agent that handles money earns trust by showing its work, not by sounding confident. Splitting the work so code does the arithmetic and the model does judgment and language made both parts better.
What's next for LedgerLens
- Live connections to Shopify, Stripe and bank feeds in place of the seeded books.
- Price tests that measure the real sales response, instead of assuming unit sales hold.
- Multi-tenant accounts with authentication.
Built With
- anthropic
- apify
- claude
- convex
- crawlee
- figma
- next.js
- react
- tailwindcss
- typescript
- vercel
- vitest
- zod
Log in or sign up for Devpost to join the conversation.