[Topologies]

AXIS deploy and dev topologies: Vite+Flask, static PWA, Cloudflare Pages+Worker, and offline Pyodide lab.

Topologies

Concrete process and network shapes for AXIS. Choose a topology; then compose plugins inside it (recipes).

Abstract

TopologyAXISCalcLiveLibrary
Dev deskVite :3000Flask :5002Binance WS directlocal
Static demoaxis_pwa_server :8081Flask or remotevenue / mocklocal
EdgeCF PagesWorker → FlaskDO fan-out optionalcloud
Offline labany AXISPyodidemock-polllocal

Topology A — Dev desk

Bring-up

make run
cd frontend && bun install && bun run dev

Notes: Vite may proxy /run; Settings endpoint can still point absolute at :5002. CORS must allow Vite origin.

Topology B — Static PWA + Pro API

cd frontend && bun run build
python3 axis_pwa_server.py
make run   # separate process

VPS demo pattern: systemd units for axis-pwa and pynescript-api; ALLOWED_ORIGINS includes AXIS origin.

Topology C — Cloudflare AXIS at the edge

Deploy sketch

cd frontend/worker && wrangler deploy
cd frontend && bun run build
wrangler pages deploy dist --project-name=pynescript-superchart

Frozen id: never rename pynescript-superchart lightly (ADR-008).

AXIS config:

  • Engine server, endpoint = Worker origin
  • Storage cloud, same origin + API key
  • Stream: direct venue or DO-backed plugin

Topology D — Offline lab

No Flask, no venue. Requires vendored pyodide + wheels on origin once.

Topology E — Git-centric research

Any of A–C for calc/data; storage axis = git. Forges are orthogonal network peers:

AXIS --storage:git--> api.github.com | gitlab
AXIS --engine:server--> Flask/Worker
AXIS --source--> venue or CSV

Port map (defaults)

ServicePort
Vite dev3000
Flask Pro API5002
Static PWA server8081
Wrangler Worker8787

Comparison

ConcernA DevB StaticC EdgeD Offline
HMRyesnonon/a
PWA SW realismpartialfullfullfull
Multi-tenant keysnonoyesno
Ops complexitylowmediumhighlow
Fidelityhigh (Flask)highhigh via proxyengine-dependent

Failure modes by topology

TopologyTypical break
AFlask not running; CORS localhost vs 127.0.0.1 mismatch
BStale SW; missing dist pyodide assets
CUnbound KV/D1; wrong project name; EXTERNAL_BACKEND down
DFirst visit offline; SPA fallback for wheels

Internals

PathRole
frontend/vite.config.tsDev/build
frontend/axis_pwa_server.pyStatic host
frontend/worker/wrangler.tomlCF name + bindings
frontend/worker/README.mdEdge ops

See also