rechemendia.com
EN / ES
Project
📁rechemendia.com
📁src
📁External Libraries
📁Scratches and Consoles

Aurum Finances

Multi-service personal finance platform with automated bank email imports, AI-powered insights, and real-time analytics.

Architecture

Three-service platform with contract-first API design — the entire API contract is defined in 14 Smithy IDL files and code-generated via Smithy4s, ensuring the Scala implementation is always in sync with the spec:

  • finance-api (Scala 3 / Http4s / Smithy4s / Doobie) — central hub: serves Clerk JWT-authenticated endpoints to the UI, exposes internal HMAC-SHA256 endpoints for finance-ml, manages PostgreSQL with Flyway migrations and Redis-backed rate limiting per user
  • finance-ml (Python / FastAPI / LiteLLM) — polls Gmail via IMAP/SSL with automatic Visa and Mastercard transaction parsers; hosts the AI chat bot with 13 tool-calling functions against the live API via OpenRouter (claude-haiku-4-5)
  • finance-ui (Next.js 15 / TanStack Query / Radix UI) — server-side proxy to the API, Clerk auth middleware, dark/light theming, internationalization

All services run in Docker Compose on a single cost-optimized AWS EC2 instance (scheduled 4PM–1AM Uruguay time via EventBridge + Lambda, reducing compute cost by ~70%), behind CloudFront + S3 for static assets and Route53 for DNS.

Key Features

  • Auto-ingestion pipeline: polls Gmail via IMAP/SSL, parses Visa/Mastercard transaction emails from Uruguay-standard formats, creates pending transactions for user review — multi-tenant with AES-256 encrypted credentials per org
  • AI financial assistant: conversational chat in Spanish (Rioplatense) with tool-based architecture — the LLM invokes 13 live API functions (accounts, transactions, budgets, trends, exchange rates) with SSE streaming responses and Redis session history
  • Multi-tenant org management: org-scoped data isolation via IOLocal context carrier through Scala fibers, org invitation flows, configuration-based onboarding pipeline, BYOK for LLM providers
  • Credit account management: installment tracking (quota groups) with auto-generated N sub-transactions respecting closing day rules, credit card payment linking
  • Budget planning: annual per-category budgets with planned vs. actual tracking and cross-currency consolidation
  • Multi-currency with live FX: real-time exchange rates from Frankfurter API, UYU/USD conversion, per-currency dashboard totals
  • Cost-optimized production: EC2 scheduler, CloudWatch monitoring, UptimeRobot alerts, autoheal Docker watchdog

Tech Stack

Next.js 15, React 19, TypeScript, Tailwind CSS, Radix UI, TanStack Query, React Hook Form, Zod, Scala 3, Http4s, Smithy4s, Doobie, Flyway, Python, FastAPI, PostgreSQL, Redis, Docker, AWS (EC2, CloudFront, S3, Route53, EventBridge, Lambda), Clerk Auth, LiteLLM, OpenRouter (claude-haiku-4-5), UptimeRobot

2:23
[T] 22:1 UTF-8 4 spaces ⑃ main 2334 of 4200M