README.md

July 9, 2026 ยท View on GitHub

React Vite TypeScript Tailwind CSS Bun

๐Ÿ–ฅ๏ธ Code Proxy ยท Admin Dashboard

The official frontend management panel for CliRelay (CLI Proxy API)

Monitor, manage, and configure your CLI proxy channels โ€” all from a modern web UI.

Stars Forks Issues License


โœจ Overview

Code Proxy is the official web-based admin panel for CliRelay โ€” a proxy server that wraps Claude Code, Gemini CLI, OpenAI Codex, Qwen, iFlow, Kimi, Antigravity, xAI/Grok, OpenCode Go, ClinePass, Ollama Cloud, Bedrock, Vertex, Amp, and OpenAI-compatible upstreams behind one managed API layer.

This dashboard provides a complete management interface for your AI proxy infrastructure:

  • ๐Ÿ“Š Dashboard โ€” KPI cards, health score, live system stats, throughput, storage, and latency ranking
  • ๐Ÿ“ˆ Monitor Center โ€” model distribution, daily trends, token/request charts, and API Key filters
  • ๐Ÿ“‹ Request Logs โ€” dense request table, saved filters, body/content viewer, error details, and export helpers
  • ๐Ÿ”— Provider Workspace โ€” Gemini, Claude, Codex, OpenCode Go, ClinePass, Ollama Cloud, Vertex, Bedrock, OpenAI-compatible, and Ampcode tabs
  • ๐Ÿ—‚๏ธ Auth Files โ€” OAuth/auth inventory with model access, proxy binding, tags, quota snapshots, health states, and download actions
  • ๐Ÿ”‘ API Keys & Permissions โ€” key CRUD, quotas, RPM/TPM, channel group bindings, model restrictions, and reusable permission profiles
  • ๐Ÿงญ Routing & Imports โ€” channel groups, custom path routing, CC Switch import settings, and public quick-import data
  • ๐ŸŽจ Image Generation โ€” image-capable channel selection, size presets, and test task polling
  • ๐ŸŽฏ Models โ€” custom model catalog, owner presets, OpenRouter sync, pricing, and availability
  • ๐Ÿ” API Key Lookup โ€” public self-service usage, chart, log, model, and quick-import pages
  • โš™๏ธ Operations โ€” visual/YAML config editor, proxy pool, system info, online update prompt, live logs, dark mode, and i18n

๐Ÿ“ธ Screenshots

The gallery below uses the latest 21 supplied management-panel screenshots.

Dashboard & Monitoring

Dashboard overviewSystem health
Dashboard overviewHealth score and system monitor
Traffic trendMonitor summary
Dashboard traffic trendMonitor center summary
Monitor breakdownRequest logs
Monitor model and API key breakdownRequest logs table
Request detailsPublic API key lookup
Request details modalPublic API key lookup

Providers, Auth & Access

OpenCode Go auth filesClaude auth files
OpenCode Go auth filesClaude auth files
Claude OAuth healthAPI keys
Claude OAuth healthAPI key management
API key permissionsProxy pool
API key permission profilesProxy pool management

Routing, Models & Configuration

CC Switch importImage generation
CC Switch import settingsImage generation settings
Channel groupsModels
Channel groups and custom pathsModel catalog and pricing
ConfigSystem
Runtime config editorSystem information
Live logs
Live logs viewer

๐Ÿงฉ Feature Details

๐Ÿ“Š Dashboard

ModuleDescription
KPI CardsTotal requests, success rate, token consumption, failed request count (7-day / 30-day)
Health ScoreReal-time circular gauge (0โ€“100) evaluating overall system health
System MonitorWebSocket-powered live stats: uptime, goroutines, CPU, memory, network I/O, DB size
Channel LatencyTop 5 channel average latency with visual bar indicators
Resource BarsSystem CPU, memory, service CPU, memory, database size โ€” color-coded status

๐Ÿ“ˆ Monitor Center

ModuleDescription
KPI SummaryTotal requests, success rate, total/output tokens with time range selection
Model DistributionInteractive donut chart showing Top 10 model usage by request count or token
Daily TrendsDual-axis chart with input/output tokens (bar) and request count (line) over time
Hourly HeatmapStacked bar chart showing per-model hourly request distribution (6h / 12h / 24h)
API Key FilterFilter all metrics by specific API Key prefix

๐Ÿ“‹ Request Logs

ModuleDescription
Virtual TableHigh-density log browsing with stored column order and pagination controls
Multi-FilterFilter by API Key, model, status, channel, auth subject, and time range
Content ViewerFetch request/response bodies from /usage/logs/:id/content on demand
Error DetailsOpen failed rows directly into provider error details
Public LogsSame log/content workflow is available through the public API Key lookup

๐Ÿ”— AI Providers

ModuleDescription
Multi-TabGemini, Claude, Codex, OpenCode Go, ClinePass, Ollama Cloud, Vertex, Bedrock, OpenAI Compatible, Ampcode tabs
Channel CardsName, masked key, base URL, model count, success/fail stats, latency, proxy pool binding, and status badges
CRUD / PatchAdd, edit, patch, delete channels with headers, aliases, excluded models, Bedrock auth mode, and provider extras
Model AccessPer-provider model access controls and availability derived from backend model definitions

๐Ÿ—‚๏ธ Auth, Keys & Routing

ModuleDescription
Auth FilesOAuth/auth inventory, tags, quota snapshots, identity summaries, and health
API KeysClient key CRUD with quotas, rate limits, model filters, and group bindings
Permission ProfilesReusable API Key restrictions across providers, groups, and models
Channel GroupsGroup routing plus custom path namespaces for team or workload routing
CC Switch ImportPublic/importable model and group mapping settings for compatible clients
Proxy PoolReusable outbound proxy entries with backend health checks

