# Features — pwa (1 for the Road)

Evidence date: 2026-09-28. Source: `git@bitbucket.org:overdrive/pwa.git`.

Status words:

- **Current on `master`** — present at `50d7009` (2021-11-29), the only branch.
- **Unused in the booking page** — file is on `master`, and `index.html` / `scripts/1fortheroad.js` do not call it.
- **Commented out** — markup or code remains, and the live page does not run it.
- **Not in git** — named by the task-creation scan, but not in this clone.

"Current" means current in that git tree. Whether `app.1fortheroad.co.za` still serves this commit is **Unknown / Requires Confirmation**.

## Current on `master`

### Booking page

| Feature | Location | Notes |
|---|---|---|
| Login card | `index.html` `#loginScreen` | Logo `images/logoNew.png`, heading "Login", mobile number, Member, Non Member |
| Unknown-number message | `#otherNumber` | Hidden until a member lookup returns `"0 results"`. Copy tells the person to use a registered number or Non Member with a coupon. "registerd" is the spelling in the page |
| Member booking form | `#alreadyBooked` | "Book a lift", welcome line, pickup, drop-off, time, date, Book Lift, `#map` |
| Voucher booking form | `#copounBooked` | "Book a Lift: Voucher Client", name and surname, pickup, drop-off, time, date, voucher number |
| Success panel | `#responseResult` | "SUCCESS", thanks copy, `#rideSummary`, CLOSE reloads the page |
| Blank-field highlight | `scripts/1fortheroad.js` | Class `customBorderBottom`. Commit `50d7009` |
| Member lookup | `loginVal` → `one_CheckLogin` | |
| Member insert | `bookRide` → `one_BookRide` | |
| Voucher insert | `bookRideCoupon` → `one_BookRideWithVoucher` | Single accepted code `1FTR2021` |
| Trip email | `emailNotify` | To `bookings@1fortheroad.co.za`, subject "New Trip" |
| Places search | `initAutocomplete` | Four address inputs. Map centre defaults to `-33.918861, 18.423300` |
| Geolocation | top of `scripts/1fortheroad.js` | Overwrites the default centre when the browser returns a position |
| `?app` flag | same file | Stores a PWA timeout stamp in `localStorage` |

### API actions the page can hit

| Action | Location | Used by the page |
|---|---|---|
| `one_CheckLogin` | `api/api.php` | Yes, Member button |
| `one_BookRide` | `api/api.php` | Yes, member Book Lift |
| `one_BookRideWithVoucher` | `api/api.php` | Yes, voucher Book Lift |
| `one_GetClientDetails` | `api/api.php` | No caller in `scripts/1fortheroad.js` |
| Static token gate | `api/api.php` and the script | Request `t` must match before the switch runs |

### Web app shell

| Feature | Location | Notes |
|---|---|---|
| Manifest | `_manifest.json` | Name `1FortheRoad`, short name `AppKit`, fullscreen, portrait, start `index.html` |
| Service worker | `_service-worker.js`, registered from `scripts/custom.js` | Cache `Cache-Version-v1`, required file `index.html` only, cache-first fetch |
| Preloader | `#preloader`, hidden by `custom.js` | |
| Theme storage | `scripts/custom.js` | `localStorage` prefix `1FortheRoad` for highlight, gradient, theme, last visit, PWA prompt |
| Online / offline handlers | `scripts/custom.js` | Template handlers. The booking page has no offline-message element checked here |
| Matomo | `index.html` head | Site id `4` at `analytics.siliconsoftware.net` |
| Apple web-app meta | `index.html` head | `apple-mobile-web-app-capable`, black-translucent status bar, touch icon `images/logoNew.png` |

### Template assets still in the tree

| Feature | Location | Notes |
|---|---|---|
| Bootstrap and theme CSS | `styles/bootstrap.css`, `styles/style.css`, `styles/highlights/` | Body uses `theme-light` and `data-highlight="highlight-red"` |
| SCSS sources | `scss/` | Includes page partials for vcard, timeline, map, contact, chat, calendar. The booking page does not navigate to those pages |
| Font Awesome | `fonts/css/fontawesome-all.min.css` | |
| Inter font | Google Fonts link in `index.html` | |
| Starter pages | `_starter_cover.html`, `_starter_large.html`, `_starter_scroll.html`, `_starter_simple.html` | Load `custom.js`. Not linked from `index.html` |
| vCard file | `scripts/vcard.vcf` | Not referenced by `index.html` |
| Plugins | `plugins/charts`, `countdown`, `embedly`, `filterizr`, `galleryViews`, `glightbox` | `custom.js` lazy-loads them when a trigger class exists. The booking page does not use those classes |
| Contact mailer | `php/contact.php` | Posts to `mail@domain.com`. Not used by `index.html` |

