Skip to content

Commit 4bde7da

Browse files
authored
Merge pull request #65 from kaitranntt/dev
feat(web-dashboard): add complete dashboard ui and improve cliproxy functionality
2 parents 244b441 + 2a5292b commit 4bde7da

File tree

128 files changed

+9616
-890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+9616
-890
lines changed

.github/workflows/dev-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ jobs:
3232
registry-url: 'https://registry.npmjs.org'
3333

3434
- name: Install dependencies
35-
run: bun install --frozen-lockfile
35+
run: |
36+
bun install --frozen-lockfile
37+
cd ui && bun install --frozen-lockfile
3638
3739
- name: Build and validate
3840
run: |
39-
bun run build
41+
bun run build:all
4042
bun run validate
4143
4244
- name: Bump dev version

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ jobs:
3434
bun-version: latest
3535

3636
- name: Install dependencies
37-
run: bun install --frozen-lockfile
37+
run: |
38+
bun install --frozen-lockfile
39+
cd ui && bun install --frozen-lockfile
3840
3941
- name: Build package
40-
run: bun run build
42+
run: bun run build:all
4143

4244
- name: Validate (typecheck + lint + tests)
4345
run: bun run validate

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ yarn-error.log*
2727
dist/
2828
*.tsbuildinfo
2929

30-
# Package lock files (keep package-lock.json but ignore others)
30+
# Package lock files (use bun.lock only)
3131
yarn.lock
3232
pnpm-lock.yaml
33+
package-lock.json
3334

3435
.claude/active-plan

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
# Run validation before commit (typecheck + lint + format + tests)
22
bun run validate
3+
4+
# Validate UI if changes detected
5+
if git diff --cached --name-only | grep -q "^ui/"; then
6+
echo "[i] UI changes detected, running ui:validate..."
7+
bun run ui:validate
8+
fi

CLAUDE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,49 @@ bun run format # Auto-fix formatting
3838
- `src/` - TypeScript source (55 modules)
3939
- `dist/` - Compiled JavaScript (npm package)
4040
- `lib/` - Native shell scripts (bash, PowerShell)
41+
- `ui/` - React dashboard (Vite + React 19 + shadcn/ui)
42+
43+
## UI Quality Gates (React Dashboard)
44+
45+
**The ui/ directory has IDENTICAL quality gates to the main project.**
46+
47+
**Package Manager: bun** (same as root)
48+
```bash
49+
cd ui
50+
bun install # Install dependencies
51+
bun run build # TypeScript + Vite build
52+
bun run validate # Full validation: typecheck + lint:fix + format:check
53+
```
54+
55+
**Fix issues before committing:**
56+
```bash
57+
cd ui
58+
bun run typecheck # Type check only
59+
bun run lint:fix # Auto-fix lint issues
60+
bun run format # Auto-fix formatting
61+
bun run format:check # Verify formatting (no changes)
62+
```
63+
64+
**Linting rules (ui/eslint.config.js) - ALL errors:**
65+
- `@typescript-eslint/no-unused-vars` - error (ignore `_` prefix)
66+
- `@typescript-eslint/no-explicit-any` - error
67+
- `@typescript-eslint/no-non-null-assertion` - error
68+
- `prefer-const`, `no-var`, `eqeqeq` - error
69+
- `react-hooks/exhaustive-deps` - warning
70+
- `react-refresh/only-export-components` - error
71+
72+
**Type safety (ui/tsconfig.app.json):**
73+
- `strict: true` with `verbatimModuleSyntax` enabled
74+
- `noUnusedLocals`, `noUnusedParameters` - enabled
75+
- Type-only imports required: `import type { X }` for types
76+
77+
**UI file structure:**
78+
- `ui/src/` - React components, hooks, pages
79+
- `ui/src/components/ui/` - shadcn/ui components
80+
- `ui/src/hooks/` - Custom React hooks
81+
- `ui/src/pages/` - Route pages
82+
- `ui/src/providers/` - Context providers
83+
- `dist/ui/` - Built bundle (served by Express)
4184

4285
**Linting rules (eslint.config.mjs) - ALL errors:**
4386
- `@typescript-eslint/no-unused-vars` - error (ignore `_` prefix)

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
### One command, zero downtime, multiple accounts
88

99
**Switch between multiple Claude accounts, GLM, and Kimi instantly.**<br>
10-
Stop hitting rate limits. Keep working continuously.
11-
10+
Stop hitting rate limits. Keep working continuously.<br>
11+
Features a modern React 19 dashboard with real-time updates.
1212

1313
[![License](https://img.shields.io/badge/license-MIT-C15F3C?style=for-the-badge)](LICENSE)
1414
[![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=for-the-badge)]()
1515
[![npm](https://img.shields.io/npm/v/@kaitranntt/ccs?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@kaitranntt/ccs)
16+
[![React](https://img.shields.io/badge/React-19-61DAFB?style=for-the-badge&logo=react)](https://react.dev/)
17+
[![TypeScript](https://img.shields.io/badge/TypeScript-100%25-3178C6?style=for-the-badge&logo=typescript)](https://www.typescriptlang.org/)
1618
[![PoweredBy](https://img.shields.io/badge/PoweredBy-ClaudeKit-C15F3C?style=for-the-badge)](https://claudekit.cc?ref=HMNKXOHN)
1719

1820
**Languages**: [English](README.md) | [Tiếng Việt](docs/vi/README.md) | [日本語](docs/ja/README.md)
@@ -459,6 +461,32 @@ Settings file format (`~/.ccs/gemini-flash.settings.json`):
459461
460462
<br>
461463

464+
## Web Dashboard
465+
466+
CCS includes a modern React 19 dashboard for visual profile management and real-time monitoring:
467+
468+
```bash
469+
# Start the web dashboard (auto-detects available port)
470+
ccs config
471+
472+
# Or specify a port
473+
ccs config --port 3000
474+
475+
# Access at http://localhost:PORT (shown in output)
476+
```
477+
478+
**Dashboard Features**:
479+
- 🎨 **Modern UI**: Built with React 19, TypeScript, and shadcn/ui
480+
- 📊 **Real-time Updates**: WebSocket integration for live status
481+
- ⚙️ **Profile Management**: Visual configuration of all profiles
482+
- 🔍 **Health Monitoring**: System diagnostics and metrics
483+
- 🌙 **Dark Mode**: Eye-friendly theme switching
484+
- 📱 **Responsive**: Works on desktop and mobile
485+
486+
### Dashboard Screenshots
487+
488+
*(Add screenshots here when available)*
489+
462490
## Usage Examples
463491

464492
### Basic Switching

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.9.0
1+
5.9.0-dev.7

0 commit comments

Comments
 (0)