๐Ÿ” API Key Lookup

ModuleDescription
Self-ServicePublic page for end users to check API Key usage without admin login
Usage StatsPer-key KPI cards, model distribution, heatmap, and trend charts
Request LogsPer-key request history and body viewer through public management endpoints
Quick ImportPublic CC Switch import metadata for compatible clients

๐Ÿ› ๏ธ Tech Stack

CategoryTechnology
FrameworkReact 19.2.4 + TypeScript 5.9.3
Build ToolVite 7.3.1 + @vitejs/plugin-react 5.1.4
Package ManagerBun 1.2.2
StylingTailwind CSS 4.1.18, Sass, shared @code-proxy/ui primitives
RoutingReact Router DOM 7.13 with lazy page preload
Data / HTTPAxios 1.13, typed endpoint wrappers, WebSocket system stats
ChartsApache ECharts 6, echarts-for-react, Chart.js 4, react-chartjs-2
Content Renderingreact-markdown, remark-gfm, react-syntax-highlighter, YAML parser
UI LibrariesLucide React 0.563, Radix Dropdown Menu, TanStack Virtual, goey-toast
QualityVitest 4, Playwright 1.58, Testing Library, oxlint 1.46, oxfmt 0.31

๐Ÿš€ Getting Started

Prerequisites

  • Bun โ‰ฅ 1.2 (or Node.js โ‰ฅ 18)
  • A running CliRelay backend instance

Install & Run

# Clone the repository
git clone https://github.com/kittors/codeProxy.git
cd codeProxy

# Install dependencies
bun install

# Start dev server
bun run dev

The dashboard will be available at http://localhost:5173/

Build for Production

# Type-check & build
bun run build

# Preview production build
bun run preview

Quality Checks

Pull requests to dev and main run lint, low-concurrency Vitest, build, and bundle diff in GitHub Actions. The frontend package manager is Bun (packageManager: bun@1.2.2); use bun run ... commands for local spot checks and leave full CI validation to GitHub Actions when local hardware is constrained.

๐Ÿ“ Project Structure

apps/admin-panel/       # Vite application shell, router, guards, layout, bootstrap, global styles
pages/                  # Route-level screens and page-private components/hooks
features/               # Cross-page UI workflows such as log viewer, OAuth, routing editor
packages/
โ”œโ”€โ”€ api-client/         # Management API client, endpoint DTOs, request helpers
โ”œโ”€โ”€ assets/             # Vendor icons and shared static assets
โ”œโ”€โ”€ domain/             # Pure business logic, normalizers, formatters, pricing/quota helpers
โ”œโ”€โ”€ i18n/               # i18next setup and locale resources
โ”œโ”€โ”€ test-utils/         # Shared test utilities
โ””โ”€โ”€ ui/                 # Shared UI primitives, overlays, DataTable, charts, theme
tooling/                # Vite plugins and build-time helpers
scripts/                # Repository checks, including import boundary validation

๐Ÿ”Œ API Integration

This dashboard communicates with the CliRelay backend via the Management API:

EndpointMethodDescription
/v0/management/configGETVerify login & fetch configuration
/v0/management/config.yamlGET/PUTRead or save YAML runtime config
/v0/management/update/*GET/POSTVersion checks and online update
/v0/management/usageGETUsage statistics summary
/v0/management/usage/exportGETExport usage statistics
/v0/management/usage/importPOSTImport usage statistics
/v0/management/usage/logsGET/DELETERequest log history and cleanup
/v0/management/usage/logs/:id/contentGETFull request/response message body
/v0/management/usage/chart-dataGETMonitor and lookup chart data
/v0/management/api-keysGET/PUT/PATCH/DELETEClient API Key CRUD
/v0/management/api-key-permission-profilesGET/PUTAPI Key permission profiles
/v0/management/*-api-keyGET/PUT/PATCH/DELETEProvider key CRUD for Gemini, Claude, Codex, Vertex, Bedrock, OpenCode Go, ClinePass, and Ollama Cloud
/v0/management/openai-compatibilityGET/PUT/PATCH/DELETEOpenAI-compatible provider CRUD
/v0/management/auth-filesGET/POST/DELETEOAuth/auth file inventory
/v0/management/auth-files/statusPATCHEnable/disable auth files
/v0/management/auth-files/fieldsPATCHPatch auth file metadata
/v0/management/*-auth-urlGET/POSTProvider OAuth launchers
/v0/management/model-configsGET/POST/PUT/DELETECustom model catalog
/v0/management/model-openrouter-syncGET/PUTOpenRouter model sync settings
/v0/management/model-openrouter-sync/runPOSTRun OpenRouter model sync
/v0/management/routing-configGET/PUTChannel groups and custom paths
/v0/management/identity-fingerprintGET/PUTProvider identity fingerprints
/v0/management/identity-fingerprint/learnedDELETEClear learned identity fingerprints
/v0/management/ccswitch-import-configsGET/PUTCC Switch import settings
/v0/management/proxy-poolGET/PUT/PATCHReusable outbound proxy entries
/v0/management/proxy-pool/checkPOSTProbe outbound proxy health
/v0/management/image-generation/*GET/PUT/POSTImage generation channels and tests
/v0/management/logsGET/DELETERuntime log viewer
/v0/management/public/*GET/POSTAPI Key lookup and public import data
/v0/management/system-statsGETSystem monitoring snapshot
/v0/management/system-stats/wsWebSocketReal-time system monitoring

Note: The API base is automatically normalized to {apiBase}/v0/management

For full backend API documentation, see the CliRelay Management API.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is open source. See the LICENSE file for details.


Made with โค๏ธ for the CliRelay community