Inspiration

Most budgeting apps are good at explaining where money went, but they still leave users to answer the most important everyday question themselves:

Can I safely spend this money before my next payday?

A bank balance alone is not enough. Some of that money may already be needed for upcoming bills, planned investing, a minimum cash buffer, or irregular annual costs.

Generic AI assistants can explain financial concepts, but they should not be trusted to invent balances or calculate authoritative spending limits.

Dart Finance was created to close that gap: provide a direct spending decision whose calculation, assumptions, and evidence can be inspected.

What it does

Dart Finance calculates how much someone can safely spend during the current payday cycle after protecting:

  • upcoming bills and fixed costs;
  • planned investing;
  • a minimum cash buffer;
  • sinking funds and irregular commitments;
  • known uncertainty or stale data.

A user can ask a concrete question such as:

“Can I spend €80 on dinner this weekend?”

Dart returns a clear decision with:

  • Safe to Spend before the purchase;
  • the proposed purchase amount;
  • Safe to Spend after the purchase;
  • a Safe or Not safe verdict;
  • relevant obligations and warnings;
  • the assumptions that could change the result.

The public judge demo uses clearly labelled fictional data and requires no account.

It begins with an €80 purchase that is Safe. When the user confirms a previously inferred annual insurance bill, Dart recalculates the same scenario and changes the decision to Not safe, with an exact €69.10 shortfall.

How we built it

Dart uses a strict separation between financial truth and AI explanation.

All authoritative calculations are performed by a deterministic TypeScript engine using integer cents. Before any model is called, the engine has already calculated the verdict, balances, obligations, dates, shortfall, and before-and-after values.

GPT-5.6 Sol is used only at the explanation boundary. It turns the verified result into a clear answer, explains why the decision was made, and highlights what could change it.

GPT-5.6 cannot:

  • calculate or alter the financial outcome;
  • change the verdict;
  • rewrite authoritative balances;
  • introduce unsupported monetary values.

The model output is protected by:

  • a strict structured-output schema;
  • verdict and monetary-value equality checks;
  • numeric and currency consistency guards;
  • prompt-injection protection for imported labels;
  • bounded retry and timeout handling;
  • an explicit deterministic fallback.

If the provider is unavailable, malformed, contradictory, or unsafe, Dart preserves the deterministic result and clearly labels the fallback rather than hiding the failure.

The public demo endpoint accepts only a bounded purchase amount and one fictional assumption toggle. It rebuilds the synthetic scenario server-side, accesses no user account or database, performs no financial writes, rejects cross-origin requests, and applies rate limiting.

How we used Codex

Codex was used as an engineering collaborator across the existing TypeScript monorepo.

It helped us:

  • implement the structured spending-decision contract;
  • build the server-only OpenAI Responses provider;
  • create Ask Dart’s decision-card flow;
  • connect the decision to the “Why This Number” experience;
  • add deterministic fallback and model-output validation;
  • test provider failures and prompt-injection attempts;
  • build a secure public synthetic GPT path;
  • verify browser-level integration and API security;
  • create an opt-in live GPT-5.6 smoke-test harness;
  • investigate failures, harden edge cases, and prepare the final submission.

Codex was especially valuable because it could work across product code, tests, browser behavior, deployment evidence, and documentation while preserving one central rule: the deterministic engine remains the sole financial authority.

Challenges we ran into

The hardest problem was allowing an AI model to add meaningful value without giving it authority over financial facts.

We needed to prevent the model from:

  • changing a Safe decision into Not safe or vice versa;
  • introducing new monetary amounts in prose;
  • treating imported merchant or bill text as instructions;
  • exposing API keys or sensitive financial context;
  • making the public demo dependent on real user data.

Browser testing also uncovered a proxy-origin issue that type checking, builds, and unit tests had not detected. Later hosted verification revealed a currency-presentation edge case, which led us to strengthen the EUR-only explanation contract and validation.

Accomplishments that we are proud of

We built a decision experience where users do not have to trust an AI-generated number.

Every material financial value comes from deterministic code. GPT-5.6 explains the result but remains subordinate to the engine.

Users can inspect the calculation, challenge an assumption, and immediately see the same engine recalculate the outcome.

The implementation includes automated coverage across:

  • the web and mobile applications;
  • the core finance engine;
  • provider failure paths;
  • prompt-injection defenses;
  • public-demo isolation;
  • schema and monetary-value validation;
  • deterministic fallback behavior;
  • hosted GPT-5.6 integration.

What we learned

Explainability cannot be added as decorative text after a calculation. It must be enforced through architecture, contracts, evidence provenance, and failure handling.

We also learned that AI is most useful in sensitive financial products when its role is deliberately constrained.

The model should improve comprehension—not become an unverified source of financial truth.

What’s next for Dart Finance

The next step is to apply the same deterministic-authority-plus-AI-explanation pattern to recurring commitments and more complex spending scenarios.

We also plan to improve data freshness and explore secure bank connectivity while preserving the central principle:

Dart does not ask users to trust an AI-generated number. It shows the decision, the calculation behind it, and what could change it.

Built with

TypeScript, Next.js, React, Expo, pnpm, Turborepo, Supabase, Drizzle, Vitest, Playwright, Netlify, Codex, GPT-5.6 Sol, and the OpenAI Responses API.

Public demo:
https://deploy-preview-92--dartv2.netlify.app/demo

The demo uses fictional sample data and requires no login or credentials.

Built With

Share this project:

Updates