How nofxaios/nofx works
NOFX is a self-hosted AI trading application with two distinct trading modes: Frontier guides a user through market selection, entry-plan review, and explicitly approved execution; Autopilot continuously evaluates markets and can execute while running. The repository also includes account/model setup, trader dashboards, strategy configuration, market-data access, and exchange integrations. The README documents the product workflows; sampled source confirms frontend routing and terminal composition, but many backend relationships are not excerpted, so those links are marked unverified rather than presented as observed calls.
Main entry points: AppRoutes.tsx App Routes · handler_planning.go Planning API · auto_trader_loop.go Autopilot Loop · AITradersPage.tsx Trader Workspace
Components 23
Workspace UI
- App Routes
web/src/router/AppRoutes.tsx - Account and Setup
web/src/contexts/AuthContext.tsx - Trader Workspace
web/src/components/trader/AITradersPage.tsx - Trader Dashboard
web/src/components/terminal/TerminalDashboard.tsx - Web API Client
web/src/lib/api/index.ts
Frontier Planning
- Frontier Workspace
web/src/pages/TradingPlanningPage.tsx - Planning API
api/handler_planning.go - Plan Engine
planning/core/plan.go - Live Execution
planning/live/controller.go - Planning Markets
planning/market/client.go
Autopilot Trading
- Trader Configuration
api/handler_trader_config.go - Trader Manager
manager/trader_manager.go - Autopilot Loop
trader/auto_trader_loop.go - AI Decisions
kernel/engine.go - Prompt Builder
kernel/engine_prompt.go
Trading Runtime
- Exchange Adapters
trader/interface.go - Exchange Adapters
trader/binance/futures_orders.go - HTTP API
api/server.go - Model Integrations
mcp/client.go
Data and Persistence
- Market Data
market/api_client.go - Application Store
store/store.go - Market Providers
provider/coinank/kline.go
Other components
- User
Connections 25
- User → App Routes: uses workspace
README.md - App Routes → Account and Setup: checks session
web/src/router/AppRoutes.tsx - App Routes → Frontier Workspace: opens Frontier
web/src/router/AppRoutes.tsx - App Routes → Trader Workspace: opens Autopilot
web/src/router/AppRoutes.tsx - Trader Workspace → Trader Dashboard: selects trader
web/src/components/trader/AITradersPage.tsx - Frontier Workspace → Web API Client: requests plans
- Web API Client → HTTP API: sends API requests
- HTTP API → Planning API: routes planning
- Planning API → Planning Markets: loads market data
- Planning API → Plan Engine: generates plans
- User → Frontier Workspace: reviews and approves
README.md - Planning API → Live Execution: executes approved trade
- Live Execution → Exchange Adapters: submits orders
- Trader Workspace → Trader Configuration: configures trader
- Trader Configuration → Trader Manager: starts or stops
- Trader Manager → Autopilot Loop: runs trader
- Autopilot Loop → Market Data: reads market
- Autopilot Loop → AI Decisions: requests decision
- AI Decisions → Prompt Builder: builds model context
- AI Decisions → Model Integrations: requests model
- Autopilot Loop → Exchange Adapters: routes orders
README.md - Exchange Adapters → Exchange Adapters: dispatches venue orders
- HTTP API → Application Store: persists application state
- Market Data → Market Providers: fetches provider data
- Trader Dashboard → Web API Client: loads dashboard data
web/src/components/terminal/TerminalDashboard.tsx