Skip to content

Repository files navigation

Joseki

The open-source trading journal — review every trade the way Go players replay every move.

[English] | 简体中文

CI License: MIT Python 3.11+ React 19

In Go, joseki (定式) are established sequences studied by replaying games move by move. Joseki brings the same discipline to trading: import your fills, replay your entries bar by bar, tag your mistakes, and let the data tell you what actually works.

Self-hosted, single-user, your data stays on your machine.

Dashboard

Features

Journal & import

  • Auto-import from Binance (API / CSV) and CoinW (API), plus a generic CSV format and manual entry
  • Fills are automatically matched into round-trips with net P&L — fees and funding included, not the flattering gross number
  • Every trade carries a chart, screenshots, structured notes, leverage and a self-rating

Analytics that expose habits, not vanity scores

  • Equity curve, profit factor, max drawdown, time-of-day heatmap (weekday × hour)
  • MAE / MFE: how deep you sit in drawdown on losers, how much of the move you actually capture on winners
  • Attribution by exchange, hold time, leverage and self-rating
  • Cost analysis: what fees and funding are really taking from you
  • 3-axis tags (setup / mistake / market context) — tag once, slice everything, including tag × time cross-analysis

Discipline as a traffic light

  • Set a daily loss limit, profit target and trade cap — the dashboard shows live red/green lights and warns you before a bad day becomes a terrible one

Replay — game film for traders

  • Bar-by-bar replay of any trade on the chart
  • Day replay, and scenario replay: side-by-side synchronized replay of every trade under one setup

Playbook, missed trades, notebook

  • Turn setups into named playbooks with rule checklists, then track per-playbook performance
  • Log the trades you didn't take, with reasons — missed opportunities are data too
  • Markdown notebook with built-in templates (trading plan / pre-market prep / weekly review / watchlist)

AI review (bring your own key)

  • Daily session recap, per-trade critique, free-form Q&A over your own history, and tilt detection
  • Works with configurable OpenAI-compatible providers; every scenario's prompt is editable (English prompt presets)

Share cards

  • Export clean 16:9 / 4:5 share images of any trade (glass / magazine / terminal styles, EN & ZH)

Quickstart

Docker (recommended)

git clone https://github.com/atlas555/joseki.git
cd joseki
docker compose up -d
# open http://localhost:8000

Your data lives in ./data on the host.

Manual

# backend (Python 3.11+)
cd backend
python3.11 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn main:app --port 8000   # serves API + built frontend

# frontend (Node 20+, only needed if you change frontend code)
npm install
cd apps/shell/frontend && npm run build

Try it with demo data

# Docker:
docker compose exec joseki python seed_demo.py
# Manual:
cd backend && .venv/bin/python seed_demo.py

Seeds ~80 realistic trades (win rate ≈49%, PF ≈1.3) with tags, playbooks, missed trades and notes. Deterministic and offline. Refuses to touch a non-empty database.

Configuration

Everything is optional — Joseki runs with zero configuration. Copy backend/env.example to backend/.env to enable:

What How
Exchange sync Binance / CoinW read-only API keys (also configurable in the Settings UI)
AI review Provider API keys + per-scenario model/prompt in Settings
Screenshots on S3-compatible storage JOURNAL_OSS_* (falls back to local disk)
Proxy JOURNAL_PROXY for restricted networks
Offline mode JOURNAL_OFFLINE=1 — never touches the network

Language

The UI ships in English and 中文 — switch from the sidebar. Backend error messages are Chinese today (roadmap).

Tech stack

Single FastAPI backend (SQLite, zero external services) serving a React 19 SPA. Charting by lightweight-charts / KlineCharts, react-i18next for i18n, one Docker image.

backend/    FastAPI + SQLite  (routers / metrics / MAE-MFE / importers / AI runtime)
apps/       trade-journal + config-manager + shell (composition)
packages/   @joseki/ui  @joseki/lib  @joseki/api-client

Tests: 317 backend (pytest) + 69 frontend (vitest).

Roadmap

  • Morning briefing (pre-market AI digest of your watchlist)
  • Backend error message localization
  • More exchanges (Bybit, OKX, Hyperliquid…)
  • Locale-aware date/number formatting; more languages
  • Running P&L inside a trade

Issues and PRs welcome — see CONTRIBUTING.md.

License

MIT

About

The open-source trading journal — review every trade the way Go players replay every move. 开源交易复盘日志

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages