Topologies

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

This page

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
Dev desk + sidecarVite :3000Flask :5002Bun sidecar :5003local

Topology A — Dev desk

Diagram

Rendering…

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

Diagram

Rendering…

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

Diagram

Rendering…

Deploy sketch

axis deploy
# or: cd worker && bun run deploy
cd frontend && bun run build
wrangler pages deploy dist --project-name=axis

Ids: Pages project axis at https://axis.hoox.sh; Worker script worker-axis at https://worker.axis.hoox.sh (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

Diagram

Rendering…

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

Topology F — Dev desk + Bun sidecar (CCXT Pro)

For users who want authenticated WS feeds from any CCXT-supported exchange without running Flask. The sidecar (packages/datafeed/) mirrors the PYNE datafeed gateway contract.

Diagram

Rendering…

bun run dev           # Vite :3000
bun run dev:datafeed  # Bun sidecar :5003
# in separate terminals, or combine in a Procfile

Gateway contract (same as PYNE datafeed):

EndpointMethodDescription
/datafeed/ohlcv?exchange=&symbol=&timeframe=GETHistorical OHLCV
/datafeed/markets?exchange=GETAvailable markets
/datafeed/watch?exchange=&symbol=&timeframe=WSLive bar stream
/datafeed/sessionPOSTStore credentials (RAM only)
/healthGETSidecar health

Notes: Credentials stay in RAM only (never persisted). The sidecar is optional — public venues work without it via direct browser WS.

Port map (defaults)

ServicePort
Vite dev3000
Flask Pro API5002
Bun datafeed sidecar5003
Static PWA server8081
Wrangler Worker8787

Comparison

ConcernA DevB StaticC EdgeD OfflineF Sidecar
HMRyesnonon/ayes
PWA SW realismpartialfullfullfullpartial
Multi-tenant keysnonoyesnolocal only
Ops complexitylowmediumhighlowlow
Fidelityhigh (Flask)highhigh via proxyengine-dependenthigh (CCXT Pro)

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
vite.config.tsDev/build
axis_pwa_server.pyStatic host
worker/wrangler.tomlCF name + bindings
packages/cli/AXIS CLI (setup / deploy / health)
worker/README.mdEdge ops

See also