Inspiration

In Mexico, most young people save $0 for retirement — not because they don't want to, but because no one tells them how much they can safely save. Meanwhile, invisible "leak spending" (delivery, subscriptions, impulse buys) eats their margin, and banks deny them credit for having no history, even when their cash flow is healthy. We built AlcancIA for HackMTY 2026 – Capital One Track 1 to close that loop.

What it does

AlcancIA (AutoAfore Agent) is an installable mobile PWA that turns your bank transaction stream into action:

  • Safe-to-Save™ — calculates what you can save this month without changing your lifestyle.
  • Leak detection — flags anomalous spending (e.g. delivery 32% over your average) with merchant, amount, and badge.
  • 1-tap AFORE contribution — reallocates e.g. $500 MXN to voluntary AFORE savings via POST /operation (TRANSFER → AHORRO).
  • Cash-flow credit scoring — every contribution boosts your solvency score (+15 pts), rewarding behavior, not history.
  • Agent console — radical transparency: every decision (ANALYZE, ALLOCATION, AGENT[step]) is logged and traceable to the transaction that caused it.
  • Bilingual ES/EN, dark/light, offline shell — real native-app feel.

Flow: Detect → Recommend → Contribute → Validate solvency.

How we built it

Frontend (this repo): Nuxt 4 (app/ dir) + Nuxt UI v4 + Tailwind v4 semantic tokens + Pinia (single useFinancialStore source of truth) + @vite-pwa/nuxt (standalone, autoUpdate, Workbox precache).

Backend: Node API on Render — Capital One Nessie-style enterprise API. Frontend calls Nuxt proxies in server/api/* (/analyze, /analyze/recommendation, /operation, /dashboard, /analytics) with Bearer auth_token cookie, so secrets never hit the client.

Key logic:

  • pages/index.vue:onMountedstore.fetchAnalyzeAndRecommendations() (month range ±1 day) → hydrates metrics, aforeProjection, recommendationResource.
  • hydrateRecommendationResource() maps recommendation.allocation.to_vault_mxn → recommendedAfore, projection.with_agent_mxn → chart, discretionary[] → leaks, agent_log[] → console.
  • executeAforeTransferViaOperation() does optimistic UI + score bump + cajita balance update.
  • useAgentEngine simulates live Nessie stream client-side for demo liveliness.

Challenges we ran into

  1. Render cold starts (30-50s): first /analyze looked broken. Fixed with loading states + warm-up call on /login + mock fallback so app never crashes.
  2. Shape drift: backend returns nested resource:{cash_flow, vault, scores, leaks, recommendation, rationale, discretionary, projection, agent_log} — built tolerant hydrators (hydrateAnalyze, hydrateRecommendationResource) supporting snake_case + camelCase + legacy flat.
  3. Nuxt UI v4 gotchas: UProgress:model-value (not value), UModal:v-model:open, semantic colors only (bg-default/text-muted), theme locked in app.config.ts (emerald/mist).
  4. Single-scroll mobile shell: avoided double-scroll with h-dvh / h-[844px] + one overflow-y-auto slot wrapper + iOS safe-area padding.
  5. Demo determinism: needed a seeded demo user with visible leaks and Safe-to-Save > 0 for judges in under 10 seconds.

Accomplishments that we're proud of

  • End-to-end live flow: login → real /analyze → 1-tap TRANSFER → score +15 → history + solvency update, all in <10s once warm.
  • Auditable AI: judges can trace every recommendation to its transaction + LLM step log.
  • True PWA: installable, offline shell, shortcuts ("Aportar", "Movimientos"), iOS splash + icons.
  • Fully bilingual product (ES/EN) with persisted locale.
  • Zero-crash philosophy: every fetch has mock fallback.

What we learned

  • Cash-flow underwriting is more inclusive than history-based scoring — and explainability is what earns trust.
  • PWA + Nuxt server proxies = secure mobile fintech without a native app.
  • Hackathon UX rule: if a judge doesn't get value in 10 seconds, you lost — hence Safe-to-Save™ first, charts later.
  • Tolerant API clients beat strict contracts during a live hack.

What's next for AlcancIA

  • Real Nessie SSE/WebSocket streaming (replace setInterval mock).
  • Push notifications on leak detection.
  • Offline persistence (IndexedDB) for txns + pending contributions.
  • Multi-cajita goals + real AFORE onboarding (CONSAr).
  • Recurring auto-pilot rules ("save 50% of every leak recovered").
  • Bank dashboard for cash-flow risk scoring API.

Built With

Share this project:

Updates