These works are a personal project and in no way associated with my employer.
PWA Template is a lightweight Progressive Web App shell that delivers the base installation experience, theme controls, and update surfaces for future personal finance tools.
- Progressive Web App base – Installable shell with offline caching managed by the service worker.
- Custom Themes – Toggle dark mode or choose alternate visual themes.
- Update tools – Check for service worker updates and review release notes from the built-in changelog.
- Local reset – Clear locally stored data with a single action during testing.
Serve the repository with any static HTTP server. All logic is client-side, so no backend is required. Using file:// will prevent the service worker from registering, so prefer a local HTTP server.
# Example: using a simple Python web server
python -m http.server 8080
# or Node's serve (if installed):
npx serve -l 8080Then visit http://localhost:8080 in your browser.
PWA Template is installable as a Progressive Web App (PWA):
- The
manifest.webmanifestfile describes the app metadata and reuses the sidebar logo for install icons. service-worker.jscaches the core assets so the app can load offline after the first visit.- The
index.htmlfile registers the service worker and includes the manifest and icon references.
To install the app, open it in a supporting browser (Chrome, Edge, or mobile equivalents) and use the “Install”/“Add to Home Screen” option.
- Styles are built with Tailwind CSS (CLI, v3). The source stylesheet is
src/styles.cssand the compiled output isassets/styles.css, which is checked into the repo so GitHub Pages can deploy without a build step. - All application state is stored in
localStorage. Clearing the browser storage resets the app to defaults.
- The Settings page shows the current app version so users can reference it when sharing feedback.
- A pull request workflow (
.github/workflows/pr-version.yml) bumps the semantic version by looking at existingv*tags (or theVERSION_BASEseed), updatesassets/version.json, and stamps the service worker cache identifier so the change is committed alongside the rest of the PR. - The Pages deployment workflow (
.github/workflows/static.yml) reads the checked-in version, creates the matchingv*tag and release on pushes tomain, and prunes older releases to keep only the five most recent. - The base major/minor version is sourced from
VERSION_BASE; edit that file before opening a PR if you need to roll to a new major/minor series. - The service worker cache is stamped with the release version so clients automatically pick up the newest assets without needing to clear site data.
Prerequisite: Node.js 16+ and npm.
Install dependencies (first time only):
npm installBuild once:
npm run build:cssWatch for changes during development:
npm run watch:cssNotes:
- Edit styles in
src/styles.css(uses@tailwind/@layer/@apply). - Do not edit
assets/styles.cssby hand; it is generated. - If you add new HTML/JS files that include Tailwind classes, update
tailwind.config.jscontentglobs so the classes are included in the build.