========================================
[Mon Feb  9 03:49:50 AEDT 2026] CC VPS triggered by Rivet
========================================

Task:
Fix CRITICAL: Location data not being saved. Job posting (contractor/post-job/page.tsx:193-208) and worker signup (worker/signup/page.tsx:214-245) collect suburb but don't convert to PostgreSQL point(lat,lng) format. Database expects location as point but only saving suburb string. This breaks location-based matching. Need to: 1) Add geocoding to convert suburb to lat/lng (Google Maps API or similar), 2) Save as proper PostgreSQL point format. Check how the match algorithm expects location data and fix both forms.
----------------------------------------

Excellent! ✅ 

## Summary

**Fixed CRITICAL location data issue:**

The problem was that job posting and worker signup forms were only saving suburb as text, but the database matching algorithm (`find_matching_workers()`) expects `location` as a PostgreSQL `point(lat,lng)` type for distance-based scoring.

**Changes made:**

1. **Created `/api/geocode` endpoint** - Converts Australian suburbs to lat/lng using Nominatim (OpenStreetMap), no API key needed
   
2. **Updated job posting form** (`contractor/post-job/page.tsx:168-222`) - Now geocodes suburb before saving, stores result in `jobs.location` as point format

3. **Updated worker signup form** (`worker/signup/page.tsx:189-256`) - Now geocodes suburb before saving, stores result in `profiles.location` as point format

4. **Graceful degradation** - If geocoding fails, forms continue with suburb text only (maintains existing functionality)

**How it works:**
- User enters "Parramatta" → API geocodes to `(-33.8148, 151.0016)` → Saves as PostgreSQL point `(-33.8148,151.0016)`
- Matching algorithm now calculates real distances: <1km = 10 pts, <5km = 7 pts, <10km = 5 pts
- This fixes location-based matching which was previously broken (only text matching on suburbs)

**Built, tested, committed, and pushed** ✅

----------------------------------------
[Mon Feb  9 03:52:58 AEDT 2026] Task finished (exit code: 0)
