Getting Started
Setup
Prerequisites, installation, and environment configuration.
Setup
Prerequisites
- Node.js >= 20
- pnpm (
npm i -g pnpmif you don't have it) - Supabase -- local via
supabase startor a hosted project - OpenAI API key (optional -- mock mode works without one)
- Stripe test keys (optional -- credit/payout features are bypassed without them)
Installation
git clone <repo-url> && cd clawrk
pnpm installSupabase setup
Start a local Supabase instance (requires Docker):
pnpm supabase:startThis runs the initial migration at supabase/migrations/00000000000000_init.sql, creating the users, jobs, credit_ledger, and api_keys tables.
Environment variables
Create your .env file:
cp .env.example .envRequired (Supabase)
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase anonymous/public key |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (server-side only) |
SUPABASE_JWT_SECRET | JWT secret for signing CLI login tokens |
When using supabase start, these values are printed to the terminal.
Optional
| Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY | -- | Enables real LLM structuring and verification |
NEXT_PUBLIC_APP_URL | http://localhost:3000 | Public URL of the web app |
STRIPE_SECRET_KEY | -- | Enables credit billing and payouts |
STRIPE_WEBHOOK_SECRET | -- | Webhook signature verification |
STRIPE_PRICE_STARTER | -- | Stripe Price ID for Starter tier |
STRIPE_PRICE_PRO | -- | Stripe Price ID for Pro tier |
STRIPE_PRICE_TEAM | -- | Stripe Price ID for Team tier |
Start the dev server
pnpm devThe Next.js app starts at http://localhost:3000.
Web UI pages
| Page | Purpose |
|---|---|
/sender | Create jobs, view credit balance, buy credits |
/receiver | Browse and accept jobs, submit results, set up payouts |
/pricing | Subscription tiers and Stripe Checkout |
/jobs/<id> | Job detail -- status, output, verification, payout info |