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.
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.
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.
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 %.
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 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.
Everything is Terraform with Terragrunt: one AWS region, one
production environment, five small modules.
| data | DynamoDB tables (on demand, point-in-time recovery, TTL) and a data bucket. |
|---|---|
| api | HTTP API with a demo-key authorizer, stage throttling (20 req/s, burst 40), the Python Lambdas, IAM and logs. |
| web | Private S3 behind CloudFront with origin access control and an ACM certificate for the custom domain. |
| ci_role | GitLab OIDC provider plus separate plan and apply roles. |
| runner | The EC2 GitLab runner that runs every pipeline. |
A few decisions I'd make again:
main can assume the apply role.services/<name>/, with numpy vendored in. A placeholder handler is deployed until a service exists, so infra could ship before the code did.
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.
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.
main to S3 and CloudFront.All data is synthetic. Mortgage terms are illustrative and are not MoraBanc conditions.