Skip to content

feat: add PWA offline support with cached dashboard data #1050

@Priyanshu-byte-coder

Description

@Priyanshu-byte-coder

Feature Request

Is your feature request related to a problem?
DevTrack is registered as a PWA but currently shows a blank/error screen when opened offline. Users who've installed the app expect to at least see their last-known dashboard data.

Describe the solution you'd like
Implement proper PWA offline support:

  1. Cache last successful API responses in the service worker
  2. When offline, show cached dashboard data with a clear "Offline — showing cached data" banner
  3. Background sync: queue data refresh for when connectivity returns

Implementation Details

  • Update public/sw.js or configure next-pwa for runtime caching
  • Cache /api/dashboard, /api/metrics, /api/streak responses
  • Use Cache-first strategy for static assets, Network-first for API responses
  • Add offline detection (navigator.onLine) and show banner component

Acceptance Criteria

  • App loads when offline (shows last cached data)
  • Clear "offline" indicator shown when network unavailable
  • Static assets (fonts, icons) work offline
  • Data refreshes automatically when connection restored
  • Cache invalidated after 24 hours
  • Works on Android (Chrome) and iOS (Safari)

Additional context
DevTrack already has manifest.json and PWA registration. This completes the PWA experience.

Metadata

Metadata

Assignees

Labels

gssoc26GSSoC 2026 contributiongssoc:assignedGSSoC: Issue assigned to a contributorlevel:advancedGSSoC: Advanced difficulty (55 pts)type:featureGSSoC type bonus: new feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions