← All projectsTodos los proyectos

Personal project · 2026Proyecto personal · 2026

finance-copilot

The app I use to track my money. I log spending from my phone in a couple of taps, even with no signal, and it tells me how long my savings would last at my current pace.La app con la que llevo mis cuentas. Apunto un gasto desde el móvil en un par de toques, aunque no haya cobertura, y me dice cuánto me duraría el ahorro a este ritmo.

0
dependencies: standard-library Python and plain JavaScriptdependencias: Python estándar y JavaScript sin librerías
Offline
logging works with no signalapuntar funciona sin cobertura
  • Python
  • SQLite
  • JavaScript
  • PWA
  • Tailscale

The real app, recorded with sample data.La app real, grabada con datos de ejemplo.

The problemEl problema

My finances lived in an Excel workbook, and logging a purchase from the phone was clumsy, so whole months went unrecorded. I wanted to log a purchase in seconds, right when it happens, even with no signal.Mis finanzas vivían en un Excel, y apuntar un gasto desde el móvil era incómodo, así que se quedaban meses enteros sin registrar. Quería apuntar un gasto en segundos, en el momento, aunque no haya cobertura.

What I builtQué construí

  • A server in Python using only the standard library (http.server and SQLite), and a frontend in plain JavaScript with no build step.Un servidor en Python solo con la biblioteca estándar (http.server y SQLite) y un frontend en JavaScript sin paso de build.
  • An installable PWA with an offline queue: what I log without signal is sent once the connection comes back.Una PWA instalable con cola offline: lo que apunto sin cobertura se envía cuando vuelve la conexión.
  • Analysis: typical spending, fixed and variable costs, net worth, and how many months my savings would last.Análisis: gasto típico, fijo y variable, patrimonio y cuántos meses me duraría el ahorro.
  • Access from my phone through Tailscale, with signed cookies, CSRF protection and a pairing QR code from an encoder I wrote in pure Python.Acceso desde el móvil por Tailscale, con cookies firmadas, protección CSRF y un QR de emparejamiento de un codificador escrito en Python puro.

DecisionsDecisiones

Every entry has an id, and the server is idempotentCada apunte lleva un id y el servidor es idempotente

If the phone switches from Wi-Fi to mobile data with a request in flight, the retry would log the expense twice and nobody would notice. A unique index on the entry’s id makes the retry harmless.Si el móvil pasa del wifi a los datos con una petición en vuelo, el reintento apuntaría el gasto dos veces y nadie se daría cuenta. Un índice único sobre el id del apunte hace que el reintento no tenga efecto.

Medians, not meansMedianas, no medias

One month with stacked bills shouldn’t define a normal month. And months with no records are left out of every average instead of counting as zero spending.Un mes con recibos acumulados no debe definir lo normal. Y los meses sin registros quedan fuera de todas las medias en vez de contar como gasto cero.

No financial data in the browser cacheNingún dato financiero en la caché del navegador

The service worker caches the app and the category list only. Old figures that look fresh are worse than showing nothing.El service worker guarda en caché la app y la lista de categorías, nada más. Unas cifras viejas con aspecto de nuevas son peores que no enseñar nada.

How I check itCómo lo compruebo

Before any change, a script runs checks against the live server: login and CSRF, repeated writes, colour contrast computed from the stylesheet, and the PWA. Then I go through the offline cycle by hand: stop the server, log a few expenses, start it again, and check that each one arrives exactly once.Antes de cualquier cambio, un script pasa comprobaciones contra el servidor en marcha: login y CSRF, escrituras repetidas, contraste de color calculado desde la hoja de estilos y la PWA. Después hago a mano el ciclo offline: paro el servidor, apunto varios gastos, lo vuelvo a arrancar y compruebo que cada uno llega una sola vez.

What’s nextLo siguiente

  • An advisor agent that reads my data through tools and suggests what to change. It reads and advises; it never moves money.Un agente asesor que lee mis datos con herramientas y propone qué cambiar. Lee y aconseja; nunca mueve dinero.
  • Reading receipts from a photo, line by line.Leer tickets desde una foto, línea a línea.