All projects

Chelito Negro

Dominican personal finance where Claude records the expenses, and all the money is counted in whole cents.

Open the app Open sign-up: create an account and try it.

The exchange till

In whole cents, like the app
410 × 60,250,000 ÷ 1,000,000RD$247.03
With floating point
247.02499999999998RD$247.02

The float loses 1 cent.

Bank tax of 0.2%: RD$0.49

Chelito Negro home screen on the phone: net worth, what is owned and owed, and the upcoming card and loan payments
Home: net worth and what is due this week.

Money, in cents

Pesos, dollars and euros, and no amount ever passes through a floating-point number: everything is stored in whole cents and rates in parts per million, so charging the bank tax on a transfer is an integer multiplication with explicit rounding.

The USD→DOP rate comes from a Central Bank cron every six hours, and payroll computes the end-of-month paycheck with the income tax (ISR) scale and the social security (TSS) caps as editable data, because they are law and they change.

Adding 0.1 ten times
0.9999999999999999
Adding 10 cents ten times
100 = RD$1.00
Ten ten-cent coins. Both sums are done by this page when it is built.
  1. 1

    Bank email

    The purchase notification arrives.

  2. 2

    Claude

    Reads it with its Gmail connector.

  3. 3

    create_transactions

    One of the MCP server’s 48 tools.

  4. 4

    The database

    Stores the approval reference and rejects a repeat.

Claude as the teller

Entering every expense by hand is what gets these apps abandoned. Here Claude does it: with its Gmail connector it reads the bank's notification and records the transaction by calling the MCP server's tools, from create_transactions to schedule_notification for the reminders you ask for in the chat.

In the cloud the connector registers itself with OAuth 2.1, dynamic client registration and PKCE. So that an email read twice does not count twice, each transaction stores the bank's approval reference and the database rejects a repeat on the same account.

Four screens, on the phone

Transactions screen: the month's expenses, income, net and the list of transactions with one pending confirmation
Transactions: the three figures at the top filter the list.
Accounts screen: net worth, what is owned and owed, and the upcoming payments to avoid interest
Accounts: each card with what to pay to avoid interest.
Statistics for the month: expenses against the previous month, financial cost and budget used
Statistics: this month against the last one, at the same height.

Screenshots taken with the demo database: the amounts, accounts and merchants are fictional. The app's interface is in Spanish.

One database, two homes

The same code runs on Node with better-sqlite3 and on Cloudflare inside the SQLite of a Durable Object, which the Worker calls over RPC. Drizzle applies the migrations on both sides when the database opens.

The Durable Object also holds the pages open over WebSocket: when Claude records something, the phone looking at Transactions updates on its own. The sockets hibernate, so while nobody writes the object sleeps without dropping them.

Offline too

It is a PWA with a service worker written with no dependencies. An expense made offline goes to a queue in IndexedDB and is sent when the signal returns with an Idempotency-Key header: if the response is lost and the request is repeated, the server returns the transaction already created instead of duplicating it.

Notifications are Web Push with no libraries: the VAPID signature and the aes128gcm encryption are done with WebCrypto and checked against the example in RFC 8291, because the same code had to work on Node and in the Worker.

Three expenses wait in the IndexedDB queue; two already arrived. If one is sent twice, its Idempotency-Key makes it count only once.

Counted from the repository

48
MCP tools
248
passing tests
38
pull requests
99
commits in ten days
  • Astro SSR
  • Svelte 5 · shadcn-svelte
  • Drizzle · SQLite
  • Cloudflare Workers · Durable Objects
  • MCP · OAuth 2.1
  • Web Push · PWA
  • Vitest

Let’s talk

Curious how something here is solved, or have a similar problem?