Connect Offline Sync to your Goodspeed app
Write queue and replay logic that keeps user data safe when the device loses connectivity, built into every Goodspeed app via lib/offline.ts. Goodspeed wires Offline Sync into every app that needs it at generation time, so you start with a working integration, not a blank config and a documentation tab.
WHAT GETS WIRED IN
Built into every Offline Sync build
Every app Goodspeed generates with Offline Sync includes these wired integrations from the first build. No manual setup required.
| Item | Description | Strength |
|---|---|---|
| lib/offline.ts detects NetInfo network state and queues Supabase writes in AsyncStorage when the device is offline | lib/offline.ts detects NetInfo network state and queues Supabase writes in AsyncStorage when the device is offline | 01 |
| Queued operations replayed in order on reconnect, without duplicates, using an idempotency key per write | Queued operations replayed in order on reconnect, without duplicates, using an idempotency key per write | 02 |
| UI indicators driven by the useNetworkStatus hook so users know their data is queued and will sync | UI indicators driven by the useNetworkStatus hook so users know their data is queued and will sync | 03 |
| Supabase Realtime reconnect handler triggers queue replay automatically when the WebSocket re-establishes | Supabase Realtime reconnect handler triggers queue replay automatically when the WebSocket re-establishes | 04 |
Source: gas-template repository · offline/sync
REAL GENERATED CODE
A snippet from a Offline Sync integration the pipeline ships
This pattern comes directly from the gas-template codebase. The studio generates Offline Sync integration code like this for every app that includes it, not a placeholder you have to fill in yourself.
Offline write queue
// lib/offline.ts export async function queueWrite<T>( table: string, operation: 'insert' | 'update' | 'delete', payload: T, ): Promise<void> { const queue = await getQueue(); queue.push({ id: uuid(), table, operation, payload, createdAt: Date.now() }); await AsyncStorage.setItem(QUEUE_KEY, JSON.stringify(queue)); } export async function replayQueue(): Promise<void> { const queue = await getQueue(); for (const item of queue) { await supabase.from(item.table)[item.operation](item.payload); } await AsyncStorage.removeItem(QUEUE_KEY); }
Today's log
APPS THAT USE OFFLINE SYNC
Where this integration ships
These app types include Offline Sync as part of the generated stack. Each link goes to a full spec page with capabilities, scored ideas, and a pipeline walkthrough.
- Build a Fitness Tracker appBuilding a fitness tracker means wiring together daily logging, progress charts, Apple Health, and push reminders. Goodspeed generates all of that in a single build, not a patchwork of tutorials. The FITNESS TRACKER APP
- Build a Habit Tracker appHabit trackers live or die on the loop: cue, routine, reward. Goodspeed generates a complete React Native habit tracker with streaks, reminders, and progress visualization, backed by Supabase so your HABIT TRACKER APP
- Build a Productivity App appProductivity apps succeed when they remove friction from the moment the user decides to work. Goodspeed generates a productivity app with Pomodoro timer, focused task queue, distraction blocker hooks,PRODUCTIVITY APP
START WITH OFFLINE SYNC