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
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
| Target | Intent |
|---|---|
make run-frontend | Historical Bun static server (frontend/server.ts) on :8081 — legacy shell path |
make worker-dev | Wrangler dev |
make worker-install | Install worker deps |
make test-frontend | Bun 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
| Path | Role |
|---|---|
frontend/src/index.tsx | App entry |
frontend/vite.config.* | Vite / Solid plugin |
frontend/src/engines/catalog.ts | Default engine endpoint |
frontend/worker/wrangler.toml | Local vars |
frontend/public/plugins/ | Example modules served at /plugins/ |
Worked loop
- Terminal A:
make run(Flask). - Terminal B:
cd frontend && bun run dev. - Open Vite URL; set engine Server-Side, endpoint
http://127.0.0.1:5002. - Load
mock-walkif venues are blocked. - Optional Terminal C: Worker with
ALLOW_OPEN_KEYS=1for 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
- CORS — Flask must allow the Vite origin; Worker
pickOriginallows:3000and:8081. - Pyodide local — needs vendor wheels under
public/(copied to dist on build). - Two endpoints — topbar endpoint for engine vs cloud storage plugin config can differ (Flask vs Worker).
- Legacy Makefile message still mentions AXIS and
:8081Bun server.
Failure modes
| Issue | Fix |
|---|---|
| Engine not ready | Flask down / wrong port |
| CORS errors | Align origins; see CORS |
| Plugin 404 | File only under src/plugins/ not public/plugins/ |
| Worker scripts 401 | Set open keys or mint pn_ key |