diff --git a/README-WORKBENCH.md b/README-WORKBENCH.md new file mode 100644 index 0000000..14b30b2 --- /dev/null +++ b/README-WORKBENCH.md @@ -0,0 +1,46 @@ +# clawd.bot Workbench Orchestration + +## Prerequisites +- Docker & docker-compose +- External SSD mounted at `/mnt/external_ssd` +- GitHub Desktop (Traderz-AI account) +- Node.js (for management UI, coming next) + +## Usage + +### 1. Deploy Containers +``` +bash scripts/deploy.sh +``` + +### 2. Sync with GitHub +``` +bash scripts/sync-github.sh +``` + +### 3. Add More Containers +Edit `docker-compose.yml` to add more services (trading, coding, etc.), mounting their data to `/mnt/external_ssd/`. + +### 4. Monitoring +- Use `docker-compose ps` to check status +- Use `docker-compose logs -f ` for logs + +### 5. Management UI +- Coming soon: Web UI for user roles, orchestration, and agent monitoring + +--- + +## User Roles +- **Observe**: Can view/interact, no admin/creator access +- **Create**: Full admin/creator access + +## Offline/Online Separation +- All sensitive apps/data/agents run in containers on external SSD +- Online access only for account-based apps, via encrypted URLs/static links + +--- + +## Next Steps +- Build management/orchestration UI (Node.js/React or Python/FastAPI) +- Add more containers as needed +- Integrate agentic task queue and monitoring diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..03117fe --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,37 @@ +version: '3.8' +services: + homeassistant: + image: homeassistant/home-assistant:stable + container_name: homeassistant + restart: unless-stopped + network_mode: host + volumes: + - /mnt/external_ssd/homeassistant:/config + environment: + - TZ=America/New_York # Set your timezone + + gdevelop: + image: gdevelopplatform/gdevelop:latest + container_name: gdevelop + restart: unless-stopped + ports: + - "3000:3000" + volumes: + - /mnt/external_ssd/gdevelop:/workspace + environment: + - TZ=America/New_York + + management-ui: + build: ./ui + container_name: clawd-bot-ui + restart: unless-stopped + ports: + - "4000:4000" + volumes: + - /mnt/external_ssd/ui:/app/data + environment: + - TZ=America/New_York + +# Add more containers for trading, coding, etc. as needed +# All volumes point to external SSD for offline, persistent storage +# Adjust /mnt/external_ssd to your actual SSD mount path diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 0000000..6d5c3cb --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# deploy.sh - Deploy and monitor all containers for clawd.bot workbench +# Prerequisites: Docker, docker-compose, external SSD mounted at /mnt/external_ssd + +set -e + +# Check Docker +if ! command -v docker &> /dev/null; then + echo "Docker not found. Please install Docker." >&2 + exit 1 +fi + +# Check docker-compose +if ! command -v docker-compose &> /dev/null; then + echo "docker-compose not found. Please install docker-compose." >&2 + exit 1 +fi + +# Check SSD mount +if [ ! -d "/mnt/external_ssd" ]; then + echo "External SSD not mounted at /mnt/external_ssd. Please mount it." >&2 + exit 1 +fi + +# Deploy containers +echo "Deploying containers..." +docker-compose up -d + +echo "All containers deployed." + +echo "Container status:" +docker-compose ps + +echo "To monitor logs:" +echo " docker-compose logs -f " diff --git a/scripts/sync-github.sh b/scripts/sync-github.sh new file mode 100644 index 0000000..08da7ac --- /dev/null +++ b/scripts/sync-github.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# sync-github.sh - Sync code with Traderz-AI GitHub Desktop repo +# Prerequisites: GitHub Desktop installed and repo cloned locally + +set -e + +REPO_PATH="/Users/aryansharda/clawd.bot" # Adjust if your repo is elsewhere +cd "$REPO_PATH" + +echo "Pulling latest changes from GitHub..." +git pull origin main + +echo "Pushing local changes to GitHub..." +git add . +git commit -m "Automated sync from deploy script" || echo "No changes to commit." +git push origin main + +echo "Sync complete." diff --git a/ui/Dockerfile b/ui/Dockerfile new file mode 100644 index 0000000..f415da0 --- /dev/null +++ b/ui/Dockerfile @@ -0,0 +1,15 @@ +# Dockerfile for clawd.bot management UI (Node.js/React) +FROM node:20-alpine as build +WORKDIR /app +COPY ./ui/package.json ./ui/package-lock.json ./ +RUN npm install --production=false +COPY ./ui ./ +RUN npm run build + +FROM node:20-alpine +WORKDIR /app +COPY --from=build /app/build ./build +COPY --from=build /app/node_modules ./node_modules +COPY ./ui/server.js ./server.js +EXPOSE 4000 +CMD ["node", "server.js"] diff --git a/ui/README.md b/ui/README.md new file mode 100644 index 0000000..2fd24dd --- /dev/null +++ b/ui/README.md @@ -0,0 +1,31 @@ +# clawd.bot Management UI + +This is a secure, offline-first Node.js/React web interface for managing and monitoring all agentic containers and tasks. + +## Features +- Role-based access (Observe/Create) +- Monitor container status +- Plan, deploy, and orchestrate agents +- Offline-first, secure, and fast + +## Usage + +1. Build and deploy with: + ``` + bash scripts/deploy.sh + ``` +2. Access the UI at http://localhost:4000 (local only by default) + +## Prerequisites +- Docker & docker-compose +- External SSD mounted at `/mnt/external_ssd` +- Node.js (for local development, not needed for container) + +## Security +- UI only accessible on local network by default +- No open ports to the internet unless explicitly enabled +- All data stored on external SSD for offline operation + +--- + +For questions or to extend features, see the main README-WORKBENCH.md. diff --git a/ui/package.json b/ui/package.json new file mode 100644 index 0000000..4fb89e7 --- /dev/null +++ b/ui/package.json @@ -0,0 +1,16 @@ +{ + "name": "clawd-bot-ui", + "version": "0.1.0", + "private": true, + "scripts": { + "start": "node server.js", + "build": "react-scripts build", + "dev": "react-scripts start" + }, + "dependencies": { + "express": "^4.18.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1" + } +} diff --git a/ui/public/index.html b/ui/public/index.html new file mode 100644 index 0000000..b51a74a --- /dev/null +++ b/ui/public/index.html @@ -0,0 +1,11 @@ + + + + + + clawd.bot Workbench UI + + +
+ + diff --git a/ui/server.js b/ui/server.js new file mode 100644 index 0000000..80d2a96 --- /dev/null +++ b/ui/server.js @@ -0,0 +1,21 @@ +const express = require('express'); +const path = require('path'); +const app = express(); + +// Serve static React build +app.use(express.static(path.join(__dirname, 'build'))); + +// API placeholder for future agent orchestration endpoints +app.get('/api/health', (req, res) => { + res.json({ status: 'ok', time: new Date() }); +}); + +// Fallback to React app +app.get('*', (req, res) => { + res.sendFile(path.join(__dirname, 'build', 'index.html')); +}); + +const PORT = process.env.PORT || 4000; +app.listen(PORT, () => { + console.log(`clawd.bot UI running on port ${PORT}`); +}); diff --git a/ui/src/App.js b/ui/src/App.js new file mode 100644 index 0000000..5f0ee61 --- /dev/null +++ b/ui/src/App.js @@ -0,0 +1,19 @@ +import React from 'react'; + +function App() { + return ( +
+

clawd.bot Workbench UI

+

Welcome! This is the management and monitoring interface for your agentic containers and tasks.

+
    +
  • Role-based access (Observe/Create)
  • +
  • Monitor container status
  • +
  • Plan, deploy, and orchestrate agents
  • +
  • Offline-first, secure, and fast
  • +
+

More features coming soon...

+
+ ); +} + +export default App; diff --git a/ui/src/index.js b/ui/src/index.js new file mode 100644 index 0000000..593edf1 --- /dev/null +++ b/ui/src/index.js @@ -0,0 +1,10 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App'; + +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render( + + + +);