The face of the real thing.
Leptos SPA for the honba Indian-equities platform. Talks to honba-ya over
HTTP; shares wire types via honba-kokoro-types. The app directory mirrors the
web/ frontend of NoFxAiOS/nofx
(Vite + React + TS), translated to Rust/Leptos. Visual design follows the Bitfinex
Honey Framework UI design system (bfx-hf-ui-core) with a 256-color named design
token palette.
honba-kao-app— Leptos CSR app (cdylib, mounted to<body>)honba-kao-client— typed HTTP client (/health,/traders,/orders,/pnl)honba-kao-api-wasm— in-browser WASM compute (screener, indicators, replay)
Mirrors nofx web/src/, layer for layer. Leptos has no virtual DOM and compiles
to WASM, so the same layering (route table → pages → domain components →
primitives, over contexts/stores/api) is kept while the runtime gets faster.
nofx web/src/ |
honba-kao crates/honba-kao-app/src/ |
Notes |
|---|---|---|
App.tsx |
app.rs |
provider stack (contexts + stores) |
main.tsx |
lib.rs |
mount_to_body(App) |
router/paths.ts |
router/paths.rs |
ROUTES constants + Page enum |
router/AppRoutes.tsx |
router/app_routes.rs, router/app_chrome.rs |
route table + AppChrome layout |
components/common/HeaderBar.tsx |
components/common/header_bar.rs + common/nav_rail.rs |
top bar + iconized side rail (nofx uses a top nav; honba keeps the navbar as a left icon rail) |
pages/ |
pages/ |
top-level screens |
components/<domain>/ |
components/<domain>/ |
auth, terminal, trader, charts, strategy, planning, modals, faq, landing |
components/ui/ |
components/ui/ |
primitives (bfx-hf-ui-core design language) |
contexts/ |
contexts/ |
provide_context / expect_context |
stores/ |
stores/ |
reactive signals (≈ Zustand) |
lib/api/* |
api/ |
namespaced client + transport |
lib/* |
utils/ |
format, indicators, text |
hooks/ |
hooks/ |
reusable reactive helpers |
types/ |
types/ |
domain types |
i18n/, constants/, data/ |
same names | translations, branding, sample data |
src/styles/ |
style/ (repo root, served by Trunk) |
app.css (chrome), brand.css (landing) |
Route map (same as nofx): /, /login, /register, /reset-password,
/setup, /welcome, /faq, /data, /settings, /competition, /traders,
/dashboard, /strategy, /strategy-market, /frontier (alias /planning).
Authenticated screens are gated inline, exactly like the reference app's
isLoggedIn ? <Screen/> : <Fallback/>.
- Leptos 0.7 CSR + WASM — compiled output, no virtual DOM, fine-grained reactivity instead of tree diffing.
- Polling instead of SWR —
hooks::use_intervalis the equivalent of SWR'srefreshInterval; screens read the tick to refresh positions/account/decisions. - Charts are Rust-native SVG — no vendored TradingView/charting bundle.
- Production profile —
trunk build --releaseselects cargo'sreleaseprofile, so[profile.release]carriesopt-level = 3,lto = true,codegen-units = 1,panic = "abort";profile.prodinherits from it. - API layer is real, data is sample —
api::httpis wired to the typedhonba-kao-client; each namespace currently returnsdata::demo_dataso the UI is fully explorable before the backend routes exist.
rustup target add wasm32-unknown-unknown
cargo install --locked trunk
All builds explicitly resort to either dev or prod profiles (instead of unoptimized debug), defaulting to dev:
-
Dev Profile (
dev) — Default:make build/make build-dev(via Trunk) orcargo check --profile dev --workspace- Optimized for fast iterative compilation and interactive debugging with
opt-level = 1. make serve/trunk serveruns onhttp://127.0.0.1:8080with/api/*proxied to:3000.
-
Production build (
release, mirrored byprod):make build-prod(trunk build --release) orcargo check --profile prod --workspace- Max optimization (
opt-level = 3,lto = true,codegen-units = 1,panic = "abort"). Trunk's--releaseselects cargo'sreleaseprofile, so the tuning lives in[profile.release];profile.prodinherits from it. - Generates distribution bundle in
dist/.
# Terminal 1 — backend
cd honba-ya && cargo run -p honba-ya-cli -- serve
# Terminal 2 — frontend
make serve # http://127.0.0.1:8080 (dev profile)
# /api/* proxied to :3000
make build-prod # → dist/ (prod profile)
# serve dist/ from nginx, a CDN, or a tower-http::ServeDir layer
Dev uses the relative path /api (proxied). For prod, either:
- serve
dist/and the API from the same origin (simplest), or - change
API_BASE_URLincrates/honba-kao-app/src/constants/branding.rs.
License: AGPL-3.0.