Pocket Apps
A set of small, mobile-friendly everyday apps: money, travel, tools and a few for fun. They need no installation or build step and run in any browser.
Live at https://mangoomeh.github.io/pocket-apps/
- Works offline: after the first visit, every app opens without a connection (handy abroad or in a basement
restaurant). A service worker (
sw.js) keeps a copy of every page and file; online, pages still come fresh from the
network.
- Add to Home Screen: each app has its own icon and opens straight into that app, full screen.
- Updates: the home page footer shows the version you're on, and Check for updates fetches a newer one and
reloads into it once it's fully downloaded. An app left open in the background checks when you come back to it,
and reloads by itself when you return to it, or offers a Reload button if you're in the middle of something.
- No half-drawn pages: each app shows a loading skeleton until it has drawn itself (or for 6 seconds at most).
- Your data stays on your phone. Backup on the home screen saves everything (including receipt photos and
the floor plan) to one file for Files, iCloud Drive or Google Drive, and restores it on a new phone. To keep that
data safe:
- The home page shows when the last backup was made, and each app reminds you to make one after two weeks of use
without a backup, or a month after the last (with a one-tap backup and "Later").
- On iPhone, Safari deletes a site's data after 7 days unused, and a Home Screen app keeps its data apart from
Safari, so it starts empty. In Safari the apps explain this, with a backup button and the steps to move to the
Home Screen; a new Home Screen app offers to restore a backup.
- Browsers that block storage (Private Browsing, Block All Cookies, some in-app browsers) get a clear warning.
- Saved data an app can't read is copied aside rather than saved over (
shared/store.js).
Apps
💵 Petty Cash (petty-cash/)
A cash denomination counter with a transaction checker.
- Opening balance setup: enter how many of each note and coin you have (SGD, $100 down to 5¢).
- Transaction checker: enter the purchase amount, tap + for each note or coin you take out, and add any change you
received. Confirm only deducts from your cash on hand when the cash you selected equals the purchase amount.
- History with undo, and low cash warnings. "Export to spreadsheet" saves the history as a CSV file, e.g. for a
reimbursement claim.
- Stats: pick the last 7 or 30 days, this month or all time. A headline total compared with the period before
(this month is compared with the same days last month), tiles for the number of purchases, the average purchase,
cash on hand, how many days it lasts at the last 30 days' rate and any top-ups, then spending per day (per month for
all time) with a tap-for-value tooltip and a table view, what it went on (grouped by note), which notes and coins
were handed over, and the biggest purchases. Undone purchases don't count. Worked out in
src/cash.js
(periodRange, spendStats).
- Two themes: modern, or retro Windows 95 (title bar, bevelled buttons, LCD balance, taskbar). The 🖥️ button in
the header switches between them, and the choice is remembered on that device.
🍣 Sushiro Tracker (sushiro/)
Counts plates during a meal and works out the bill.
- Plate counter: one + and − per plate colour. The defaults are Red $2.30, Silver $2.90, Gold $3.90 and Black $4.90,
and you can edit them under Settings to match your outlet.
- Specials: add any dish at a custom price (ramen, drinks, desserts).
- Live bill: the subtotal plus 10% service charge, then 9% GST on the subtotal and service charge, as Singapore
requires. You can change either rate or set it to 0.
- Saved visits: save each meal with the outlet, the items and the bill, and see this month's visits, plates and spending.
A saved visit keeps the prices it was charged at.
- Receipt check: snap the receipt, or paste its text from iPhone Live Text or Google Lens. The app reads the total
and compares it with what you tracked, for example "The receipt is $2.76 more. Maybe 1 Red plate wasn't counted?".
Text recognition runs on the phone with Tesseract.js, which downloads
about 10 MB on first use. Nothing is uploaded. If the total is misread you can correct it by hand.
- Plate counts from the receipt: Sushiro receipts list items by price (
$2.3 Sushi 20 $46.00), so the scan also
reads each item. Sushi lines are matched to plate colours and shown next to your counts ("Red: receipt 20 · you
19"), and other items (chawanmushi, soup, dishes) are listed. One button fills the meal in from the receipt. The
reader is built to cope with common misreads on thermal paper, and it says when some lines couldn't be read,
because the items then don't add up to the subtotal. Pasting text from Live Text or Google Lens gives the best
results.
- Receipt photos: a compressed copy of each photo is kept with its saved visit in the browser's IndexedDB on that
device.
💸 Split (split/)
Shares costs in a group of friends (a trip, a flat, a dinner) and works out who pays whom.
This is the beginning of the README. Read the rest at the original. Read the full README ↗