No description
  • Rust 48.7%
  • TypeScript 23.3%
  • Svelte 22.6%
  • CSS 4.1%
  • Shell 1%
  • Other 0.3%
Find a file
microchipster 991f50aa46 ui
2026-07-23 10:28:08 -07:00
backend backlog from audit 2026-07-11 17:05:32 -07:00
crates support partner progressions 2026-07-12 15:49:44 -07:00
docs plot checkpoint 2026-07-16 14:04:24 -07:00
examples hardening backlog 2026-05-16 23:41:04 -07:00
fixtures/scenarios checkpoint 2026-05-27 10:34:35 -07:00
frontend ui 2026-07-23 10:28:08 -07:00
infra template 2026-03-28 23:43:51 -07:00
mk hardening backlog 2026-05-16 23:41:04 -07:00
.browserstack.yml do nothing template 2026-03-27 20:28:05 -07:00
.dockerignore do nothing template 2026-03-27 20:28:05 -07:00
.flake8 do nothing template 2026-03-27 20:28:05 -07:00
.gitignore coverage 2026-05-18 01:57:21 -07:00
backlog-methodology.md init 2026-04-16 13:22:32 -07:00
Cargo.lock backlog from audit 2026-07-11 17:05:32 -07:00
Cargo.toml fix top bar 2026-05-29 13:37:14 -07:00
CONVENTIONS.md do nothing template 2026-03-27 20:28:05 -07:00
devel.md info 2026-05-04 17:53:41 -07:00
Dockerfile checkpoint for housing scenarios 2026-05-11 21:34:53 -07:00
implementation-questions.md implementatino questions part 2 2026-04-16 13:55:57 -07:00
missing.md init 2026-04-16 13:22:32 -07:00
README.md support partner progressions 2026-07-12 15:49:44 -07:00
retirement-scenario.yaml great checkpoint 2026-07-05 19:22:20 -07:00
rust-toolchain.toml wasm template 2026-04-16 16:02:10 -07:00
tutorial.md info 2026-05-04 17:53:41 -07:00

retirement-wasm

This repository is now organized around a browser-local retirement planner:

  • frontend/ is a SvelteKit app that owns the UI shell
  • crates/retirement-sim-core/ is the shared Rust simulation core
  • crates/retirement-sim-wasm/ exposes that core to the browser through WebAssembly
  • backend/ is an Axum server that serves the static frontend and runtime config

The first implementation slice establishes the Rust workspace, WebAssembly build pipeline, worker boundary, and product shell. The real simulation model lands in the backlog notes under docs/unaddressed/notes/.

Current Architecture

  1. frontend/scripts/build-wasm.mjs builds crates/retirement-sim-wasm/ into frontend/src/lib/wasm/pkg/ with wasm-pack.
  2. SvelteKit imports that generated package from a dedicated Web Worker.
  3. The worker initializes the Rust-generated WASM module and exposes a typed handshake.
  4. The Axum backend serves /static/config.json, /healthz, and the built SPA bundle.

Model Guide

If you want the practical explanation of the form fields, monthly math, and known limits, start here:

  • docs/simulation-math.md - a succinct technical guide to the model, inputs, and caveats
  • docs/types.md - the shared payload shapes and cross-stack schema contracts
  • docs/TESTING.md - how to verify changes to the model and UI

Requirements

  • Node.js 24+
  • npm 11+
  • Rust 1.95.0 with edition 2024 support
  • the wasm32-unknown-unknown target

The repo pins the Rust toolchain in the root rust-toolchain.toml.

Local Development

Frontend:

cd frontend
npm install
npm run dev

Backend:

cargo run -p retirement-wasm-backend

The frontend dev server proxies /static and /healthz to the backend.

To start both together:

./mk/run-dev

Validation

Frontend:

cd frontend
npm install
npm run check
npm run build
npm run test -- --run

Rust workspace:

cargo test --workspace

Full wrapper:

./mk/test

Deployment Shape

The Docker image builds the frontend, compiles the Rust backend as a static binary, copies the built frontend into the runtime image, and serves everything from one process.

Backlog

Implementation routing lives in:

  • docs/unaddressed/notes/0000-retirement-app-routing.md

The next planned slices after the WASM pipeline are the shared domain schema, canonical assumptions, and the deterministic month-by-month household engine.