Visualization platform, economic theory

Axioma

Economic theorems, interactive

A canon of economic theorems, each as a live visualization. Drag a slider, watch the math move. 72 pages across trade, macro, micro, game theory, and finance. Every page shows the formal statement, a Plotly chart fed by a pure compute(), parameter sliders, a short derivation, and a reference. No backend, no fabricated data, no sliders without math behind them.

72
Theorems
5
Domains
122
Automated tests
SPA
No backend

What each page promises

Statement, chart, sliders

One template, one template only. Every theorem renders the formal statement in KaTeX, a live Plotly chart, and parameter sliders that drive the chart through a pure compute(). No ad-hoc layouts, no novelty per page.

Typed theorem config

Adding a new theorem means writing one TypeScript file that exports a Theorem object with params, a pure compute function, a chart spec, math strings, and references. The registry does the rest.

No fabricated formulas

Every derivation cites a canonical source (Krugman, Barro, Varian, Mas-Colell, Cochrane, Hull). Formulas and closed-form solutions are checked against textbook derivations, not generated.

Static, fast, forever

Pure SPA: Vite build, Nginx static serve, Cloudflare in front. No databases, no auth, no backend to rot. The page you see is the code you run.

72 theorems, 5 domains

Each theorem is a single page at /{domain}/{slug}. Names below are entry points; the live app registry is the source of truth.

International Trade (13)

  • Comparative Advantage (Ricardo)
  • Heckscher-Ohlin, Stolper-Samuelson, Rybczynski
  • Factor Price Equalization, Gravity, Lerner symmetry
  • Specific factors (Ricardo-Viner), small-country tariff
  • Large-country tariff, Metzler paradox
  • Krugman monopolistic competition, Melitz cutoff

Growth & Macro (17)

  • Solow-Swan, IS-LM, Ramsey-Cass-Koopmans, Harrod-Domar
  • Golden Rule, OLG saving, Taylor rule
  • Mundell-Fleming, Phillips curve, AD-AS, money multiplier
  • IS-LM-BP, Tobin Q, Fisher two-period
  • New-Keynesian Phillips, Lucas supply, Laffer curve

Microeconomics (16)

  • Consumer Optimum, Edgeworth Box, Monopoly pricing
  • Slutsky, Roy, Shephard, Hicksian demand
  • Welfare theorems, Pigouvian tax, price discrimination
  • Hotelling duopoly, two-part pricing, Ramsey pricing
  • Monopsony, contestable market, Ramsey linear tax

Game Theory (13)

  • Nash 2x2, Arrow, Cournot, Bertrand, Stackelberg
  • Repeated prisoner's dilemma, Spence signaling
  • Second-price auction, Minimax, Bayesian Nash
  • Subgame perfection, Shapley value, VCG

Finance & Asset Pricing (13)

  • CAPM, Black-Scholes, Mean-variance frontier, APT
  • Modigliani-Miller, Merton bond discount, Put-call parity
  • Macaulay duration, Nelson-Siegel yield curve
  • Option delta, bond convexity, Merton equity, SML

Technology

Static single-page app. No server. Build artifacts ship to a VPS and sit behind Nginx plus Cloudflare. Unit tests cover each theorem's compute function; Playwright smoke-tests every route against a production build.

Vitebuild + dev
React 19UI
TypeScriptstrict
React Routerrouting
Plotly.jscharts
KaTeXmath
Tailwind v4styling
Vitestunit tests
Playwrightsmoke tests

One template, many theorems

The core contract is a typed Theorem: params, a pure compute function, a chart spec, math strings, and references. The same TheoremPage component consumes every theorem, so the visual language and interaction model stay identical across the catalog.

Theorem typed config: slug, domain, title, blurb, params, compute, chart, math, explanation, references
compute() pure function: (params) => ChartPayload | { error }. No fetches, no randomness.
TheoremPage renders formal statement, chart, sliders, intuition, derivation, example, references.
_register.ts imports each theorem and registers it under its slug.
Route /:domain/:slug resolves to the page; slug is the single source of identity.
Tests Vitest checks closed-form values and comparative statics. Playwright checks every route renders chart + math + sliders without console errors.

Get started

Clone, install, develop:

git clone https://github.com/deluair/deluair.git && cd deluair/axioma
npm install --legacy-peer-deps
npm run dev

Run tests and a production smoke suite:

npm test && npm run test:e2e

Ship to the VPS (same pattern as the rest of the Pantheon):

./deploy.sh

Full reference (adding a theorem, Nginx config, design rules) lives in the repo:

axioma/README.md