Skip to content

Implement PWA offline support with service worker caching and IndexedDB pending transaction queue #385

Description

@Kingsman-99

Overview

Make split-app a fully installable Progressive Web App with offline support. Invoice reads from the last session should be available offline. Pending transactions (pay, approve) submitted while offline should be queued in IndexedDB and auto-submitted when connectivity is restored.

Requirements

  • Configure next-pwa or @ducanh2912/next-pwa for service worker generation
  • Cache strategy: network-first for API routes, cache-first for static assets
  • IndexedDB pending queue: when a transaction fails due to network error, store it in IndexedDB with idb library
  • On reconnect, drain the queue automatically (with retry logic)
  • Offline banner: "You're offline — pending transactions will submit when you reconnect"
  • manifest.json with correct StellarSplit branding (name, icons, theme colour #0B1628)
  • Write unit tests for the queue drain logic

Acceptance Criteria

  • App installs as PWA on mobile and desktop
  • Invoice data visible offline from cache
  • Pending transactions queue and auto-submit on reconnect
  • Offline banner shown correctly
  • manifest.json has correct StellarSplit branding
  • npm run lint passes with zero errors
  • TypeScript compiles with zero errors
  • npm run build succeeds

Definition of Done

All CI checks must pass before the PR is reviewed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions