This is a project inspired by nof1 Alpha Arena, you can setup AI trading bot on crypto market.
DONE:
- Paper Trading
- OpenAI compatible API
- LEVERAGE
- ccxt for quotation
- Pure TypeScript stack (backend ported from Python; nodejs-polars replaces pandas)
TODO:
- real trading (actually you can implement it with ccxt by the help of AI coding tools easily)
The whole project is TypeScript — one runtime, one package manager.
| Layer | Stack |
|---|---|
| Frontend | React 18 + Vite + Tailwind + shadcn/ui |
| Backend | Hono + @hono/node-server (HTTP & WebSocket) |
| Database | SQLite via Drizzle ORM + better-sqlite3 |
| Validation | Zod |
| Dataframes | nodejs-polars (factor calculations) |
| Market data | ccxt (Hyperliquid) |
- Node.js 20+ and pnpm
pnpm installBy default, the workspace scripts launch:
- Backend on port 5611
- Frontend on port 5621
Start both dev servers:
pnpm run devOpen:
- Frontend: http://localhost:5621
- Backend WS: ws://localhost:5611/ws
Vite proxies /api and /ws to the backend on 5611, so no extra configuration
is needed. To run the backend alone:
pnpm --filter backend devpnpm run build # frontend (Vite) + backend (tsc)
pnpm run typecheck # backend type check only
pnpm --filter backend test # factor regression test vs the pandas baselineThe compiled backend lives in backend/dist; run it with node dist/index.js.
Copy the frontend's dist/ into backend/static/ to have the backend serve the
SPA (the Dockerfile does this automatically).
| Env var | Default | Purpose |
|---|---|---|
PORT |
5611 |
HTTP/WebSocket port |
DATABASE_PATH |
backend/data.db |
SQLite file location |
LOG_LEVEL |
info |
debug | info | warning | error |
docker compose up --buildMIT
