Skip to content
Back to search

moralife

A financial digital twin for every family: Expo app, Monte Carlo engine, copilot and MCP server. MoraBanc Hackathon 2026.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/igayoso--moralife/badge.svg)](/listings/igayoso--moralife)

HTML

<a href="/listings/igayoso--moralife"><img src="/api/listings/igayoso--moralife/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 169 lines
  1. <div align="center">
  2. # MoraLife
  3. **A financial digital twin for every family.**
  4. Ask "can we buy a home?" and get an answer you can check: a real engine simulates a thousand possible futures, and the copilot explains them in Catalan, Spanish or English.
  5. [Try it on the web](https://moralife.gayoso.me) · [Android](https://moralife.gayoso.me/android.html) · [Get the app](https://moralife.gayoso.me/get.html) · [Pitch deck](https://moralife.gayoso.me/slides/) · [Demo videos](#demo-videos)
  6. MoraBanc Hackathon 2026 · Andorra · 7–8 November 2026
  7. </div>
  8. <p align="center">
  9. <img src="docs/images/home.jpg" alt="Home: net worth, parish comparison and goals" height="520">
  10. &nbsp;
  11. <img src="docs/images/copilot.jpg" alt="Copilot answering a home purchase question on Android" height="520">
  12. </p>
  13. ## Why
  14. Most banking apps tell you what already happened. Families in Andorra want to know what happens next: can we buy, where, when, and what if one of us stops working for a year? Today that answer is a spreadsheet, a hunch or an appointment.
  15. MoraLife builds a model of the household (income, spending, savings, debts, goals) and lets the customer, or their advisor, play with decisions before making them. Every number on screen comes from a deterministic, tested engine. The AI never makes up a figure: it chooses which engine tool to call and explains the result.
  16. ## What it does
  17. | | |
  18. |---|---|
  19. | **Home answer** | Compares parishes for the home the family wants: viable now, viable from a given month, or not viable, with the monthly payment and effort rate. |
  20. | **Copilot** | Chat or voice. "And in La Massana?", "What if Verónica works part time?", "How much would we need to earn?" Claude on Amazon Bedrock picks engine tools and their parameters; the answer quotes only engine numbers. If the model is unavailable, the app opens the same scenario as a pre-filled form. |
  21. | **Simulate** | Sliders for size, parish and date. Monte Carlo over 1,000 futures shows the probability of buying, a fan chart, the "bad year" line and the smallest change that gets you to 80 %. |
  22. | **Life plan** | Every goal (emergency fund, trips, car, university, home) on one timeline, funded in order. Shows which goals push the home back and by how much. |
  23. | **Talk to your future self** | The customer at 65 answers in the first person, by voice or text, from the life plan: which goals happened, net worth at 65 in today's euros, and "what if I save €100 more a month from today?" as a second line on the chart with the gain. The numbers come from the engine; if the model is unavailable, the same numbers come back as a fixed answer. Opens from Life plan or the copilot. Answers play even with the iPhone silent switch on, and the future self speaks with a male voice when the device has one. |
  24. | **My twin** | Household, income, spending by category and recurring payments, built from card transactions categorised at import. |
  25. | **Advisor view** | The same app on the advisor's iPad: client book ranked by mortgage readiness, risk flags, a suggested conversation and an illustrative product match. |
  26. | **Branch mode** | A walk-in answers six questions on the office iPad and gets an answer on the spot; the advisor opens it like any other client. |
  27. | **MCP server** | The engine as tools for other agents, for example a property portal asking whether a customer pre-qualifies, with consent, without ever seeing the balance. |
  28. <p align="center">
  29. <img src="docs/images/simulate.jpg" alt="Simulate: probability, fan chart and levers on iPad" width="49%">
  30. <img src="docs/images/life-plan.jpg" alt="Life plan timeline on iPad" width="49%">
  31. </p>
  32. <p align="center">
  33. <img src="docs/images/advisor.jpg" alt="Advisor client book with readiness scores" width="49%">
  34. <img src="docs/images/branch.jpg" alt="Branch mode welcome screen on iPad" width="49%">
  35. </p>
  36. <p align="center">
  37. <img src="docs/images/future-self.jpg" alt="Talk to your future self: Israel at 65 and the saving-more line" height="520">
  38. </p>
  39. ### Demo videos
  40. Short silent screen recordings of the pitch demo, in Spanish, recorded on the iPhone and iPad simulators against the live backend. They are the backup if the live demo cannot run.
  41. | # | Clip | What it shows |
  42. |---|---|---|
  43. | 1 | [Home](docs/videos/01-inicio.mp4) | The Gayoso family: net worth, where they can buy, goals. |
  44. | 2 | [Copilot](docs/videos/02-copiloto.mp4) | "¿Podemos comprar un piso de 100 metros en La Massana?": viable, €2,816 a month, 34.8 % effort. |
  45. | 3 | [A thousand futures](docs/videos/03-mil-futuros.mp4) | Simulate: 75 % probability, moving the date later, fan chart and the bad-year line. |
  46. | 4 | [Life plan and future self](docs/videos/04-plan-yo-futuro.mp4) | What pushes the home back, then Israel at 65: "¿Y si ahorro 100 € más al mes desde hoy?" gives +€31,100. |
  47. | 5 | [Branch mode](docs/videos/05-modo-oficina.mp4) | A walk-in answers six questions on the office iPad and the advisor gets the summary. |
  48. | 6 | [Advisor view](docs/videos/06-gestor.mp4) | The client book with today's visit, the walk-in's suggested conversation and the Gayoso file. |
  49. The copilot question is typed rather than dictated, and the read-aloud voice is not in the recordings (the simulator records no audio). The MCP closer is not recorded; slide 9 of the deck carries the same Laia figures.
  50. ### Demo households
  51. All data is synthetic. Mortgage terms are illustrative and are not MoraBanc conditions.
  52. - **The Gayoso family**: Israel and Verónica (42), Celia (13), Gala (8) and Oliver (5). Renting in Andorra la Vella, €7,700 net a month between both, €160,000 saved and invested; they want a 100 m² flat.
  53. - **Laia Puig** (29): single, renting, €4,100 net a month, wants 60 m² in Sant Julià de Lòria.
  54. - **About 20 advisor clients**, each built from the card history of the public IBM TabFormer transaction dataset, categorised at seed time.
  55. ### Languages
  56. The app is trilingual: **Catalan** (default), **Spanish** and **English**, including copilot answers, voice dictation and read-aloud. Strings live in `app/i18n/{ca,es,en}.json`; Catalan is the source.
  57. ## Architecture
  58. ```mermaid
  59. flowchart LR
  60. subgraph Clients
  61. A[iPhone / iPad<br/>TestFlight]
  62. B[Android APK]
  63. C[Web<br/>moralife.gayoso.me]
  64. D[Other agents<br/>via MCP]
  65. end
  66. A & B & C --> G[API Gateway<br/>demo key + throttling]
  67. D --> G
  68. G --> L1[api]
  69. G --> L2[engine]
  70. G --> L3[chat]
  71. G --> L4[import]
  72. G --> L5[mcp]
  73. L1 & L2 & L3 & L4 & L5 --> E[(moralife_engine<br/>Python + numpy)]
  74. L1 & L2 & L3 & L4 --> DB[(DynamoDB)]
  75. L3 & L4 --> BR[Amazon Bedrock<br/>Claude + guardrail]
  76. C -.-> CF[CloudFront + S3]
  77. ```
  78. - **One engine, everywhere.** `moralife_engine` is a pure-Python package: a 360-month cash-flow ledger in euro cents and a seeded 1,000-path numpy Monte Carlo (inflation, salary growth, income loss, fund returns, house prices, Euribor). Same inputs and seed, same result. Every Lambda imports it, so the app, the copilot, the advisor view and the MCP server always agree.
  79. - **AI that operates a real engine.** The copilot uses Bedrock tool calling over `simulate_scenario`, `check_affordability`, `required_income`, `get_life_plan`, `get_insights` and `get_readiness`. Parameters are validated before the engine runs. A Bedrock guardrail sits in front.
  80. - **One app, every screen.** Expo + Expo Router + TypeScript for iOS, iPadOS, Android and web from one codebase. Charts are `react-native-svg`, so they render the same everywhere. The app ships with an in-process mock of the API, so every screen also works offline.
  81. - **Infrastructure as code.** Terraform + Terragrunt, one `production` environment, applied by GitLab CI through OIDC (no AWS keys stored). CI runs on our own EC2 runner.
  82. ## Repository
  83. ```
  84. app/ Expo app (iOS, iPadOS, Android, web) → app/README.md
  85. engine/ moralife_engine: ledger, Monte Carlo, goals → engine/README.md
  86. services/ Lambda handlers: api, engine, chat, import, mcp
  87. seed/ demo households built from the IBM dataset
  88. infra/ Terraform + Terragrunt, CI roles, runner → infra/README.md
  89. tools/ dataset subsetting
  90. slides/ pitch deck (HTML, rendered to PDF in CI)
  91. ```
  92. ## Run it locally
  93. ```bash
  94. # Engine
  95. (cd engine && python3 -m venv .venv && .venv/bin/pip install -e ".[dev]" && .venv/bin/pytest)
  96. # Services (Lambda handlers)
  97. python3 -m venv .venv && .venv/bin/pip install -e "engine[dev]" boto3 && (cd services && ../.venv/bin/pytest)
  98. # App (runs against a built-in mock API by default)
  99. (cd app && npm install && npm test && npm run typecheck)
  100. (cd app && npm run web) # http://localhost:8081
  101. ```
  102. To use the deployed API, create `app/.env.local` with `EXPO_PUBLIC_API_URL` and `EXPO_PUBLIC_DEMO_KEY` (see `app/README.md`).
  103. ### Connect an agent over MCP
  104. ```bash
  105. npx -y mcp-remote https://mcp.moralife.gayoso.me/mcp --header x-demo-key:<demo-key>
  106. ```
  107. Clients that cannot send headers, such as a ChatGPT custom connector (Settings → Connectors → Developer mode → Create), put the key in the path instead: URL `https://mcp.moralife.gayoso.me/mcp/k/<demo-key>`, authentication "No authentication". A wrong or missing key gets 401 on both routes. Treat that URL like the key itself.
  108. Tools: `prequalify_home`, `check_affordability`, `simulate_scenario`, `get_readiness`, `get_household`, `get_life_plan`, `get_insights`.
  109. ## Delivery
  110. | Where | How |
  111. |---|---|
  112. | Web | `main` deploys to S3 + CloudFront at <https://moralife.gayoso.me> |
  113. | Android | EAS build, newest APK always at <https://moralife.gayoso.me/android.html> |
  114. | iPhone / iPad | EAS build to TestFlight, link on <https://moralife.gayoso.me/get.html> |
  115. | Backend | `infra:apply` on `main` |
  116. Every merge request runs the engine, services, app and infra tests plus a Terraform plan; nothing reaches `main` without a green pipeline.
  117. ## Principles
  118. - **Simulation, not prediction.** We say "7 out of 10 futures get there", never "you will".
  119. - **Every number is explainable.** The engine computes; the model only chooses and explains.
  120. - **Privacy first.** Synthetic data only, no banking credentials, no personal data in logs. External agents get verdicts, never balances.
  121. - **Not advice.** No transactions, no real mortgage approvals, no regulated investment recommendations.
  122. ## License
  123. Copyright (C) 2026 Israel Gayoso
  124. MoraLife is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. See [LICENSE](LICENSE) for the full text.
  125. Built for the MoraBanc Hackathon 2026. All demo data is synthetic. Transaction histories derive from a subset of the public IBM TabFormer synthetic credit card dataset (`seed/ibm_transactions.csv.gz`), which stays under its own terms. Fonts: Outfit and Source Sans 3 (SIL Open Font License). Third-party packages keep their own licences, listed in `app/package.json`, `engine/pyproject.toml` and `services/pyproject.toml`.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.