A Temporal workshop for fintechs — fintech_devcon 2026 Tue, Aug 4 · 10:30am MT · Sheraton Denver · Aaron Junod, Trabian
We build a payment orchestrator that survives crashes, retries without double-charging, compensates when the bank says no, and waits for a human when the amount is big — and we break it on purpose, live, to prove it.
You need Node 20+, pnpm 9+, and the Temporal CLI:
# macOS
brew install temporal
# other platforms: https://docs.temporal.io/cli#install
git clone https://github.com/junoddev/temporal-payments-workshop
cd temporal-payments-workshop
pnpm install
pnpm preflight # ✅-checks node, pnpm, temporal cliNo laptop setup? Open this repo in GitHub Codespaces (badge: Code → Codespaces → Create) — the devcontainer installs everything, including the Temporal CLI.
# terminal 1 — temporal server + web ui on http://localhost:8233
temporal server start-dev
# terminal 2 — everything else: bank + ledger, worker, dashboard
pnpm dev
# terminal 3 — you
pnpm transfer 50.00pnpm dev starts three processes:
| process | what | where |
|---|---|---|
| services | mock bank + append-only ledger (Hono) | http://localhost:4000 |
| worker | Temporal worker — workflows + activities | task queue payments |
| web | workshop dashboard (React Router) | http://localhost:3000 |
Open the dashboard (localhost:3000) and the Temporal Web UI (localhost:8233) side by side. The dashboard shows your view (ledger, bank statement, balances); the Temporal UI shows the orchestrator's view (event history, retries, replays).
The mock bank misbehaves based on the cents of the amount, so the whole room can break things in sync:
| amount | the bank... | teaches |
|---|---|---|
$50.00 |
behaves | the happy path |
$50.07 |
posts the money, then returns 500 | retry ⇒ double-charge |
$50.09 |
posts the money, then hangs past your 30s timeout | the ambiguous timeout |
$50.13 |
rejects it (compliance says no) | compensation / sagas |
$2500.00 |
fine — but it's over the review limit | signals: human approval |
Doing this outside the live session? Open the repo in Claude Code and say
"be my workshop tutor." It reads CLAUDE.md + tutorial/ and walks you
through every segment Socratically — planting each idea, having you run it,
and never just handing you the answer. You still write the code; it guides.
Work through exercises/ in order. Fall behind? Jump to the finished state of
any exercise:
git stash && git checkout checkpoint-03 # for example| checkpoint | exercise | kills failure mode |
|---|---|---|
checkpoint-01 |
run the happy path | — |
checkpoint-02 |
kill the worker mid-transfer | 02 dropped transaction |
checkpoint-03 |
make sendToBank idempotent | 01 double-charge · 04 ambiguous timeout |
checkpoint-04 |
add the compensation path | 03 partial saga |
checkpoint-05 |
approval signals (stretch) | — |
main is the starter state. checkpoint-01/02 match it (those exercises
change no code); 03–05 add the fixes cumulatively.
apps/services the outside world: mock bank + ledger (Hono, one process)
apps/worker the temporal side: workflows.ts, activities.ts, worker.ts + CLI
apps/web the dashboard (React Router) — loaders query temporal directly
packages/shared types, chaos amounts, policy constants
exercises/ the five guided exercises
Useful commands:
pnpm transfer 50.13 --from alice --to carol # start a transfer
pnpm approve transfer-<id> [--deny] # signal a waiting workflow
pnpm ledger # ledger vs bank statement, in your terminal
pnpm reset # wipe bank + ledger stateWorkflow code must be deterministic — Temporal recovers a crashed workflow
by replaying its history, and every decision must come out identical. The
TS SDK sandbox catches most violations with an error containing
determinism — if you see one, you did one of these:
- ❌
Date.now(),new Date()→ useworkflow.now() - ❌
Math.random(),crypto.randomUUID()→ useworkflow.uuid4(), or pass values in - ❌
fetch/ db / fs / queue calls in a workflow → that's what activities are for - ❌
setTimeout→ useworkflow.sleep()(durable — survives restarts!) - ❌ mutating module-level globals, iterating
Set/Mapof non-deterministic content - ✅ activities can do all of the above freely — they run in plain Node
pnpm devshows red on services → is something else on :4000?- worker can't connect → is
temporal server start-devrunning? (pnpm preflight) - stuck workflow from a previous run → terminate it in the Temporal UI
(:8233), or
pnpm reset+ restarttemporal server start-devfor a clean slate. - dashboard shows "no worker?" → that's not an error, that's exercise 02.
- docs.temporal.io — genuinely good; start with the TypeScript SDK guide
- Versioning workflows already in flight:
patched()— real pain, deliberately out of scope today - Slides + speaker notes land in this repo after the session
- Questions, war stories: aaronjunod@trabian.com