Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Game checks
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci --ignore-scripts
- run: npm test
- run: node scripts/build-offline.cjs --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 keptlive

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A browser road-trip game for spotting license plates from all 50 US states.

[Play the game](https://keptlive.github.io/plate-tracker/)
[Play the game](https://plates.kept.live)

## Play

Expand Down Expand Up @@ -30,7 +30,8 @@ Open http://localhost:8080. Keep the same local origin to retain saved progress.

## Deployment

The intended GitHub Pages configuration serves the repository root from `main`.
GitHub Pages serves the repository root from `main` at https://plates.kept.live
(the custom domain is set in the `CNAME` file and the repository Pages settings).
All JavaScript, images and state data must be deployed together. The scripts in
`index.html` load in dependency order.

Expand All @@ -40,7 +41,43 @@ All 50 state cards and outlines, state facts and photos, an image lightbox,
hometown distances, achievements, progress indicators, celebrations, saved
progress, individual removal and confirmed reset.

## Licensing
## Refresh controls and offline play

This repository does not yet specify a reuse license. Image provenance and
reuse terms need review before applying a license to those assets.
- Search by state name or abbreviation. Use All, Missing or Found to narrow the cards.
A just-found card stays visible in Missing while you read it; flip it back or
change the filter/search to refresh the list.
- Keyboard: Tab to a card, then Enter or Space to find/flip it. On its back,
use Remove for the same confirmation as holding a card. Escape closes a popup;
focus returns to the opener. Browser zoom and reduced-motion settings are respected.
- All 31 achievements remain available. Hometown changes update geography awards.
- Once the page says **Ready for offline play**, the game, facts and 74 local photos
can be reopened without the game server. Hometown searches still need internet.
Google Fonts is not included in the offline cache; a system font may be used.
Browser cache eviction can remove the offline copy. Progress still uses the same
local storage keys and origin; it does not sync between devices.
- Unreadable saved data is kept intact and a warning is shown. Reset All explicitly
resets collection/achievement storage, while keeping your hometown.

## Development checks

Node 22 is used in CI. The game itself still needs no build or npm dependencies.
The npm packages are test tools only.

```sh
npm ci --ignore-scripts
npm test
npm run build:offline
node scripts/build-offline.cjs --check
```

Commit the regenerated `sw.js` whenever any cached game file changes. CI rejects a
stale cache manifest. An update waits until existing game tabs close, so a running
session does not mix old and new assets. Localhost previews do not install a worker
unless opened with `?offline-test`; use a fresh preview origin for repeated development.
See [review notes](docs/refresh-review.md) for the baseline, checks and remaining gaps.

## License

The code is released under the [MIT License](LICENSE). The photos in `images/` come from
Wikimedia Commons and keep their own Creative Commons or public-domain licenses
(see `images/attribution.txt`); the MIT License does not cover them.
Loading
Loading