Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ inventory/*.local.yaml
node_modules/
dist/
coverage/
*.tsbuildinfo

# Runtime OpenClaw instance artifacts (contain secrets/session data)
instances/*/state/
Expand Down
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Manage OpenClaw organizations with inventory-driven configuration, isolated runt

See `docs/INTEGRATIONS_AND_USE_CASES.md` for details.

## Source Layout
- `src/`: OCO core orchestration modules and admin API server implementation.
- `dashboard/`: React + Vite admin dashboard client.

## Quick Start

### Install
Expand Down Expand Up @@ -170,6 +174,80 @@ Run org-scoped commands with the helper script:
./scripts/org.sh <org> health --instance <instance-id>
```

### Admin API (Phase 1 Foundation)
Start the dashboard API backend:
```bash
oco admin api serve --host 127.0.0.1 --port 4180 --db-path .generated/admin/dashboard.sqlite
```

Open dashboard UI:
- `http://127.0.0.1:4180/admin`

Default login credentials:
- username: `admin`
- password: `admin`

Override via env:
```bash
OCO_ADMIN_USERNAME=<user>
OCO_ADMIN_PASSWORD=<password>
OCO_ADMIN_MASTER_KEY=<encryption-key>
OCO_OPENAI_MONTHLY_LIMIT_USD=<optional-limit>
OCO_ANTHROPIC_MONTHLY_LIMIT_USD=<optional-limit>
```

Current API coverage includes:
- onboarding validate/commit routes for organizations and agents
- organization/instance/agent CRUD and overview
- organization settings + inventory import/export routes
- provider key management (encrypted + redacted)
- usage event ingestion + provider/model/agent usage summaries
- runtime render/deploy/restart/health endpoints (inventory-backed bridge)

Dashboard client stack:
- React 18
- Vite 5 (`base=/admin/` so built assets are served by the API under `/admin`)

### One-Command Stack
Bring up orchestration runtime + admin dashboard API:
```bash
oco stack up
```

Tear down:
```bash
oco stack down
```

Inspect status:
```bash
oco stack status
```

Use `--provider docker|kubernetes` to force provider resolution and `--dry-run` to preview actions.

### Local Dashboard Dev
Start the API in watch mode:
```bash
oco dev up
oco dev logs --lines 200
```

Run the dashboard client with Vite hot reload:
```bash
bun run dashboard:dev
```

Build dashboard assets for API static serving:
```bash
bun run dashboard:build
```

Stop API dev mode:
```bash
oco dev down
```

## Recommended Functional Isolation
Group by credential risk and write scope. For example:
- `discord-knowledge`: read-heavy QA/research agents.
Expand All @@ -181,6 +259,8 @@ Detailed rollout: `docs/E2E_OCO_DISCORD_FUNCTIONAL_AGENTS.md`
## Documentation
Comprehensive documentation is available in `docs/`, including deployment steps, usage examples, and reusable templates.

For the admin dashboard + API build plan, see `docs/ADMIN_DASHBOARD_IMPLEMENTATION_PLAN.md`.

For Google Calendar rollout via `gws`, see `docs/GOOGLE_CALENDAR_GWS_ROLLOUT.md`.

## Security Best Practices
Expand Down
241 changes: 241 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions dashboard/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OCO Admin Dashboard</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@maestro-org/oco-dashboard",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build",
"preview": "vite preview",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"typescript": "^5.7.2",
"vite": "^5.4.8"
}
}
Loading
Loading