mirror of
https://github.com/ibelick/webclaw.git
synced 2026-08-14 00:57:51 +00:00
chore: split into pnpm monorepo
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
|
||||
## Overview
|
||||
|
||||
WebClaw built with React + TanStack Router + Tailwind CSS v4.
|
||||
WebClaw app lives in `apps/webclaw` and is built with React + TanStack Router + Tailwind CSS v4.
|
||||
|
||||
## Commands
|
||||
|
||||
- `npm run dev` — Start development server
|
||||
- `npm run build` — Build for production
|
||||
- `npm run preview` — Preview production build
|
||||
- `npm run test` — Run tests
|
||||
- `npm run lint` — Run ESLint
|
||||
- `npm run format` — Run Prettier
|
||||
- `npm run check` — Format and lint fix
|
||||
- `pnpm -C apps/webclaw dev` — Start development server
|
||||
- `pnpm -C apps/webclaw build` — Build for production
|
||||
- `pnpm -C apps/webclaw preview` — Preview production build
|
||||
- `pnpm -C apps/webclaw test` — Run tests
|
||||
- `pnpm -C apps/webclaw lint` — Run ESLint
|
||||
- `pnpm -C apps/webclaw format` — Run Prettier
|
||||
- `pnpm -C apps/webclaw check` — Format and lint fix
|
||||
|
||||
## Conventions
|
||||
|
||||
@@ -26,9 +26,9 @@ WebClaw built with React + TanStack Router + Tailwind CSS v4.
|
||||
|
||||
### Routing & Structure
|
||||
|
||||
- Routes live in `src/routes` using TanStack file routing.
|
||||
- Global styles and CSS variables live in `src/styles.css`.
|
||||
- Local environment values go in `.env.local`.
|
||||
- Routes live in `apps/webclaw/src/routes` using TanStack file routing.
|
||||
- Global styles and CSS variables live in `apps/webclaw/src/styles.css`.
|
||||
- Local environment values go in `apps/webclaw/.env.local`.
|
||||
|
||||
### UI & Styling
|
||||
|
||||
|
||||
@@ -1,16 +1,32 @@
|
||||
# WebClaw
|
||||
# WebClaw Monorepo
|
||||
|
||||

