- Add meaningful geolocation error callback with user-facing messages
- Remove auto-call of captureGps() on form load (iOS requires user gesture)
- Increase GPS timeout from 10s to 15s for mobile devices
- Replace get_connection() with get_db() in mobile API (DatabaseConnection
wrapper lacks .cursor() that raw psycopg2 code expects)
- Add device_token_hash column to mobile_device table
- Add isSecure() check: shows banner + blocks getCurrentPosition on HTTP
- Add navigator.permissions probe for geolocation denied state
- Generate self-signed cert with SANs for localhost + LAN IP 10.108.1.215
- Caddyfile listens on :443 with explicit cert (replaces localhost-only tls internal)
- Mount config/caddy/certs in docker-compose
- Gitignore local dev certs
Summary
Adds the Kokonut Field Collector — an offline-first, PWA-ready companion app for field data collection on mobile devices.
What's included
services/mobile/field-collector.html): Single-page app with form rendering, GPS capture, photo upload, offline queue, and syncservices/mobile/api.py): Device registration, form listing, collection sync, and sync status endpoints/api/mobile/*, field collector served at/mobilevia Caddy TLSlocalhost+ LAN IP — iOS users accept the cert warning once, then GPS worksisSecure()check,navigator.permissionsprobe, HTTPS-required banner, 15s timeoutget_connection()(wrapper) toget_db()(raw psycopg2), added missingdevice_token_hashcolumnlist(providers)snapshot inremote_sensing_fetcher.pyto avoid Semgreplist-modify-while-iteratefindingtests/test_common_env.pynow clears production-required env varsHow to test
docker compose up -dhttps://localhost/mobilehttps://10.108.1.215/mobile(accept cert warning)