Offline-first PWA
How digital evaluation works without a network and how it syncs once the connection comes back.
What it is
Digital evaluation is an offline-first PWA (Progressive Web App). That means:
- It opens like a normal web page (it's not a store app).
- Once open, it keeps working even if you lose your connection.
- When the connection comes back, it automatically syncs the data to the server.
Why it matters
A chocolatier's workshop doesn't always have a good connection: cold rooms with thick walls, basements, industrial kitchens with limited WiFi. A tool that crashes whenever coverage drops out is unworkable in practice.
How it works
First open (with a network)
- The panelist opens the unique link. The PWA downloads and is cached in their browser.
- Basic tasting data (samples, protocol, attributes) downloads as well.
- From this point on, the panelist can work even if the connection drops.
During the evaluation (with or without a network)
- Every change is saved locally on the device (IndexedDB / Dexie).
- If there's a network, the changes are sent to the server immediately.
- If there's no network, the changes pile up locally and are sent as soon as the connection comes back.
After sending
- When the panelist taps Confirm and send at the end, the evaluation is marked as completed locally.
- As soon as the device gets a network again, the evaluation uploads to the server and shows up as completed in the leader's tasting detail.
Status indicator
Below the header, the panelist sees a small pill showing the save and sync status. When everything is up to date and there's a connection, the pill hides itself. The states it can show are:
- Saving… — the change is being saved on the device.
- Syncing… / Syncing N pending… — the changes are being sent to the server.
- Offline — no network and nothing pending to send.
- Offline · N saved locally — no network, with changes saved on the device waiting to upload.
- Sync error — something failed while uploading; try again when you have a stable network.
There is no state labeled "Saved": when there's a connection and nothing pending, the pill simply disappears.
What happens if I close the browser
- The data is saved locally. When you open the link again on the same device and the same browser, you get the in-progress evaluation back.
- If you switch devices before syncing, the data on the first device stays there until you reopen it. To avoid losing data: finish the evaluation on the same device where you started it, and make sure you have a network at the end so it can sync.
Honest limitations
- The first open requires a connection to download the PWA and the tasting data.
- Syncing to the server needs a connection (the app can't read minds).
- If you close the browser, you lose the session and the cookie — but the data persists in IndexedDB until you reopen the same link.
Data consent
What the panelist sees when opening the link while the consent gate is active: a privacy notice and a required checkbox before they can start.
Evaluator guide
How a panelist responds to a tasting from their phone: open the link, select the sample by code or QR, fill in the sheet, and submit.