$ show seakee/CPA-Manager-Plus
CPA Manager Plus is a full-stack, self-hosted management panel for AI gateway proxies (CPA / CLIProxyAPI). It provides a rich React dashboard to monitor usage across multiple AI providers, manage credentials and API keys, configure provider-specific settings, automate quota cooldowns and account health actions, and inspect credential health via Codex/xAI probes. The Go backend persists all data in SQLite, runs background workers for data rollups, migrations, and collector polling, and exposes a comprehensive REST API. The codebase is well-structured with a clean layered architecture (HTTP handlers, services, repositories), extensive unit and integration tests in both Go and TypeScript, a demo mode with synthetic data, and i18n support. It is actively maintained with a rigorous release process and frequent updates.
The LLM identified 3 files worth highlighting for reuse:
Cross-platform file locking using Unix flock (Unix) and LockFileEx (Windows). Provides `TryLock` and `Unlock` methods with advisory exclusivity. Self-contained, minimal dependencies, and easily extractable for any Go project requiring process-level mutual exclusion.
Generic rollup worker loop that supports wake-on-demand, context cancellation, and periodic ticking. Features a `Run` method with `sync.Once` startup guard, logging, and graceful shutdown. Reusable framework for any background data aggregation or scheduled task in Go.
Accessible tooltip component with dynamic positioning, keyboard and mouse interaction, Escape to dismiss, and viewport boundary awareness. Handles tooltip flipping when near screen edges. Self-contained with no external dependencies beyond React and basic DOM events.