Transform any web app into a standalone mobile application with one command!
PWA Builder is a tool that lets you create Progressive Web Apps and easily convert them to native Android APKs. It's perfect for developers who want to build standalone mobile apps without dealing with complex native development.
Think of it like create-react-app but for building standalone mobile apps from web technologies.
- π One-Command Setup: Create a new project in seconds
- π± One-Command Build: Build APK with
npm run build - π¨ Automatic Icon Generation: Convert one icon to all required sizes
- βοΈ Simple Configuration: JSON-based config file
- πΈ Camera Support: Built-in camera functionality
- π Local Notifications: Push notifications without a server
- π¦ Fully Standalone: No server required, everything local
- π― Beginner Friendly: Perfect for semi-developers
# Option 1: Run the creator script
cd /path/to/pwa-builder
node create-pwa-app.js
# Option 2: Manual creation
# 1. Copy the 'template' folder
# 2. Rename it to your project name
# 3. Edit build-config.jsonYou'll be prompted to enter:
- Project name
- App display name
- App ID (com.yourname.appname)
- Description
cd your-project-name
npm installnpm run serve
# Visit http://localhost:8000Edit files in:
index.html- Your main HTMLjs/app.js- Your JavaScriptstyles/main.css- Your CSS
npm run buildYour APK will be at: android/app/build/outputs/apk/debug/app-debug.apk
- Node.js (v14+): https://nodejs.org/
- Android Studio: https://developer.android.com/studio
- Android SDK: Installed via Android Studio
pwa-builder/
βββ create-pwa-app.js β Project creator script
βββ package.json β NPX package config
βββ README.md β This file
βββ template/ β Template files
βββ build-config.json β App configuration
βββ build-app.js β Build script
βββ icon-generator.js β Icon generator
βββ package.json β Dependencies
βββ index.html β Starter HTML
βββ manifest.json β PWA manifest
βββ sw.js β Service Worker
βββ js/
β βββ app.js β Starter JavaScript
βββ styles/
β βββ main.css β Starter CSS
βββ icons/ β Generated icons
- Template System: Creates projects from a pre-configured template
- Configuration: Simple JSON file controls all app settings
- Build Process: Automated script handles Capacitor, Android, and APK generation
- Icon Generation: Converts a single source icon to all required sizes
Edit build-config.json in your project:
{
"appName": "My App",
"appId": "com.myname.myapp",
"appDescription": "Does cool things",
"backgroundColor": "#ffffff",
"themeColor": "#4CAF50",
"sourceIcon": "source-icon.png",
"plugins": {
"camera": { "enabled": true },
"notifications": { "enabled": true }
}
}npm run serve # Development server
npm run generate-icons # Generate icons from source image
npm run build # Build APK
npm run clean # Clean and rebuildPerfect for:
- Personal productivity apps
- Offline-first tools
- Games that run locally
- Educational apps
- Hobby projects
- Prototypes
- Internal company tools
node create-pwa-app.js
# Enter: task-manager, Task Manager, com.myname.tasks
cd task-manager
npm install
# Edit files, build app
npm run buildnode create-pwa-app.js
# Enter: photo-journal, Photo Journal, com.myname.journal
cd photo-journal
npm install
# Enable camera in build-config.json
npm run buildπ Complete Documentation β
Quick Links:
- Get Started Guide β Start here!
- Quick Start Tutorial - Step-by-step
- Code Examples - Real app examples
- Plugins Guide - Camera & notifications
- Testing Checklist - Test your builds
- Technical Summary - How it works
- Design Decisions - Philosophy
- Start Simple: Use the template as-is first, then customize
- Test in Browser: Always test with
npm run servebefore building - Use localStorage: Store data locally, no server needed
- High-Quality Icons: Use 1024x1024 PNG for best results
- Clear Cache: Clear browser cache when testing PWA features
Install Android Studio and ensure SDK is at:
- Windows:
C:\Users\<You>\AppData\Local\Android\Sdk - Mac:
~/Library/Android/sdk - Linux:
~/Android/Sdk
- Check Android SDK is installed
- Check Java JDK is available
- Run
npm installin your project - Try
npm run clean
npm install sharpFeel free to:
- Report issues
- Suggest improvements
- Share your projects
MIT - Free to use for any project!
A simplified build system for creating Progressive Web Apps that compile to native Android applications.
Happy Building! π