Soroban is a browser-based financial planning sandbox built with TypeScript and Vite. It lets you model household cash flows with formulas, apply scheduled events over time, define taxable assets, and run Monte Carlo portfolio simulations directly in the browser.
- Creates planner variables such as
salary,rent, andgroceries - Defines recurring income and expense flows using formulas
- Applies dated events that can:
- change a flow formula
- adjust a variable with
m * x + b - add a new variable
- add a new flow
- create one-time expenses
- Models assets with:
- starting value
- expected annual return
- volatility
- optional cash generation streams
- optional sale tax basis and tax treatment
- pairwise correlations
- Configures household taxes and tax profiles, including built-in 2026 presets for NYC, every state, and DC
- Runs Monte Carlo simulations with percentile views, depletion probability, and representative scenario detail
- Persists planner state locally in IndexedDB
- TypeScript
- Vite
- Vitest
- Browser APIs: IndexedDB and Web Workers
- Node.js 18+
- Yarn 1.x
yarn installyarn devVite serves the frontend from web/, usually at http://127.0.0.1:5173 or http://localhost:5173.
yarn buildThe production build is emitted to dist/.
yarn testyarn devstarts the Vite dev serveryarn buildruns typechecking and creates a production bundleyarn previewpreviews the production build locallyyarn testruns the Vitest suite
- Open the app and review the default planner state.
- Add or edit variables, flows, assets, taxes, and scheduled events in the Setup view.
- Optionally load the NYC 2025 tax preset.
- Move to the Simulation view, choose the start year, horizon, and attempt count.
- Optionally adjust each asset's sell multiplier. A multiplier of
1sells in line with the asset's current portfolio weight. - Run the simulation and review percentile paths, depletion probability, and detailed example years.
package.jsoncontains scripts and tool metadatavite.config.tsconfigures Vite withweb/as the frontend rootweb/src/main.tscontains the application UI, state management, persistence wiring, and simulation orchestrationweb/src/finance.tscontains formula parsing, planner domain objects, and event logicweb/src/tax.tscontains the tax engine and default household tax profile logicweb/src/simulation.tscontains the Monte Carlo engine and percentile aggregationweb/src/simulation-worker.tsruns simulation work in browser workersweb/src/storage.tspersists planner data in IndexedDBweb/src/*.test.tscovers the formula engine, taxes, and simulation behavior
This app is a static Vite frontend, so the production deploy only needs the built files in dist/. Firebase Hosting is a better fit than Cloud Run here because it serves the built assets directly from a CDN, gives you default *.web.app and *.firebaseapp.com URLs, and supports custom domains with managed SSL.
firebase.jsonpoints Hosting at the builtdist/directorypackage.jsonincludes deploy and local Hosting commands
- Node.js 18+
- Yarn 1.x
- Firebase CLI installed locally
- a Firebase project linked to a Google Cloud project with billing if you expect usage beyond the free tier
Install the Firebase CLI if needed:
npm install -g firebase-toolsLog in and attach this repo to your Firebase project:
firebase login
firebase use --addThe second command creates a local .firebaserc file with your selected project alias.
From the repo root:
yarn deploy:firebaseThat builds the Vite app and deploys Hosting only. Firebase will print your public site URLs, usually PROJECT_ID.web.app and PROJECT_ID.firebaseapp.com.
yarn build
yarn serve:firebaseAfter the first deploy, connect your custom domain in the Firebase console under Hosting. Firebase Hosting provisions SSL certificates for custom domains and tells you which DNS records to create.
Typical flow:
- Open Hosting in the Firebase console.
- Choose
Add custom domain. - Enter the apex domain or subdomain you want to use.
- Add the DNS records Firebase gives you at your DNS provider.
- Wait for verification and certificate provisioning.
Official docs:
- https://firebase.google.com/docs/hosting/quickstart
- https://firebase.google.com/docs/hosting/full-config
- https://firebase.google.com/docs/hosting/custom-domain
- Authentication is currently a stubbed demo user defined in
web/src/auth.ts. - Persistence is local to the browser via IndexedDB. There is no backend sync, multi-user support, or server-side storage.
- The simulation operates on yearly snapshots and annual return assumptions.
- The simulation UI exposes built-in 2026 tax presets for NYC, every state, DC, and custom schedules.
- Simulations require at least one asset. By default, sales track current portfolio weights, and sell multipliers let you tilt that mix.
- Swap the IndexedDB storage implementation behind
createPlanningStorage()for a server-backed store without rewriting the rest of the app. - Replace the stub auth service with a real identity provider.
- Expand the domain model if the planner needs account wrappers, liabilities, or more detailed household planning behavior.