Skip to content

🎈 A 16kb Preact & Redux based Progressive Web App that offers an offline gallery experience of external images.

License

Notifications You must be signed in to change notification settings

vaneenige/offline-gallery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offline Gallery

A 16kb Preact & Redux based Progressive Web App that offers an offline gallery experience of external images.

This application uses the Service Worker API which allows the user to have control the cache.

This application shows how postMessage() can be used to let the client communicate with the Service Worker to load assets, place them in the cache and display them instantly afterwards.

After loading an external asset it's available offline and can also be removed from the cache.

Click here for a demo!

Structure

To keep performance high and application size small this application is powered by Preact. A 3kb React alternative that works with the same ES6 API. Together with Redux for keeping state it's really fast.

  • Based on Preact Redux Example by developit.

  • Preact based components manage controls of the user to add and remove images.

  • Redux is used to store the state of the application (images, UI state and network based elements).

  • UI is adjusted based on state (opening modal and showing buttons).

  • There's a fallback message if javascript isn't available. The application also works if Service Worker is not supported but it won't work offline.

  • The application works offline, can be saved to the home screen (on android) and stores all the saved images in local storage and the cache.

License

MIT

About

🎈 A 16kb Preact & Redux based Progressive Web App that offers an offline gallery experience of external images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published