### Deploy and scan tooling

| Feature | Location | Notes |
|---|---|---|
| FTP deploy on `master` | `bitbucket-pipelines.yml` | Image `python:3.5.7`. Installs zip, git, git-ftp. Runs `git ftp push`. `git ftp init` is commented. Commit `ea503ba` |
| SonarScanner launcher | `sonar-scanner.bat` | Stock CLI 4.6.2.2472 launcher. `SONAR_SCANNER_HOME` is `C:\sonar-scanner\bin\..`. No project key in the repo |

## Unused in the booking page

| Feature | Location | Notes |
|---|---|---|
| Generic SQL API | `api/api_old.php` | Actions `select`, `insert`, `update`, `delete`. Same token pattern in the header comment style as `api.php` |
| SnapScan payment poll | `api/callback.php`, `api/class.snapscan.php`, `api/class.qrcode.php` | Selects `payments` where `status = 1`, checks SnapScan reference `MOMSTAXI` plus `paymentsId`, sets `status = 2` when SnapScan returns `completed`. Endpoints `https://pos.snapscan.io/qr` and `https://pos.snapscan.io/merchant/api/v1` |
| Table dump helper | `api/dumbdb.php` | `makeRecoverySQL('ride')` reads `SELECT * FROM ride` and builds INSERT text |
| Person user store | `api/db_functions.php`, `api/db_connect.php` | `storeUser` / `getUserByEmailAndPassword` against table `person`. Requires `Config.php`; the tree has `config.php` |
| Old config copy | `api/Config_old.php` | Not read as a second source of truth for this document |
| Dead helper in the live script | `apiRest()` in `scripts/1fortheroad.js` | Builds a generic `a/c/v/t/w` body. No booking function calls it. It references `currentUserId`, which is not defined in the script |

## Commented out

| Feature | Location | Notes |
|---|---|---|
| Android install sheet | `index.html` `#menu-install-pwa-android` | Text "Install 1fortheroad on your Home Screen". Whole block is an HTML comment |
| iOS install sheet | `index.html` `#menu-install-pwa-ios` | "Add 1FortheRoad to the home screen". HTML comment |
| Add-to-home badge demo | `scripts/custom.js` around the iOS and Android badge listeners | JavaScript comments |
| Map bounds bias | `initAutocomplete` | `bounds_changed` listener commented out |
| PWA cache clear on each visit | `custom.js` `pwaNoCache` | Set to `false` |

Git history still records the install UI being changed (`3386a3b`, `63ad7aa`, `281d50b`, `4fd2a24` "update hiding install screens") and a scanner-history removal (`b5dd371` "remove scanner history"). The removed scanner is not in `50d7009`. What it scanned is **Unknown** beyond that commit subject.

## Not in git

| Item | Notes |
|---|---|
| `sonar-project.properties` | Named in the task-creation scan. Not in this clone |
| `sonarqube_scan.bat` | Same |
| `plugins/nscripts` | Named in the task-creation top-level tree. Not in this clone |
| Web-admin voucher section | Comment in `one_BookRideWithVoucher`: "voucher section needs to be build in webadmin". No such app is in the repo |
| SMS confirmation | Promised on the success panel. No SMS client in the repo |
| Tests, README, Composer, npm manifest | Absent |

## Changed late in history

These are the last behaviour changes still visible as commit subjects, all by Russel unless noted:

| Date | Commit | Subject |
|---|---|---|
| 2021-10-04 | `c14ab7e` | "test secure token" |
| 2021-10-17 | `e71420e` | "Update emails sending" |
| 2021-10-25 | `21037ab` | "change notification email back to 1fortheroad's email" |
| 2021-10-25 | `cdd0543` | "revert map changes" after two "test map" commits the same day |
| 2021-11-29 | `c034812` | "change smtp details to gmail details for now" |
| 2021-11-29 | `50d7009` | "blank form validation" |

No commit on `master` is newer than `50d7009`. There is no in-development branch.

## Deprecated or removed

- Pipeline `git ftp init` is commented. `git ftp push` is the active step. Provenance: `bitbucket-pipelines.yml`, commit `ea503ba`.
- Install sheets are commented rather than deleted.
- `api_old.php` remains beside `api.php`. The page posts only to `api/api.php`.

Nothing in the repository labels a feature as deprecated in prose.
