Assets Tracker

NestJS · Prisma · BullMQ · Chrome Extension · TypeScript

A multi-repo personal finance system that pulls bank and broker statements from Gmail and bank websites, parses them and tracks holdings. A collaborative project: I worked on the statement parsers, corporate actions and data collection.

Collaborative project — a multi-repo system built with another engineer; I worked on the parsing, corporate-actions and data-collection layers.

Demo

01Architecture

Assets Tracker architectureStatements arrive from Gmail and from bank websites through a Chrome extension. A NestJS server runs a BullMQ pipeline (emails, attachments, parse) backed by Redis. Rule-based parsers handle statements first; files with no parser go to an LLM fallback and a manual review queue. Corporate actions adjust holdings inside FIFO using Yahoo and FinMind data. PostgreSQL on Neon stores everything and feeds the Next.js web app, Firebase cloud functions with a read-only MCP server, and a React demo app.NestJS server · BullMQGmailstatements (PDF/CSV)Chrome extensionadapters (MV3)Bank websitesCSV downloadsemailsattachmentsparseRedis · queueRule-based parserswith self-checksLLM fallbackheadless Claude CLIno rule-based parserManual review queueLLM resultYahoo · FinMindprices & actionsCorporate actionsFIFO · cost unchangedPostgreSQL (Neon)31 Prisma modelswebNext.js dashboardcloud_functionsFirebase · read-only MCP (7 tools)cloud_webReact + Vite · demo mode

Highlighted nodes: the parts I worked on.

02By the numbers

03Engineering decisions

01

Rule-based parser over LLM for system-generated PDFs, with self-checks

A broker's US-stock sub-brokerage statements are machine-generated, so a rule-based parser replaces the LLM. It parsed 106 statements with 0 errors, re-computes figures such as shares × price = market value, and checks the holding row count against the statement.

02

LLM output can never set cost basis

A cost parsed by the LLM is always discarded; only rule-based parsers may provide cost basis. PDFs without a rule-based parser go to a headless Claude CLI fallback, and the result waits in a manual review queue first.

03

Corporate actions inside FIFO without breaking cost

Stock splits, stock dividends and capital reductions (Yahoo and FinMind) adjust share counts inside FIFO while total cost stays the same; odd-lot refunds from a capital reduction are paid at par value. When an API rate-limits (402/429) each source pauses separately, and a failed stock gets a 24-hour cooldown.

04

Scraping an AngularJS SPA from a Chrome extension MAIN world

Chunghwa Post iPost is an AngularJS SPA, so the extension adapter runs in the MAIN world and calls the page's own functions to get the CSV. The same extension automatically downloads bank CSVs and uploads them to the server.

← All projects