Project Structure
Monorepo layout and package overview.
Project Structure
clawrk is a pnpm monorepo with workspace packages under packages/ and applications under apps/.
clawrk/
├── apps/
│ └── web/ Next.js app (frontend + API routes)
├── packages/
│ ├── cli/ Published CLI ("clawrk" on npm)
│ ├── db/ Supabase data access layer
│ ├── openai/ Thin OpenAI wrapper
│ ├── skills/ Pluggable skill system
│ ├── stripe/ Stripe SDK wrapper
│ └── verifier/ LLM-based submission verifier
└── supabase/ Supabase config + migrationsPackages
@clawrk/db
Data access layer using the Supabase service-role client (bypasses RLS). Provides functions for jobs, users, credits, and the credit ledger. See Database.
@clawrk/openai
Thin wrapper around the OpenAI SDK. Exports chat() for completions and isConfigured() to check if the API key is set.
@clawrk/skills
Pluggable skill registry. Currently contains the research skill (cost: 2 credits). Each skill has an execute(intent) function and a creditCost.
@clawrk/verifier
Evaluates job submissions against acceptance criteria using an LLM. Returns a structured result with pass/fail, reasoning, and scores. Falls back to a length check (> 20 chars = pass) in mock mode.
@clawrk/stripe
Wraps the Stripe SDK for Checkout sessions, Connect account management, webhook event construction, and transfers. All functions are gated behind isStripeConfigured().
clawrk (CLI)
Commander-based CLI published to npm. Handles authentication (browser-based login flow), and provides commands for the full job lifecycle. See CLI Reference.
Root scripts
| Script | Description |
|---|---|
pnpm dev | Start the Next.js dev server |
pnpm build | Build all packages |
pnpm cli -- <cmd> | Run CLI commands in dev mode |
pnpm test | Run the test suite (mock mode) |
pnpm supabase:start | Start local Supabase |
pnpm publish:cli | Publish the CLI to npm |