mirror of
https://github.com/crabwise-ai/crabwalk.git
synced 2026-08-14 00:57:52 +00:00
* feat: add OpenClaw integration with client and persistence services - Introduced ClawdbotClient for WebSocket communication with the OpenClaw gateway. - Implemented persistence service for managing session, action, and execution event data. - Added protocol definitions for request and response frames, chat and agent events. - Created utility functions for parsing events and managing collections of sessions and actions. - Included initial documentation for the OpenClaw repository structure and usage. * refactor: update references from Clawdbot to OpenClaw - Renamed instances of Clawdbot to OpenClaw across documentation and codebase. - Updated file paths and configuration references to reflect the new OpenClaw integration. - Adjusted WebSocket connection messages and error handling to align with OpenClaw terminology. - Enhanced README and other documentation to provide accurate information regarding the OpenClaw setup and usage.
1.7 KiB
1.7 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Commands
npm run dev # start dev server on port 3000
npm run build # production build
npm start # run production server (dist/server/server.js)
Architecture
Full-stack React app using TanStack Start (file-based routing, SSR).
Stack:
- TanStack Start + Router (file-based routing)
- tRPC (API layer w/ superjson transformer)
- TanStack Query (data fetching)
- TanStack DB (client-side reactive collections)
- Tailwind CSS v4
- React 19
Key paths:
src/routes/- file-based routes, auto-generatesrouteTree.gensrc/routes/api/trpc.$.ts- tRPC catch-all API handlersrc/integrations/trpc/router.ts- tRPC router definition (appRouter)src/integrations/trpc/client.ts- tRPC clientsrc/integrations/query/provider.tsx- React Query providersrc/router.tsx- TanStack Router config
Path alias: ~/ maps to src/
tRPC pattern: Add procedures to appRouter in router.ts, import trpc from client.ts to call.
TanStack DB pattern: Create collections, use useLiveQuery() for reactive reads, createTransaction() for writes.
OpenClaw (Clawdbot) Monitor
Real-time agent activity monitor at /monitor.
Key paths:
src/integrations/openclaw/- gateway client, protocol types, parser, collectionssrc/components/monitor/- ReactFlow graph, session list, custom nodessrc/routes/monitor/index.tsx- main monitor page
Data flow: openclaw gateway (ws://127.0.0.1:18789) -> TanStack Start server (WS client) -> tRPC -> browser (TanStack DB collections -> ReactFlow)
Config: Set CLAWDBOT_API_TOKEN env var for gateway auth.