Skip to content

Latest commit

 

History

History
124 lines (97 loc) · 5.11 KB

File metadata and controls

124 lines (97 loc) · 5.11 KB

OpenCodeBoard — OpenCode Go Usage Dashboard

Switch to 中文

Thanks to the original author of 68hub for the open-source contribution. This fork focuses on Windows and personal use; features and behavior may differ from upstream.

🚀 Next generation: OpenCodeGoBoard — a Tauri 2 + Rust rewrite based on this project, with a much smaller installer and memory footprint, local SQLite + Windows Credential Manager, and no Electron / Hono / localhost port.


Screenshots

Page Preview
📊 Usage Dashboard Dashboard
📈 Token Stats Token Stats
📋 Usage Records Usage Records
⚙️ Settings Settings

Screenshots may lag behind the latest release. See the app for the current UI.

Features

Module Description
📊 Dashboard Account count, remaining quota, total and today's token consumption at a glance; quota progress bars (5h/7d/30d) on the left, top model Input/Output donut chart with period switching on the right
📈 Token Stats Model token consumption ranking, usage trends and per-model breakdown; filterable by account, model and time range, defaulting to the last 30 days with the selection persisted
📋 Usage Records Complete usage record log with pagination and account filtering
⚙️ Settings Multi-account management (add/test/sync/backfill/delete), auto-sync toggle and interval setting; automatically switches to an available backend port when needed

Quick Start

# Install dependencies
pnpm install

# Run in dev mode (auto-starts backend + Vite + Electron)
pnpm dev

# Build installer (Windows)
pnpm dist

The embedded backend starts automatically with the Electron main process (Hono + better-sqlite3), no need to start any separate service.

Multi-Account Support

  • Quota: Each account independently displays 5h/7d/30d progress bars
  • Charts: All account data aggregated, filterable by account
  • Control: Each account can be individually enabled/disabled

Tech Stack

Frontend Backend Tools
Electron 43 Hono + better-sqlite3 electron-builder
React 18 TypeScript Windows x64
Vite 5 + Tailwind 4 zod
daisyUI 5 + Recharts fetch (Node)

Project Structure

opencodeboard/
├── electron/
│   ├── main.ts            # Electron main process + embedded backend startup
│   ├── preload.ts         # IPC bridge
│   └── backend/           # Node backend (Hono + better-sqlite3)
│       ├── server.ts      # HTTP server lifecycle + auto-sync
│       ├── routes.ts      # All API routes
│       ├── db.ts          # SQLite CRUD
│       ├── config.ts      # Config/masking
│       ├── quota.ts       # OpenCode quota fetcher
│       ├── ollama-quota.ts # Ollama quota fetcher
│       ├── opencode-usage.ts # Usage record fetcher
│       ├── usage-sync.ts  # Incremental/backfill sync
│       ├── analytics.ts   # Dashboard aggregation
│       └── ...
├── src/                   # React frontend (api / components / pages / hooks)
├── public/                # Static assets and icons
└── scripts/               # Packaging helper scripts

Build

pnpm dist

Output: release\OpenCodeBoard-<version>-win-x64.exe

Releases: official builds are published on KDB-Wind/opencodeboard Releases.

Platform support: Windows x64 is the primary target. macOS and Linux builds are not maintained here; you can adapt the Windows code yourself, but they are not guaranteed to run.

Acknowledgments

  • 68hub — the upstream project this fork is based on
  • QuotaHub — Backend architecture inspiration
  • OpenCode — API provider

License MIT