WhatsApp-native artisan marketplace for South Africa — FastAPI + WhatsApp Cloud API + Supabase, with an AI job-classification chatbot and B2B property-agency dashboard
# FixZA — SA's artisans. One WhatsApp away. 🇿🇦
A WhatsApp-first marketplace that connects South African customers with **verified
artisans** (plumbers, electricians, painters, and more). No app to download — the
entire customer experience runs inside WhatsApp.
Built with **Python + FastAPI**, the **WhatsApp Business Platform (Cloud API)**,
**PostgreSQL (Supabase)**, and optional **Claude AI** job classification.
```
Customer ──▶ WhatsApp ──▶ Meta Cloud API ──▶ FastAPI (Render)
│
┌─────────────────┼──────────────────┐
▼ ▼ ▼
AI classifier Matching engine Supabase PostgreSQL
(rules + Claude) (distance · rating customers · artisans
· tier · history) jobs · quotes · reviews
│
▼
/stats ──▶ Power BI dashboard
```
## Features
- **Conversation state machine** — greeting → describe problem → share location →
pick from top 3 matches → booked. State is DB-backed, so restarts are safe.
- **Hybrid AI job classification** — instant keyword rules (10 trades, urgency
detection); low-confidence messages escalate to Claude if `ANTHROPIC_API_KEY` is set.
- **Matching engine** — haversine distance (30 km radius) + rating + verification
tier (🥉🥈🥇) + jobs completed + **reliability score**, weighted into a single
documented score (no black-box ranking — see `matching.py`).
- **Artisan-side flow** — job offers with ACCEPT / DECLINE / QUOTE / COMPLETE.
A decline **auto-reassigns to the next-best artisan** instead of dead-ending
the job, and lowers the decliner's future rank. Customers can also report a
**no-show**, which penalizes reliability harder than a decline.
- **Price transparency** — estimated ZAR call-out ranges per trade shown before
the customer books, avoiding surprise pricing.
- **Recurring maintenance scheduling** — agencies can set up recurring jobs
(garden, pool, inspections) on properties, not just reactive breakdowns.
- **Reviews** — job-gated (can't review a job that doesn't exist or isn't
complete), feeds directly into t …