offline-sync

Offline-First & Data Sync Specialist Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "offline-sync" with this command: npx skills add abelv22/project-foundation/abelv22-project-foundation-offline-sync

Offline-First & Data Sync Specialist Skill

This skill enables the assistant to design and implement a robust synchronization system to solve the "No Offline Queue" issue (P0).

Knowledge Areas

  1. Local Storage (Native)
  • Room Database: Implementing a local SQLite storage on the Android side to buffer location updates.

  • Data Entities: Defining schema for OfflineLocation that matches the Supabase registros_reten structure.

  1. Synchronization Strategies
  • Background Sync: Using WorkManager for reliable data upload when connectivity returns.

  • Conflict Resolution: Simple timestamp-based resolution for location data.

  • Batched Uploads: Strategies for sending multiple records in a single HTTP request to Supabase to save battery.

  1. Connection Monitoring
  • Network State: Reacting to connectivity changes on both the Web (React) and Native (Java) sides.

  • Failover Logic: Gracefully switching between direct-to-Supabase and local-first modes.

  1. Data Integrity
  • De-duplication: Ensuring the same location point isn't sent twice.

  • Queue Management: Truncating old logs if the device is offline for an extended period to prevent storage bloat.

Guidelines for Responses

  • Prioritize Batched Requests to maximize battery efficiency.

  • Always include Error Handling for network failures in sync logic.

  • Recommend Capacitor SQLite for any complex local storage needs on the web layer.

  • Ensure Data Retention is respected (deleting synced records).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

capacitor-android

No summary provided by upstream source.

Repository SourceNeeds Review
General

supabase-backend

No summary provided by upstream source.

Repository SourceNeeds Review
General

bcn-transport

No summary provided by upstream source.

Repository SourceNeeds Review