|
||||
Fast web client for OpenClaw.
|
||||
|
||||
Fast web client for OpenClaw
|
||||
## Apps
|
||||
|
||||
Currently in beta.
|
||||
- `apps/webclaw`: React + TanStack Router app
|
||||
- `apps/landing`: Minimal landing page
|
||||
|
||||
## Setup
|
||||
|
||||
Create `.env.local` with `CLAWDBOT_GATEWAY_URL` and either `CLAWDBOT_GATEWAY_TOKEN` (recommended) or `CLAWDBOT_GATEWAY_PASSWORD`. These map to your OpenClaw Gateway auth (`gateway.auth.token` or `gateway.auth.password`). Default URL is `ws://127.0.0.1:18789`. Docs: https://docs.openclaw.ai/gateway
|
||||
Create `apps/webclaw/.env.local` with `CLAWDBOT_GATEWAY_URL` and either
|
||||
`CLAWDBOT_GATEWAY_TOKEN` (recommended) or `CLAWDBOT_GATEWAY_PASSWORD`. These map
|
||||
to your OpenClaw Gateway auth (`gateway.auth.token` or `gateway.auth.password`).
|
||||
Default URL is `ws://127.0.0.1:18789`. Docs: https://docs.openclaw.ai/gateway
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
## Landing
|
||||
|
||||
```bash
|
||||
pnpm landing:dev
|
||||
```
|
||||
|
||||
```bash
|
||||
pnpm landing:build
|
||||
```
|
||||
|
||||
The landing deploy bundle is in `apps/landing/dist`.
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Landing</title>
|
||||
<link rel="stylesheet" href="/src/styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="text-4xl font-semibold text-primary-900">Landing</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "webclaw-landing",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev --port 3001",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"vite": "^7.1.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@theme {
|
||||
--color-primary-50: oklch(0.992 0.002 80);
|
||||
--color-primary-100: oklch(0.9821 0 89.88);
|
||||
--color-primary-200: oklch(0.9461 0 89.88);
|
||||
--color-primary-300: oklch(0.95 0.004 80);
|
||||
--color-primary-400: oklch(0.875 0.005 80);
|
||||
--color-primary-500: oklch(0.785 0.006 80);
|
||||
--color-primary-600: oklch(0.67 0.007 80);
|
||||
--color-primary-700: oklch(0.56 0.006 80);
|
||||
--color-primary-800: oklch(0.45 0.005 80);
|
||||
--color-primary-900: oklch(0.35 0.004 80);
|
||||
--color-primary-950: oklch(0.25 0.003 80);
|
||||
}
|
||||
|
||||
body {
|
||||
@apply min-h-screen bg-primary-50 text-primary-900;
|
||||
margin: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { defineConfig } from "vite";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss()],
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "webclaw",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev --port 3000",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"lint": "eslint",
|
||||
"format": "prettier",
|
||||
"check": "prettier --write . && eslint --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@base-ui/react": "^1.1.0",
|
||||
"@hugeicons/core-free-icons": "^3.1.1",
|
||||
"@hugeicons/react": "^1.1.4",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tanstack/react-query": "^5.84.1",
|
||||
"@tanstack/react-router": "^1.132.0",
|
||||
"@tanstack/react-router-devtools": "^1.132.0",
|
||||
"@tanstack/react-router-ssr-query": "^1.131.7",
|
||||
"@tanstack/react-start": "^1.132.0",
|
||||
"@tanstack/router-plugin": "^1.132.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"marked": "^17.0.1",
|
||||
"motion": "^12.29.2",
|
||||
"nitro": "npm:nitro-nightly@latest",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-markdown": "^10.1.0",
|
||||
"remark-breaks": "^4.0.0",
|
||||
"remark-gfm": "^4.0.1",
|
||||
"shiki": "^3.21.0",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"use-stick-to-bottom": "^1.1.2",
|
||||
"vite-tsconfig-paths": "^6.0.2",
|
||||
"ws": "^8.19.0",
|
||||
"zustand": "^5.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tanstack/eslint-config": "^0.3.0",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/react": "^19.2.0",
|
||||
"@types/react-dom": "^19.2.0",
|
||||
"@vitejs/plugin-react": "^5.0.4",
|
||||
"jsdom": "^27.0.0",
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^7.1.7",
|
||||
"vitest": "^3.0.5",
|
||||
"web-vitals": "^5.1.0"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 897 B |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
+3
-3
@@ -16,9 +16,9 @@ export function clearSessionDeleted(id: string) {
|
||||
tombstones.delete(id)
|
||||
}
|
||||
|
||||
export function filterSessionsWithTombstones<T extends { key: string; friendlyId: string }>(
|
||||
sessions: Array<T>,
|
||||
) {
|
||||
export function filterSessionsWithTombstones<
|
||||
T extends { key: string; friendlyId: string },
|
||||
>(sessions: Array<T>) {
|
||||
if (tombstones.size === 0) return sessions
|
||||
const now = Date.now()
|
||||
let changed = false
|
||||
@@ -12,7 +12,7 @@
|
||||
--color-current: currentColor;
|
||||
--color-surface: var(--color-white);
|
||||
--color-ink: var(--color-black);
|
||||
|
||||
|
||||
--color-primary-50: oklch(0.992 0.002 80);
|
||||
--color-primary-100: oklch(0.9821 0 89.88);
|
||||
--color-primary-200: oklch(0.9461 0 89.88);
|
||||
@@ -28,7 +28,7 @@
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
|
||||
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
||||
--font-serif: 'EB Garamond', serif;
|
||||
--font-mono: "JetBrains Mono", monospace;
|
||||
--font-mono: 'JetBrains Mono', monospace;
|
||||
}
|
||||
|
||||
.dark {
|
||||
@@ -4,7 +4,7 @@
|
||||
"**/*.tsx",
|
||||
"eslint.config.js",
|
||||
"prettier.config.js",
|
||||
"vite.config.js"
|
||||
"vite.config.ts"
|
||||
],
|
||||
|
||||
"compilerOptions": {
|
||||
Generated
-9945
File diff suppressed because it is too large
Load Diff
+12
-52
@@ -1,57 +1,17 @@
|
||||
{
|
||||
"name": "webclaw",
|
||||
"name": "webclaw-monorepo",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@9.15.4",
|
||||
"scripts": {
|
||||
"dev": "vite dev --port 3000",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"lint": "eslint",
|
||||
"format": "prettier",
|
||||
"check": "prettier --write . && eslint --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@base-ui/react": "^1.1.0",
|
||||
"@hugeicons/core-free-icons": "^3.1.1",
|
||||
"@hugeicons/react": "^1.1.4",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tanstack/react-query": "^5.84.1",
|
||||
"@tanstack/react-router": "^1.132.0",
|
||||
"@tanstack/react-router-devtools": "^1.132.0",
|
||||
"@tanstack/react-router-ssr-query": "^1.131.7",
|
||||
"@tanstack/react-start": "^1.132.0",
|
||||
"@tanstack/router-plugin": "^1.132.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"marked": "^17.0.1",
|
||||
"motion": "^12.29.2",
|
||||
"nitro": "npm:nitro-nightly@latest",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-markdown": "^10.1.0",
|
||||
"remark-breaks": "^4.0.0",
|
||||
"remark-gfm": "^4.0.1",
|
||||
"shiki": "^3.21.0",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"use-stick-to-bottom": "^1.1.2",
|
||||
"vite-tsconfig-paths": "^6.0.2",
|
||||
"ws": "^8.19.0",
|
||||
"zustand": "^5.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tanstack/eslint-config": "^0.3.0",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/react": "^19.2.0",
|
||||
"@types/react-dom": "^19.2.0",
|
||||
"@vitejs/plugin-react": "^5.0.4",
|
||||
"jsdom": "^27.0.0",
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^7.1.7",
|
||||
"vitest": "^3.0.5",
|
||||
"web-vitals": "^5.1.0"
|
||||
"dev": "pnpm -C apps/webclaw dev",
|
||||
"build": "pnpm -C apps/webclaw build",
|
||||
"landing:dev": "pnpm -C apps/landing dev",
|
||||
"landing:build": "pnpm -C apps/landing build",
|
||||
"landing:preview": "pnpm -C apps/landing preview",
|
||||
"preview": "pnpm -C apps/webclaw preview",
|
||||
"test": "pnpm -C apps/webclaw test",
|
||||
"lint": "pnpm -C apps/webclaw lint",
|
||||
"format": "pnpm -C apps/webclaw format",
|
||||
"check": "pnpm -C apps/webclaw check"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
- apps/*
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB |
Reference in New Issue
Block a user