{"id":45476333,"url":"https://github.com/mouses007/crypto-trading-journal","last_synced_at":"2026-05-24T09:01:59.196Z","repository":{"id":339822571,"uuid":"1159101076","full_name":"Mouses007/Crypto-Trading-Journal","owner":"Mouses007","description":"Local, privacy-focused crypto futures trading journal. Bitunix + Bitget, AI reports \u0026 share cards, SQLite/PostgreSQL, Docker support, auto-update. No cloud, no subscriptions.","archived":false,"fork":false,"pushed_at":"2026-05-17T08:06:46.000Z","size":22081,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-17T10:22:58.721Z","etag":null,"topics":["bitget","bitunix","crypto","express","futures","sqlite","trading","trading-journal","vue3"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mouses007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-16T10:13:32.000Z","updated_at":"2026-05-17T08:06:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Mouses007/Crypto-Trading-Journal","commit_stats":null,"previous_names":["mouses007/crypto-trading-journal"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/Mouses007/Crypto-Trading-Journal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mouses007%2FCrypto-Trading-Journal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mouses007%2FCrypto-Trading-Journal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mouses007%2FCrypto-Trading-Journal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mouses007%2FCrypto-Trading-Journal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mouses007","download_url":"https://codeload.github.com/Mouses007/Crypto-Trading-Journal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mouses007%2FCrypto-Trading-Journal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33427584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitget","bitunix","crypto","express","futures","sqlite","trading","trading-journal","vue3"],"created_at":"2026-02-22T15:16:16.058Z","updated_at":"2026-05-24T09:01:59.190Z","avatar_url":"https://github.com/Mouses007.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto Trading Journal\n\nA local, privacy-focused trading journal for **crypto futures trading** — Bitunix and Bitget. No cloud, no accounts, no subscriptions. Run it on your machine or in Docker.\n\n\u003e **Hinweis:** Die Benutzeroberfläche ist komplett auf **Deutsch** (optional Englisch).\n\n## Screenshots\n\n![Dashboard](docs/dashboard.png)\n\n![Daily View](docs/daily.png)\n\n![Incoming Positions](docs/incoming.png)\n\n---\n\n## Features\n\n### Dashboard \u0026 Analytics\n- **P\u0026L Overview** — total profit/loss, win rate, profit factor, ROI%, equity curve\n- **Account Balance** — auto-calculated from start deposit + trade P\u0026L, or fetched via exchange API\n- **Performance Heatmap** — weekday × hour grid showing when you win and lose\n- **Trade-Type Statistics** — Scalp / Day Trade / Swing profitability comparison\n- **Strategy-Tag Statistics** — per-strategy P\u0026L and win rate analysis\n- **Fees Chart** — per-symbol breakdown of trading vs funding fees\n- **Trading Volume** — 30-day and lifetime volume tracking\n- **Card Visibility Toggle** — show/hide individual dashboard cards\n\n### Calendar \u0026 Daily View\n- **Calendar Heatmap** — visual overview of daily P\u0026L across months\n- **Daily Summary** — per-day performance with candlestick charts (OHLCV)\n- **Trade Blotter** — all fills and executions, grouped by minute with expandable details\n- **Screenshot Thumbnails** — inline previews of attached screenshots\n\n### Playbook (Trade Journal)\n- **Trade Evaluation** — tags, stress level (1–10), emotion level (1–10), notes\n- **Rich Text Notes** — Quill editor for detailed trade analysis\n- **Screenshots** — entry, exit, and trend screenshots with annotation support (MarkerJS2)\n- **Fill History** — minute-grouped executions with closing/partial/entry badges\n- **SL/TP Protocol** — stop loss and take profit tracking with quantity display\n- **Auto Trade-Type Detection** — automatic Scalp/Day/Swing classification based on duration\n\n### Auswertung (Evaluation)\n- **Strategy Analysis** — performance per strategy tag group\n- **Satisfaction Rate** — trading satisfaction/confidence gauge\n- **Journal Completeness Radar** — tracks which fields are filled vs empty\n- **Stress \u0026 Emotion Charts** — over time, correlated with win rate\n- **Long/Short Ratio** — distribution analysis\n\n### Incoming Positions (Real-time)\n- **Live Position Monitoring** — real-time fetch via broker API with auto-polling\n- **AI Trade Ratings** — automatic opening and closing evaluations\n- **Strategy Adherence** — \"Did I follow my plan?\" evaluation at trade closure\n- **Trade Transfer** — convert closed position to trade with full metadata transfer\n\n### Share Cards\n- **AI-Generated Trade Cards** — shareable images for social media\n- **Image Providers** — FLUX.2 (Black Forest Labs) or Google Gemini\n- **Customizable Prompt** — describe the background you want, AI generates it\n- **14 Built-in Templates** — categorized by direction (long/short) and outcome (win/loss)\n- **Template Library** — save your own templates from AI generations\n- **Overlay Data** — symbol, direction, leverage, P\u0026L, entry/exit, strategy tags, RRR, comment\n- **Privacy Option** — hide P\u0026L dollar amounts, show only percentage\n\n### KI-Agent (AI Reports \u0026 Chat)\n- **Multiple Providers** — Ollama (local), OpenAI, Anthropic, Google Gemini, DeepSeek\n- **Report Generation** — monthly, weekly, custom date range with preset templates\n- **Trade Review Chat** — per-trade AI follow-up questions in Daily view\n- **Screenshot Analysis** — include chart images in AI analysis\n- **Token Statistics** — track usage and estimated costs per provider\n- **Global AI Toggle** — enable/disable all AI features at once\n\n### Import \u0026 Broker Support\n- **Bitunix** — CSV export + API integration (positions, balance, trades)\n- **Bitget** — CSV + API integration (positions, balance, fills)\n- **Encrypted API Keys** — AES-256-GCM encryption at rest\n- **Auto-Deduplication** — prevents duplicate trade entries on re-import\n\n### Backup \u0026 System\n- **JSON Backup/Restore** — full database export/import with sensitive data masking\n- **Auto-Update** — checks GitHub on startup, one-click update from the sidebar\n- **Rollback** — revert to previous version if needed\n- **First-Run Setup** — guided initial configuration wizard\n- **Multi-Language** — German (default) and English\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Frontend | Vue 3 (Composition API), Vue Router, ECharts, Bootstrap (dark theme) |\n| Backend | Express.js, Knex.js |\n| Database | SQLite (default) or PostgreSQL (optional) |\n| Rich Text | Quill |\n| Annotations | MarkerJS2 |\n| CSV | PapaParse |\n| Dates | Day.js |\n| AI Image | FLUX.2, Google Gemini |\n\n---\n\n## Installation\n\n### Option A: Local (recommended for development)\n\n#### Requirements\n\n- [Node.js 20+](https://nodejs.org/) (LTS recommended)\n- [Git](https://git-scm.com/) (required for installation and auto-updates)\n- Python 3 + Build Tools (for native npm modules)\n\n#### Linux / macOS\n\n```bash\ngit clone https://github.com/Mouses007/Crypto-Trading-Journal.git\ncd Crypto-Trading-Journal\nchmod +x install.sh\n./install.sh\nnpm start\n```\n\nOr manually:\n\n```bash\nnpm install\nnpm run build\nnpm start\n```\n\n\u003e **macOS**: Double-click `install-mac.command`, `start-mac.command`, `update-mac.command`. Install build tools with `xcode-select --install`.\n\n#### Windows\n\n1. Download or clone this repository\n2. Double-click **`install.bat`** — checks all prerequisites:\n   - **Node.js 20+** — [Download](https://nodejs.org/)\n   - **Git** — [Download](https://git-scm.com/download/win) (required for updates)\n   - **Python 3** — [Download](https://www.python.org/downloads/) (check \"Add to PATH\")\n   - **Visual Studio Build Tools** — [Download](https://aka.ms/vs/17/release/vs_BuildTools.exe) (select \"Desktop development with C++\")\n   - Missing components can be auto-installed via winget\n3. Double-click **`start.bat`** — starts the server and opens the browser\n\nOpen `http://localhost:8080` in your browser.\n\n### Option B: Docker\n\n#### Requirements\n\n- Docker and Docker Compose\n\n#### Quick Start (with external PostgreSQL)\n\n```bash\ngit clone https://github.com/Mouses007/Crypto-Trading-Journal.git\ncd Crypto-Trading-Journal\ncp .env.example .env\n```\n\nEdit `.env` with your database credentials:\n\n```env\nCTJ_PORT=8080\nCTJ_SECRET=           # optional: openssl rand -hex 32 (for shared encryption across instances)\nDB_TYPE=postgresql\nDB_HOST=192.168.178.100\nDB_PORT=5432\nDB_USER=tradejournal\nDB_PASSWORD=your_password\nDB_NAME=tradejournal\n```\n\n```bash\ndocker compose up -d\n```\n\nOpen `http://localhost:8080` in your browser.\n\n#### Docker Commands\n\n```bash\ndocker compose up -d          # Start\ndocker compose down            # Stop\ndocker compose logs -f journal # Logs\ndocker compose ps              # Status\n```\n\n#### NAS Deployment (Synology etc.)\n\nBuild and export the image on your development machine, then import it on the NAS:\n\n```bash\ndocker compose build\ndocker save journal-journal:latest | gzip \u003e journal-image.tar.gz\n```\n\nCopy `journal-image.tar.gz` and a compose file (without `build:`) to your NAS, import the image, and create a project in Container Manager. See [DOCKER.md](DOCKER.md) for details.\n\n---\n\n## Update\n\nYour database is preserved during every update. Git is required for all update methods.\n\n### In-App Update (recommended)\n\nWhen a new version is available, an **update button** appears in the sidebar (green, between version number and donate link). Click it to automatically fetch, install, rebuild, and restart.\n\n### Manual Update (Local)\n\n```bash\ngit fetch origin master\ngit reset --hard origin/master\nnpm install\nnpm run build\nnpm start\n```\n\n### Docker Update\n\n```bash\ngit pull\ndocker compose up -d --build\n```\n\n### Windows (Manual)\n\nDouble-click **`update.bat`** — creates a backup and updates automatically.\n\n---\n\n## Configuration\n\n### Port and Host\n\nDefault: port `8080`, bound to `127.0.0.1` (local only).\n\n```bash\nCTJ_PORT=3000 npm start                  # Different port\nCTJ_HOST=0.0.0.0 npm start               # Network access\n```\n\n### Database\n\n**SQLite** (default): No configuration needed. Database file `tradenote.db` in project root.\n\n**PostgreSQL**: Create a `db-config.json` in the project root:\n\n```json\n{\n  \"client\": \"pg\",\n  \"host\": \"localhost\",\n  \"port\": 5432,\n  \"database\": \"cryptojournal\",\n  \"user\": \"youruser\",\n  \"password\": \"yourpassword\"\n}\n```\n\nFor Docker, configure via `.env` instead (see Installation \u003e Docker).\n\n### Encryption (CTJ_SECRET)\n\nBy default, API keys are encrypted with a machine-specific seed. If you run multiple instances (e.g., local + Docker) sharing the same database, set `CTJ_SECRET` so all instances use the same encryption key:\n\n```bash\n# Generate a secret\nopenssl rand -hex 32\n\n# Set it as environment variable\nexport CTJ_SECRET=your_generated_secret\n\n# Or add to .env (for Docker and server_neustart.sh)\nCTJ_SECRET=your_generated_secret\n```\n\n\u003e **Important**: After setting CTJ_SECRET for the first time, re-enter your broker API keys in Settings — the old keys were encrypted with the previous machine seed.\n\n### Development\n\n```bash\nnpm run dev\n```\n\nStarts the Vite dev server with Hot Module Replacement on port 39482, proxied through the Express backend on port 8080.\n\n---\n\n## Usage\n\n1. Go to **Einstellungen** (Settings) and configure your broker API Key + Secret\n2. Import trades via **CSV upload** or **API fetch**\n3. Evaluate your trades in **Playbook** — add tags, stress/emotion levels, notes\n4. Review your performance in **Dashboard** and **Auswertung**\n5. Use the **KI-Agent** for AI-powered trade analysis\n6. Generate **Share Cards** to share your trades on social media\n\n---\n\n## Attribution\n\nBased on [TradeNote](https://github.com/Eleven-Trading/TradeNote) by eleven.trading, substantially modified:\n\n- Replaced MongoDB/Parse Server with SQLite/PostgreSQL (Knex)\n- Removed cloud auth, payments, analytics; simplified to single-user\n- Multi-broker support (Bitunix + Bitget) with encrypted API key storage\n- Added: KI-Agent, Share Cards, Incoming Positions, Performance Heatmap, Trade-Type Statistics, Backup/Restore, Auto-Update, Docker support, and more\n\n## License\n\nGPL-3.0 — see [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmouses007%2Fcrypto-trading-journal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmouses007%2Fcrypto-trading-journal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmouses007%2Fcrypto-trading-journal/lists"}