Favorites system
WallWidgy’s favorites system lets you save wallpapers you love with automatic synchronization between local storage and cloud when you sign in.How favorites work
The favorites system uses a hybrid local + cloud approach for maximum reliability:Local storage
Favorites are saved to browser localStorage immediately for instant access
Cloud sync
When signed in, favorites automatically sync to the cloud and across devices
Optimistic updates
Changes appear instantly with background synchronization to the server
Automatic merging
Local and cloud favorites merge automatically when you sign in
Adding favorites
Browse wallpapers
Find a wallpaper you like by browsing categories, searching, or using AI recommendations
Managing favorites
Viewing favorites
Access your favorites page to see all saved wallpapers in one place:- Grid or masonry layout options
- Same filtering and sorting as the main gallery
- Device filter (All/Desktop/Mobile)
- Batch download all favorites
Removing favorites
Click the filled heart icon on any favorite wallpaper to remove it. The change happens instantly.Clearing all favorites
Cloud synchronization
When you sign in with Clerk authentication:- Automatic sync on sign-in - Local favorites merge with cloud favorites
- Real-time updates - Every favorite action syncs to the cloud
- Cross-device access - Access favorites from any device where you’re signed in
- Fallback to local - If cloud sync fails, favorites remain in localStorage
Sync behavior
Implementation details
The favorites system is implemented inhooks/use-favorites.ts:
Toggle favorite implementation
Toggle favorite implementation
Sync local to cloud
Sync local to cloud
Sharing favorites
You can share your favorites collection with others:- Click the “Share” button on the favorites page
- Your favorites are uploaded with a unique shareable link
- Share the link with anyone to let them browse your collection
- Shared collections remain accessible even if you modify your favorites
Best practices
- Sign in for sync - Create an account to backup favorites and access across devices
- Export regularly - Use the share feature to create backups of your collection
- Check cloud status - The loading indicator shows when favorites are syncing
- Clear browser carefully - Clearing browser data will remove local favorites if not synced