Commit Graph

5 Commits

Author SHA1 Message Date
hikari 009a68a0d2 revert: remove PWA functionality due to service worker issues
The PWA implementation was causing too many issues:
- Service worker conflicts with CSP policies
- 429 rate limiting errors
- Application freezing
- External resource blocking

Removed:
- service-worker.js
- manifest.json
- offline.html
- PWA service and install component
- PWA meta tags from index.html
- PWA asset configuration

The library now functions as a standard web app without PWA features.
This provides a more stable and reliable user experience.
2026-02-20 01:07:16 -08:00
hikari c1d2e192da feat: transform library into Progressive Web App (PWA)
Implements issue #52 - adds complete PWA functionality with offline support, installability, and app-like experience.

PWA Features:
- Installable on mobile devices and desktop
- Offline support with smart caching strategies
- App-like experience with standalone display mode
- Full-screen mode and app icon on home screen
- Install prompt with beautiful banner UI

Manifest Configuration:
- Created manifest.json with app metadata
- App name: "Naomi's Library"
- Theme colour: #9d4edd (witchy purple!)
- Background colour: #1a1a2e (dark theme)
- Display mode: standalone (app-like)
- Icons: Multiple sizes specified (72-512px, maskable variants)
- Categories: entertainment, lifestyle

Service Worker Implementation:
- Cache-first strategy for static assets (JS, CSS, fonts, images)
- Network-first strategy for API requests with cache fallback
- Network-first strategy for HTML pages with cache fallback
- Cache versioning: library-v1 (static, dynamic, images)
- Automatic cache cleanup on activation
- Update checking every 60 seconds
- Message handling for cache clearing and skipWaiting

Offline Support:
- Created offline.html fallback page with beautiful UI
- Auto-retry when network comes back online
- Purple gradient matching app theme
- Informative messaging about offline state

Install Prompt:
- Created PwaInstallComponent with banner UI
- Detects installability and shows prompt
- "Install" and "Not Now" actions
- Responsive design for mobile and desktop
- Session storage for dismissal state
- Animated slide-up entrance

Services:
- PwaService: Manages service worker registration, install prompts, cache clearing
- Automatic initialization on app bootstrap
- Signals for reactivity: isInstallable, isInstalled, promptEvent
- Update detection and notification

HTML Updates:
- Added PWA meta tags (theme-color, description)
- Linked manifest.json
- Apple-specific meta tags for iOS support
- Apple touch icon specified

Build Configuration:
- Updated project.json to include PWA assets
- manifest.json, service-worker.js, offline.html copied to dist root

Integration:
- Added PwaService to app bootstrap
- Integrated PwaInstallComponent in main app template
- Install banner appears at bottom of screen
- Dismissible with session storage

Technical Notes:
- Service worker uses efficient caching strategies per resource type
- Handles Chrome extensions and non-HTTP protocols gracefully
- Supports message-based cache clearing
- Includes skipWaiting for immediate updates
- Compatible with iOS, Android, and desktop PWA standards

The library is now a fully-functional Progressive Web App that users can install on any device! The app works offline with cached content and provides an app-like experience with no browser UI in standalone mode.

Note: App icons still need to be generated/provided (placeholder paths specified in manifest).

 This feature was built by Hikari~ 🌸
2026-02-20 00:43:55 -08:00
naomi a9764a4a82 feat: add ability to search 2026-02-04 20:37:51 -08:00
naomi b6d66d34cb feat: initial prototype works
I can log in and create a book! Woo!
2026-02-04 12:17:05 -08:00
naomi 2f38aa3b92 feat: initial scaffolding 2026-02-03 10:09:37 -08:00