A modern, opinionated Progressive Web App (PWA) boilerplate built with the latest web technologies. This template provides everything you need to build fast, reliable, and engaging web applications.
fnm use 22
)Clone or use this template
git clone <your-repo-url>
cd sveltekit-pwa-boilerplate
Install dependencies
pnpm install
Generate PWA icons
Run the automated icon generator to create all required PWA icons:
pnpm run icons:generate
This will automatically create all required icons from static/favicon.svg
including:
Alternative manual tools:
# Start development server
pnpm dev
# Start with network access
pnpm dev --host
# Build for production
pnpm build
# Preview production build
pnpm preview
# Run all tests
pnpm test
# Unit tests only
pnpm test:unit
# E2E tests only
pnpm test:e2e
# Run tests in watch mode
pnpm test:unit --watch
# Format code
pnpm format
# Lint code
pnpm lint
# Type check
pnpm check
# Generate PWA icons
pnpm run icons:generate
The app automatically checks for updates and prompts users when new versions are available. Updates are seamless and don't require app store approval.
Optimized for Vercel with:
Pre-configured with:
To add components:
pnpm dlx shadcn-svelte@latest add button
pnpm dlx shadcn-svelte@latest add card
Configured in strict mode for maximum type safety. See tsconfig.json
.
Pre-configured for Svelte, TypeScript, and Tailwind CSS. See eslint.config.js
and .prettierrc
.
Edit static/manifest.json
to customize:
The service worker (src/service-worker.ts
) handles:
Customize caching strategies as needed for your app.
The Vercel adapter is pre-configured for optimal PWA performance.
For other platforms, you may need to:
svelte.config.js
โโโ src/
โ โโโ app.html # HTML template with PWA meta tags
โ โโโ app.css # Global styles & Tailwind imports
โ โโโ service-worker.ts # PWA service worker
โ โโโ lib/
โ โ โโโ components/ # Reusable components
โ โ โ โโโ PWAPrompts.svelte
โ โ โโโ stores/ # Svelte stores
โ โ โโโ pwa.ts # PWA state management
โ โโโ routes/ # SvelteKit routes
โ โโโ +layout.svelte # Root layout
โ โโโ +page.svelte # Homepage
โโโ static/ # Static assets
โ โโโ manifest.json # PWA manifest
โ โโโ favicon.svg # App icon
โ โโโ icons-needed.md # PWA icon requirements
โโโ tests/ # Test files
โโโ package.json # Dependencies & scripts
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License.