GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chasebuilds/field-service-pwa: Installable offline-first PWA for trades businesses: job tickets, photos, parts, time, signature, invoice. IndexedDB, TypeScript, Vite.

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
e2e
e2e
 
 
public
public
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
eslint.config.js
eslint.config.js
 
 
index.html
index.html
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playwright.config.ts
playwright.config.ts
 
 
tsconfig.json
tsconfig.json
 
 
vite.config.ts
vite.config.ts
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

field-service-pwa

ci

An installable, offline-first web app for small trades businesses (HVAC, plumbing, electrical). A tech opens a job ticket on a phone, works through a checklist, logs time and parts, takes photos, gets the customer's signature, and hands over a printable invoice. No account, no server. Everything is stored on the device.

Live demo: https://chasebuilds.github.io/field-service-pwa/ (invented customers, sample data loads on first visit; open it on a phone and use "Add to Home Screen" or the Install button in Settings)

Jobs Ticket Invoice
Job list Ticket Invoice

What it does

  • Job tickets: customer, phone (tap to call), address (opens a maps link), schedule, notes, status.
  • Checklist per job, with progress on the list.
  • Time on site: clock in and out, several visits per ticket. Billable time rounds up to a set step (default 15 min) with an optional minimum.
  • Parts used with quantity and unit price. Tax is on parts by default, with a switch to tax labor too.
  • Photos from the camera, shrunk to 1280 px JPEG and kept in IndexedDB.
  • Customer signature drawn on a canvas (finger or mouse).
  • Invoice page with a print stylesheet. "Print or save PDF" uses the browser's print dialog, which includes Save as PDF.
  • Backup: export everything (photos included) to one JSON file, import it on another device. Import keeps the newer copy of each ticket.
  • Works offline: a service worker caches the app shell, so it loads with no signal. Data never leaves the device.

Run it

npm install
npm run dev        # local dev server
npm test           # Vitest: totals, tax, time rounding, IndexedDB, backup
npm run lint && npm run typecheck
npm run e2e        # Playwright smoke test (builds and serves the app first)
npm run build      # production build in dist/

Set VITE_DEMO=1 at build time to load demo data on first visit (the live demo does this). Set BASE_PATH when hosting under a sub-path.

How it is built

TypeScript (strict), Vite, Preact, vite-plugin-pwa (Workbox precache). Money is integer cents and tax is in basis points, so totals never pick up float error. The logic (src/lib/money.ts, time.ts, backup.ts) has no UI dependency and is unit tested. The Playwright test loads the demo, edits a ticket, signs, opens the invoice, then reloads with the network off and checks the app still works.

src/lib/   money, time, db (IndexedDB), backup, demo data, photo resize
src/ui/    Preact screens: job list, ticket, invoice, settings, signature pad
e2e/       Playwright smoke test
tests/     Vitest unit tests

LIMITATIONS

  • Data lives in one browser on one device. Clearing site data or losing the phone loses it unless you exported a backup. There is no sync between devices.
  • Browsers may evict IndexedDB on low storage if the app has not been installed or granted persistent storage. Install it and export backups regularly.
  • The invoice is a print page, not a PDF file the app generates. Save as PDF depends on the browser's print dialog. There is no email or payment link.
  • One user per device. No staff accounts, no customer database beyond what is typed into each ticket.
  • Tax is a single flat rate. No per-item tax, discounts, or deposits.
  • The signature is a drawn image with a timestamp. It is not a legally verified e-signature.
  • The maps link opens a web search URL for the address. It does not check that the address exists.
  • Tested in Chromium (Playwright, Pixel 7 profile). Not tested on iOS Safari or Firefox.
  • Demo customers, addresses and the business are invented.

License

MIT, Chase Builds.

More from Chase Builds

  • local-business-site: A fast one-page website with hours, services, map and a quote button, built from one short file. (live demo)
  • appointment-booking-api: Online booking that never double-books and gets time zones right. (live demo)
  • cost-approach-calculator: Replacement cost, depreciation and land value, with every step shown. (live demo)

All projects, sorted by industry · chasebuilds.github.io

About

Installable offline-first PWA for trades businesses: job tickets, photos, parts, time, signature, invoice. IndexedDB, TypeScript, Vite.

chasebuilds.github.io/field-service-pwa/

Topics

field-serviceoffline-firstpwasmall-businesstypescript

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.