● Reference · Architecture
How it works
one process, one data folder.
OUTRIDER is one Node.js process. It reads public data, decides on paper (or live, if you switch it on), writes everything to data/, and serves a dashboard and the operator console from the same process. This page shows the parts and how data moves between them.
01The picture
live mode with a venue switched on. Dashed grey: optional keys. Telegram channel reading and Polymarket run only if you switch them on (telegram.readChannels, the polymarket module); Hyperliquid live orders need the perps module.02The parts, in the code
| Part | File | What it does |
|---|---|---|
| Command line | src/cli.mjs | Loads .env and config.json, then runs one command. run starts the console, the desk and the web server in one process; dash starts only the web server and console. It runs with plain node and loads the compiled console from dist/src/admin/index.js. |
| Settings | src/defaults.mjs, src/config.mjs, config.json | Every default (src/defaults.mjs), merged with your config.json, type-checked, with the books of optional modules that are off switched off (src/config.mjs), then merged with the console's saved values (which wins). |
| Desk loop | src/desk.mjs | Every loopSeconds (20): runs the agents, exits before entries, the EV gate and Kelly sizing, limits, protections and the hard stop, then saves state. It never throws out of a cycle; one failing agent is logged and the rest continue. |
| Agents | src/agents/ | One file per source or book: pump.fun stream, DEX scout, RugCheck, GoPlus, news, Telegram channels (opt-in), whale wallets, liquidation map, and the books of the optional modules (trend, funding, cross-venue, basis, HL copy, news perps, flow, Polymarket, Jev). |
| Shared logic | src/lib/ | EV gate, lanes, wallet book, liquidation map, journal hash chain, Telegram bot, AI analyst, doctor. |
| Live layer | src/live/ | Only in mode: "live": checks the keys and caps at start (live mode cannot start lists every problem), signs pump.fun transactions built by PumpPortal on your machine, sends Hyperliquid orders through an API wallet (perps module), and reads the real fills back. |
| Web server | src/web/server.mjs, src/web/index.html, src/web/static/ | The dashboard and its JSON API on port 8790 (DASH_PORT), Server-Sent Events for live updates, the kill switch, and /admin. The page is markup only; its stylesheet (static/app.css) and ES modules (static/js/, one per pane) are files, so the Content-Security-Policy allows scripts and styles from 'self' only. |
| Operator console | src/admin/, packages/admin-kit/ | The desk's settings manifest and the MIKODES Admin Kit 0.5.0 (owner, roles, two-factor, audit log, encrypted secrets) storing its data in data/admin.sqlite. TypeScript, compiled by npm run build with tsc to dist/. |
| Research tools | src/lab/ | Recorder, replay, sweep, GeckoTerminal and FOMO collectors, backtests. The background research refresh runs as a separate process. |
03One cycle, step by step
- Data comes inThe pump.fun stream arrives continuously over the Solana WebSocket; the other agents poll their APIs on their own schedules.
- Exits firstOpen positions are checked against their exit rules before anything new is bought.
- Entries through the gatesA candidate must pass the safety checks, the EV gate (expected value after costs) and every limit: max open, exposure, daily loss, hard stop, kill switch.
- FillIn
papermode the paper broker books a simulated fill with fees and slippage. Inlivemode the live layer sends (or, with Dry run, simulates) a capped real order. Inalertmode nothing is booked. - Write it downEvery decision, fill, skip and error is appended to
data/journal.jsonl, each row chained to the previous one by a SHA-256 hash (verify). State is saved todata/state.json. - Tell youThe dashboard reads the data folder and updates over Server-Sent Events; alerts go to the terminal and, if set up, to Telegram.
04Where your data goes
- Everything is stored in
data/on your machine. There is no MIKODES server in the loop and no telemetry. - Outbound calls go only to the services in the left column, to Telegram if you set a token, and to Anthropic and TypeSafe if you set their keys (Services and costs). With an Anthropic key, news headlines and a snapshot of the desk's own figures are sent to Anthropic for scoring and the briefing.
- The console's help links point to the online docs; following a link is the only time the console itself reaches a MIKODES address.
- The dashboard page loads its two fonts (Inter and JetBrains Mono) from Google Fonts in your browser.
- Keys you store in the console are encrypted at rest (Secrets and backups).
05For developers: build, checks and tests
The desk is plain ES modules and runs with node as it is. Only the operator console is TypeScript. The commands, run in the install folder:
| Command | What it does |
|---|---|
npm run build | Compiles the console (src/admin and the Admin Kit) with tsc to dist/. |
npm test | Builds first, then runs the 482 automated tests with node --test. All offline: every HTTP call is stubbed, so no network and no keys are needed. |
npm run typecheck | Checks the console's types without writing files. |
npm run lint | ESLint with the flat config in eslint.config.js. |
npm run format:check | Prettier at 120 columns (.prettierrc.json); npm run format rewrites the files. |
npm run check | Lint, format check and tests in one go. |
npm run build:ui | Rebuilds the console page in packages/admin-kit/ui/ from its source in ui-src/. Not needed for normal use. |
The tests are grouped by module and behaviour (for example desk.cycle, desk.fault-injection, server.security, config.validation, modules, demo.export, dashboard.a11y). docs/DEVELOPMENT.md in the package describes the architecture, the dashboard conventions (no inline scripts or styles; every value from data is escaped) and the test layout.