Commit Graph

16 Commits

Author SHA1 Message Date
Jeff Emmett 9d8314096b feat: Add comprehensive PWA offline support
- Enhanced service worker with multi-strategy caching:
  - App shell precaching for instant loading
  - Map tiles cache-first with background refresh (max 500 tiles)
  - API requests network-first with cache fallback
  - Static assets stale-while-revalidate
- IndexedDB room state persistence for offline access
- Room state sync in useRoom hook:
  - Saves state to service worker on changes
  - Loads cached state on initial load for offline fallback
- Message handlers for SAVE_ROOM_STATE, GET_ROOM_STATE, CLEAR_CACHES

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:04:07 +01:00
Jeff Emmett 007a7e877f fix: Add fallback to low-accuracy geolocation when GPS times out
- After 2 consecutive timeouts with high accuracy mode, automatically
  switch to low accuracy mode (WiFi/cell-based location)
- Increased maxAge from 5s to 30s to accept older cached positions
- Reduced timeout from 30s to 15s for faster fallback
- Low accuracy mode uses 60s maxAge and 60s timeout for reliability

This helps indoor users who can't get GPS signal.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 10:23:06 +01:00
Jeff Emmett 7410246a01 feat: Fix navigate button and add PWA install prompt
- Navigate button now opens Google Maps directions to friend's location
- Added PWA install banner for non-installed users
- iOS users get manual instructions for Add to Home Screen
- Banner can be dismissed and stays dismissed for session

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:54:25 +01:00
Jeff Emmett d6a20f9500 feat: Add WebSocket-based location refresh for online friends
- Server sends request_location via WebSocket to connected clients
- Falls back to silent push for offline/background clients
- Client responds with current GPS location when requested
- Refresh button now works for online friends (no push subscription needed)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:51:09 +01:00
Jeff Emmett aa501b1778 fix: Add Background Sync API type declarations
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:43:47 +01:00
Jeff Emmett 9c618cffb7 fix: Cast applicationServerKey to ArrayBuffer for strict TypeScript
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:41:36 +01:00
Jeff Emmett 27e8344e7a feat: Add background location sync via service worker
- Add Background Sync API support for location sync when coming back online
- Add silent push notifications for requesting location updates
- Add useServiceWorkerMessages hook for handling SW messages
- Connect service worker to location sharing for background updates

This enables:
- Silent location requests via push without showing notifications
- Automatic location sync when device comes back online
- Service worker communication for background location updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:15:17 +01:00
Jeff Emmett dcb6657966 feat: Add PWA push notifications for room events
- Add service worker (sw.js) for push notification handling
- Add usePushNotifications hook for subscription management
- Add NotificationToggle component in room header
- Update sync server with web-push for sending notifications
- Add VAPID keys configuration
- Notifications for: friend joins, friend leaves, meeting points set

Push notification events:
- Friend joins room: "Friend Joined! 👋"
- Friend leaves room: "Friend Left"
- Meeting point set: "Meeting Point Set! 📍"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:13:16 +01:00
Jeff Emmett eeab19ceac fix: Clean up stale participant sessions from map
- Add cleanupStaleParticipants() to remove participants not seen in last hour
- Use persistent participant ID per browser/room to prevent ghost duplicates
- Fixes issue where old versions of yourself appeared on map reload

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 13:28:35 -05:00
Jeff Emmett 760e27564c feat: Add c3nav indoor map integration with floor selector
- Add c3nav tile proxy API route with session handling
- Add c3nav data API proxy for locations/bounds
- Create IndoorMapView component with MapLibre GL
- Add floor level selector (Level 0-4)
- Tap-to-set-position on indoor map
- Sync indoor positions between participants
- Easter egg: Triple-click Level 0 for "The Underground of the Underground"
- Fix race condition in useRoom when no user data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 19:44:33 -05:00
Jeff Emmett 1a996931b5 Fix location sharing: opt-in by default, stop button clears location from map 2025-12-15 15:47:31 -05:00
Jeff Emmett 6d55e1c5a9 Reduce maxAge to 5 seconds for fresher location updates 2025-12-15 15:45:09 -05:00
Jeff Emmett d8e21b8cdf Fix location sharing: increase timeout, prevent auto-start cycling, graceful error handling 2025-12-15 15:44:34 -05:00
Jeff Emmett 23cbe6caa8 Replace Automerge with simple WebSocket sync
- Remove Automerge dependencies (WASM incompatible with Next.js)
- Add lightweight WebSocket-based sync layer
- Works in local-only mode until sync server deployed
- State persisted in localStorage for reconnection

Ready for deployment - sync server can be added later.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 12:59:22 -05:00
Jeff Emmett 530979978d Add real-time sync, c3nav integration, and PWA icons
Features:
- Automerge-based real-time room sync with CRDT
- c3nav indoor map integration for CCC events
- DualMapView component (auto-switches indoor/outdoor)
- useRoom hook for room state management
- PWA icons and manifest

Infrastructure:
- DNS configured for rmaps.online, www, and *.rmaps.online
- Cloudflare tunnel updated for wildcard subdomains
- Fixed Next.js security update to 14.2.28

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 12:50:28 -05:00
Jeff Emmett dc0661d58a Initial scaffold for rMaps.online
Collaborative real-time friend-finding navigation for events:
- Next.js 14 with TypeScript and Tailwind CSS
- MapLibre GL for outdoor OpenStreetMap rendering
- c3nav API client for CCC indoor navigation
- Zustand for state management
- Location sharing hook with privacy controls
- Room system with subdomain routing middleware
- Docker + docker-compose with Traefik labels

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 12:23:13 -05:00