Pwa Frappe
A Progressive Web App (PWA) implementation for the Frappe Framework, enabling your applications to be installed and run as native-like apps on both desktop and mobile devices. ๐
- Author: omfsakib
- Repository: https://github.com/omfsakib/pwa_frappe
- GitHub stars: 19
- Forks: 21
- License: MIT
- Category: Developer Tools
- Maintenance: Minimally Maintained
Install Pwa Frappe
bench get-app https://github.com/omfsakib/pwa_frappe
Add the Frappe Gems badge to your README
Maintain Pwa Frappe? Paste this into your README:
[](https://frappegems.com/gems/apps/omfsakib/pwa_frappe)
About Pwa Frappe
๐ PWA Frappe
A Progressive Web App (PWA) implementation for the Frappe Framework, enabling your applications to be installed and run as native-like apps on both desktop and mobile devices. ๐
โจ Features
- โก Progressive Web App Support โ Turn your Frappe site into an installable PWA
- ๐ฑ Cross-Platform Installation โ Works on iOS, Android, and Chrome Desktop
- ๐ Push Notifications โ VAPID-based notifications (๐ฆ Coming Soon!)
- ๐พ Offline-First Architecture โ Smart caching via Service Worker
- ๐จ Customizable Manifest โ Icons, colors, display modes & screenshots
- ๐งฉ Easy Configuration โ Manage everything from simple Frappe DocTypes
๐งฐ Installation
Use bench to install the app:
cd $PATH_TO_YOUR_BENCH
bench get-app https://github.com/omfsakib/pwa_frappe --branch main
bench install-app pwa_frappe
โ๏ธ Configuration
1๏ธโฃ Web App Manifest Setup
Go to Web App Manifest in your Frappe Desk and configure:
- ๐ท๏ธ App Name โ Full name of your app
- ๐ค Short Name โ Short display name
- ๐จ Theme & Background Colors
- ๐งญ Display Mode โ
fullscreen,standalone,minimal-ui, orbrowser - ๐ผ๏ธ Icons โ Upload in multiple sizes (192x192, 512x512 recommended)
- ๐ธ Screenshots & Categories โ For app store appearance
2๏ธโฃ Auto PWA Configuration
Click "Automatically configure PWA" to: - โ Add manifest link to Website Settings - โ Enable PWA features automatically - โ Optionally enable Desk Mode support
3๏ธโฃ Service Worker Setup (Optional)
Visit Service Worker doctype to: - ๐ Generate VAPID keys (coming soon) - โ๏ธ Configure caching and update policies
๐ก Usage
๐ฅ๏ธ Desktop (Chrome/Edge)
- Visit your site
- Click the Install icon in the address bar or select Install [App Name]
๐ฑ Android
- Open your site in Chrome
- Tap Add to Home Screen when prompted
๐ iOS (Safari)
- Open your site in Safari
- Tap Share โ Add to Home Screen โ Add
Visit /install for a full installation guide.
๐งฑ Technical Details
๐ Directory Structure
pwa_frappe/
โโโ pwa_frappe/
โ โโโ doctype/
โ โ โโโ service_worker/ # Service Worker config
โ โ โโโ web_app_manifest/ # Manifest settings
โ โโโ www/
โ โโโ app.html # PWA-enabled Desk template
โ โโโ manifest.json # Dynamic manifest endpoint
โ โโโ sw.js # Service Worker script
โ โโโ pwa.js # Client-side PWA logic
โ โโโ install.html # Installation instructions
๐ง Service Worker Caching
Caches: - Static assets (CSS, JS, images) - Frappe core resources - Custom app assets defined in hooks
Old caches are auto-cleared upon activation ๐
๐ DocTypes
- Web App Manifest โ Main configuration
- Manifest Icon / Screenshot / Category / Related App โ Child tables
- Service Worker โ Caching & notifications config
๐งโ๐ป Development
๐ง Prerequisites
cd apps/pwa_frappe
pre-commit install
๐งน Code Quality
- ๐ Ruff โ Python linting
- ๐ Prettier โ Code formatting
- ๐งญ ESLint โ JavaScript linting
๐งช Testing
bench --site [site-name] run-tests --app pwa_frappe
๐งฉ Customization
๐ Hooks Integration
In your hooks.py:
app_include_js = ["/assets/pwa_frappe/js/pwa.js"]
web_include_js = ["/assets/pwa_frappe/js/pwa.js"]
๐ง Service Worker Extensions
Extend to include custom routes or caching strategies.
๐ Browser Support
โ Chrome (Desktop & Mobile) โ Safari (iOS 11.3+)
โ ๏ธ Limitations
- ๐ง Push notifications not yet implemented
- ๐ HTTPS required for PWA features
- ๐ Limited iOS PWA support
๐งฐ Troubleshooting
โ PWA not installing?
- Ensure HTTPS is enabled
- Verify /manifest.json is reachable
- Check Service Worker registration in DevTools
๐ Service Worker not updating? - Hard refresh (Ctrl+Shift+R) - Clear site data - Update cache version
๐ค Contributing
- Fork this repo
- Create a feature branch
- Run pre-commit checks
- Submit a PR ๐งก
๐ License
MIT License โ see license.txt
๐ Credits
Originally developed by Md Omar Faruk Maintained by the Frappe Community
๐งญ Support
- ๐ Frappe Documentation
- ๐ฌ Frappe Forum
- ๐ Issue Tracker
Related Developer Tools apps for Frappe & ERPNext
- Frappe โ Low code web framework for real world applications, in Python and Javascript
- Frappe Docker โ Docker environment for developing, deploying, and running Frappe applications (ERPNext and custom apps) in production and development
- Builder โ Craft beautiful websites effortlessly with an intuitive visual builder and publish them instantly
- Bench โ CLI to manage Multi-tenant deployments for Frappe apps
- Frappe Ui โ A set of components and utilities for rapid UI development
- Press โ Full service cloud hosting for the Frappe stack - powers Frappe Cloud
- Gameplan โ Open Source Discussions Platform for Remote Teams
- Doppio โ A Frappe app (CLI) to magically setup single page applications and Vue/React powered desk pages on your custom Frappe apps.