A minimal and production-oriented Progressive Web App (PWA) template built with Vite.
This repository is designed to provide a clean, working example of how to correctly set up a PWA without unnecessary complexity, unclear documentation, or hidden magic.
PWA setup in most tutorials is either overcomplicated or incomplete.
This template focuses on:
- Clear and minimal configuration
- Working PWA fundamentals out of the box
- Easy customization of icons, manifest, and themes
- No external PWA libraries or abstractions
- ⚡ Built with Vite
- 📱 Fully configured PWA manifest
- 🌙 Light / dark theme support for icons
- 🍏 iOS-friendly icons and splash screen setup
- 🧩 Optimized favicon system (minimal file set)
- 🔌 Offline support with custom offline page
- 🎯 Clean structure — easy to extend or modify
- 🪶 No external PWA libraries or service worker frameworks
Clone the repository:
git clone https://github.com/eugeneviktorov/pwa-template.git
cd pwa-templateInstall dependencies:
npm installRun development server:
npm run devBuild for production:
npm run buildPreview production build:
npm run previewpublic/
├── favicons
└── manifest.webmanifest
src/
├── components
├── hooks
├── pages
├── ui
├── utils
├── App.tsx
├── main.css
└── main.tsx
This template includes a ready-to-use:
Configured via manifest.webmanifest in the public folder.
A simple custom offline page is displayed when the user loses connection.
No service worker frameworks are used — everything is intentionally minimal.
The template uses an optimized favicon strategy with minimal assets:
favicon-512-512.png→ light theme iconfavicon-180-180.png→ transparent iOS icon (iOS 18+ adaptive background)favicon-32-32.png→ dark theme icon
- Light / dark adaptive icons
- Transparent iOS icon for system-aware backgrounds (iOS 18+)
Favicon variations in this project are based on the following design system:
It demonstrates how to correctly adapt a single icon into multiple formats for:
- light theme
- dark theme
- transparent iOS adaptive icons
Splash screens are generated using an automated canvas-based generator.
For advanced customization or manual generation, you can use:
https://progressier.com/pwa-icons-and-ios-splash-screen-generator
or inspect implementation inside this template.
Most PWA guides online:
- are outdated
- use unnecessary libraries
- hide important configuration details
- don’t explain favicon / iOS behavior properly
This template solves that by providing a working, minimal, and understandable baseline.
- PWA features work only in production builds
- Requires HTTPS in production environments
- Best tested on real devices (especially iOS Safari)
If you find issues or improvements, feel free to open an issue or pull request.