Skip to main content
profClaw is a monorepo with a Hono-based API backend and a React 19 frontend. It runs as a single Node.js process (or serverless on Cloudflare Workers) and stores data in LibSQL/SQLite.

Component Map

Deployment Modes

Request Flow

  1. HTTP request arrives at Hono router (src/server.ts)
  2. Auth middleware validates session cookie or Bearer token
  3. Route handler validates input with Zod schemas
  4. For chat: lazy-loaded runtime (ensureChatRuntime()) processes with AI SDK
  5. For tasks: addTask() enqueues to BullMQ or in-memory queue
  6. Queue worker picks up task, routes to agent adapter via AgentRegistry
  7. Agent executes tools via ChatToolHandler (respecting security mode)
  8. Result stored in LibSQL, notifications dispatched asynchronously

Storage Layer

All persistence goes through the storage adapter (src/storage/):
  • Schema: Drizzle ORM with LibSQL/SQLite backend
  • Tables: users, sessions, tasks, conversations, messages, memory_chunks, experiences, provider_configs, invite_codes
  • Migrations: src/storage/migrations.ts

Key Module Boundaries