← Israel Gayoso

MoraLife

A financial digital twin for every family.

MoraBanc Hackathon 2026 Andorra, 7–8 November Open source (AGPL 3.0)

Most banking apps tell you what already happened. Families in Andorra want to know what happens next: can we buy a home, where, when, and what if one of us stops working for a year? Today that answer is a spreadsheet, a hunch or an appointment.

MoraLife builds a model of the household (income, spending, savings, debts, goals) and lets the family, or their advisor, try decisions before making them. Ask "can we buy a home?" and you get an answer you can check: an engine simulates a thousand possible futures, and a copilot explains them in Catalan, Spanish or English.

Home screen: net worth, where the family can buy, and goals Copilot answering 'And in La Massana?' with engine figures
Home and copilot on Android. Every figure in the answer comes from the engine.

The one rule: the AI never makes up a number.

A financial answer that sounds right but isn't is worse than no answer. So the work is split in two. A deterministic engine does every calculation. The language model only decides which engine tool to call, with which parameters, and then explains the result. If the model is down, the app opens the same scenario as a pre-filled form and the numbers are identical.

Simulate on iPad: 75% probability of buying, fan chart of 1,000 futures and what-if levers
Simulate on iPad: probability of getting there, a fan chart of 1,000 futures, the "bad year" line and the levers that change the outcome.

Architecture.

  iPhone / iPad      Android       Web          Other agents
  (TestFlight)       (APK)         (CloudFront)  (MCP)
        \              |              |            /
         '------- API Gateway (demo key, throttling) ------'
                 |       |       |        |       |
                api   engine   chat    import    mcp
                 \       |       |        |       /
                  '---- moralife_engine (numpy) --'
                         |               |
                     DynamoDB      Amazon Bedrock (Claude + guardrail)

There is one engine and every Lambda imports it, so the app, the copilot, the advisor view and the MCP server always agree.

The engine

moralife_engine is a pure-Python package with no I/O: a 360-month cash-flow ledger in euro cents and a seeded 1,000-path numpy Monte Carlo. It samples inflation (AR(1)), salary growth per earner, a 3 % yearly chance of a six-month income loss, lognormal fund returns, house prices and 12-month Euribor for variable mortgages. Same inputs and seed, same result, every time.

On top of that sit affordability (effort over 35 % is not viable), a life plan that funds goals in order, proactive insights, a mortgage readiness score, and a lever search that finds the smallest change (save 50 € more, wait, another parish, a longer term) that gets you to 80 %.

The copilot

Claude on Amazon Bedrock, called with tool use 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, and the Lambda's IAM role can invoke only the specific models it needs. Chat or voice, in three languages, with read-aloud.

The MCP server

The same engine exposed as tools for other agents. A property portal, for example, can ask whether a customer pre-qualifies for a flat, with their consent, and get a verdict without ever seeing a balance.

Infrastructure.

Everything is Terraform with Terragrunt: one AWS region, one production environment, five small modules.

dataDynamoDB tables (on demand, point-in-time recovery, TTL) and a data bucket.
apiHTTP API with a demo-key authorizer, stage throttling (20 req/s, burst 40), the Python Lambdas, IAM and logs.
webPrivate S3 behind CloudFront with origin access control and an ACM certificate for the custom domain.
ci_roleGitLab OIDC provider plus separate plan and apply roles.
runnerThe EC2 GitLab runner that runs every pipeline.

A few decisions I'd make again:

CI on our own runner

Pipelines ran on a dedicated c7a.4xlarge (16 vCPU, 32 GiB) with the Docker executor, eight jobs at a time. It has no inbound ports: the registration token lives in SSM Parameter Store and shell access is through SSM Session Manager. In a two-day hackathon, fast feedback is the whole game, and shared runners were the bottleneck.

Every merge request runs the engine, services, app and infra tests plus a Terraform plan posted back as a comment. Nothing reaches main without a green pipeline. Merging to main applies the infra and, when the app changes, exports the web build, syncs it to S3 (bundles cached for a year, HTML never) and invalidates CloudFront.

One app, every screen.

Expo, Expo Router and TypeScript for iPhone, iPad, Android and the web from one codebase. Charts are react-native-svg, so they look the same everywhere. The app also ships an in-process mock of the API, so every screen works offline, which matters on stage.

Advisor client book ranked by mortgage readiness Branch mode welcome screen on iPad
The same app on the advisor's iPad: a client book ranked by mortgage readiness, and branch mode, where a walk-in answers six questions and gets an answer on the spot.

Delivery and the demo setup

In numbers.

Principles.

All data is synthetic. Mortgage terms are illustrative and are not MoraBanc conditions.