Spaces:
Running
A newer version of the Gradio SDK is available: 6.19.0
Local Setup
1. Supabase
Create a Supabase project, then run backend/supabase/migrations/001_initial_schema.sql in the SQL editor or through the Supabase CLI.
Required Supabase features:
- Auth enabled.
- Realtime enabled for
messages,conversations, andmatcheswhen you want live updates. vectorextension enabled by the migration.- Service role key available only to the backend.
2. Stripe
Create either:
- A one-time Price and set
STRIPE_PRICE_ID. - Or leave
STRIPE_PRICE_IDempty and let the backend create dynamic Checkout line items usingENTRY_FEE_CENTS.
Create a webhook endpoint:
POST https://your-backend-domain.com/api/payments/webhook
Subscribe it to:
checkout.session.completed
Set STRIPE_WEBHOOK_SECRET from the webhook signing secret.
3. AI
OpenClaw defaults to a local Phi model served through an OpenAI-compatible endpoint. Recommended local target:
microsoft/Phi-4-mini-instruct
For llama.cpp GGUF inference, start a local server on port 8081:
llama-server `
-hf ysn-rfd/Phi-4-mini-instruct-GGUF:Q4_0 `
--alias microsoft/Phi-4-mini-instruct `
--jinja `
--host 127.0.0.1 `
--port 8081 `
-c 32768
Then configure the backend:
AI_PROVIDER=local
AI_MODEL=microsoft/Phi-4-mini-instruct
LOCAL_AI_BASE_URL=http://127.0.0.1:8081/v1
LOCAL_AI_API_KEY=
The local provider also works with vLLM or SGLang if they expose /v1/chat/completions.
Cloud fallbacks are still supported:
Set one provider:
AI_PROVIDER=anthropic
AI_MODEL=claude-sonnet-4-20250514
ANTHROPIC_API_KEY=...
or:
AI_PROVIDER=grok
AI_MODEL=grok-3-latest
GROK_API_KEY=...
GROK_BASE_URL=https://api.x.ai/v1
Embeddings use an OpenAI-compatible embeddings endpoint:
EMBEDDING_BASE_URL=https://api.openai.com/v1
EMBEDDING_API_KEY=...
EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_DIMENSIONS=1536
The database migration uses vector(1536), so update the migration if you use a different embedding dimension.
4. Backend
cd backend
Copy-Item .env.example .env
npm install
npm run typecheck
npm run build
npm run dev
Health check:
Invoke-RestMethod http://localhost:8080/health
5. Flutter
Install Flutter, then from frontend/:
flutter create --platforms=web,android,ios .
flutter pub get
flutter run `
--dart-define=SUPABASE_URL=https://your-project.supabase.co `
--dart-define=SUPABASE_ANON_KEY=your-anon-key `
--dart-define=BACKEND_URL=http://localhost:8080/api