feat: add PWA offline support and Firestore offline persistence#668
Conversation
- Configure next-pwa for service worker generation and asset caching - Add web app manifest for installability - Enable Firestore IndexedDB offline persistence, guarded for client-only execution - Handle multi-tab persistence limitation gracefully - Fix Jest version mismatch (25.x -> 30.x) causing test runner crash - Adjust AuthContext test mock for Jest 30 compatibility Closes devpathindcommunity-india#636
|
@Aditya948351 PR ready for review! Implemented next-pwa for service worker caching, web app manifest for installability, and Firestore IndexedDB offline persistence (properly client-guarded). Also fixed an unrelated Jest version mismatch that was crashing the test runner.
Ready whenever you get a chance |
|
@Aditya948351 Fixed the formatting issue — ran Prettier on the files I touched (next.config.ts, package.json, src/app/layout.tsx, src/lib/firebase.ts, src/lib/firestore-offline.ts). Lint and build still passing. Ready for re-review |
Aditya948351
left a comment
There was a problem hiding this comment.
Excellent work! The Firestore offline persistence is implemented perfectly, utilizing persistentMultipleTabManager and gracefully falling back if IndexedDB fails. Updating the test mocks to support the new offline config was also a fantastic touch. Highly appreciable! LGTM! 🚀
|
@Aditya948351 Thank you so much for the kind words and quick review! Really glad the implementation worked out well. Looking forward to contributing more to DevPath-Web . |
@Shiva210Jyoti Loved your change of Implementing this features, Excellent work! The Firestore offline persistence is implemented perfectly. Using Updating the test mocks to seamlessly support the new offline config was also a fantastic touch. I am adding the Keep Contributing More on this Repo! Do star repo if not already! |
|
@Aditya948351 Really appreciate that, thank you! Glad the offline persistence and PWA install flow turned out solid. Will keep an eye out for more issues to pick up here . |
e1b1a4c
into
devpathindcommunity-india:master
Description
Adds PWA capabilities and Firestore offline persistence so users can continue viewing roadmaps and checking off skills without an active internet connection.
Type of Change
✅ New feature
Related Issue
Closes #636
What's Changed
Verification
✅ npm run lint — clean
✅ npm run build — successful, service worker generated at public/sw.js
✅ npm test — 17/17 tests passing
✅ Firestore offline persistence properly scoped to client-side only
✅ Existing auth and data fetching functionality untouched
Closes #636