Local development

Day-to-day AXIS loop: Vite, Flask, Worker wrangler, endpoints, and plugin examples.

This page

Local development

Abstract

Local AXIS development is a multi-process topology. AXIS is a Solid app under Vite; evaluation usually hits Flask; optional cloud/storage/stream features hit the Worker.

Conceptual model

Diagram

Rendering…

Interface surface — commands

Bootstrap (CLI-first)

axis install   # app + worker + CLI
axis doctor    # missing worker/wrangler.toml is a warning until `axis setup`

Frontend (preferred product path)

bun run dev            # Vite + Solid → typically http://127.0.0.1:3000
# or: bun run axis dev

Desktop (optional Tauri shell)

bun run desktop:dev    # Vite + native window (see devops/desktop)
# or: bun run axis dev desktop

Flask Pro API (engine backend)

From the pyne checkout (sister repo; clone hoox-sh/pyne as ../pyne — the local directory is sometimes still named pynescript):

make -C ../pyne run   # Flask → :5002

Set PWA endpoint to http://127.0.0.1:5002 for the server engine. Workers Manager and Settings can probe this URL.

Worker

bun run axis dev worker   # http://127.0.0.1:8787
# or: cd worker && bun run dev

Point cloud storage / Worker endpoint at http://127.0.0.1:8787. For /api/run proxy, set Worker EXTERNAL_BACKEND=http://127.0.0.1:5002 (works on local wrangler; not on Cloudflare® edge).

AXIS CLI

Preferred operator entry for install / doctor / setup / deploy — see AXIS CLI:

bun run axis install
bun run axis doctor
bun run axis setup
bun run axis dev worker

Makefile helpers

TargetIntent
make run-frontendHistorical Bun static server (frontend/server.ts) on :8081legacy shell path
make worker-devWrangler dev
make worker-installInstall worker deps
make test-frontendBun unit tests under frontend/tests/

For the Solid product, prefer bun run dev / bun run build over the legacy server.ts unless you are debugging the old tree (legacy shell).

Internals — useful paths

PathRole
frontend/src/index.tsxApp entry
frontend/vite.config.*Vite / Solid plugin
frontend/src/engines/catalog.tsDefault engine endpoint
frontend/worker/wrangler.tomlLocal vars
frontend/public/plugins/Example modules served at /plugins/

Worked loop

  1. Terminal A: make run (Flask).
  2. Terminal B: cd frontend && bun run dev.
  3. Open Vite URL; set engine Server-Side, endpoint http://127.0.0.1:5002.
  4. Load mock-walk if venues are blocked.
  5. Optional Terminal C: Worker with ALLOW_OPEN_KEYS=1 for cloud library experiments.

Load an example plugin

With Vite or static server:

http://127.0.0.1:3000/plugins/example-coingecko-source.js

Manager → Plugins → Load from URL.

Invariants & edge cases

  1. CORS — Flask must allow the Vite origin; Worker pickOrigin allows :3000 and :8081.
  2. Pyodide local — needs vendor wheels under public/ (copied to dist on build).
  3. Two endpoints — topbar endpoint for engine vs cloud storage plugin config can differ (Flask vs Worker).
  4. Legacy Makefile message still mentions AXIS and :8081 Bun server.

Failure modes

IssueFix
Engine not readyFlask down / wrong port
CORS errorsAlign origins; see CORS
Plugin 404File only under src/plugins/ not public/plugins/
Worker scripts 401Set open keys or mint pn_ key

See also