Projects / Case study

Expiry Guard

Expiry date management for supermarkets: an API, a dashboard and a mobile app for scanning in the aisle.

B2B SaaS · In active development
Role
End-to-end design and development
Parts
API, web dashboard, mobile PWA
Delivery
Images built in CI, pulled by the server
Stack
Node.jsExpressPrismaPostgreSQLReactPWAGitHub ActionsDocker
Screenshot of Expiry Guard

The problem

In stores, expiry dates are still largely tracked by hand: staff walk the aisles, write things down, and things get missed. The result is products thrown away that could have been marked down in time, and a compliance risk when an expired product stays on the shelf.

Expiry Guard gives store staff a prioritised list of what needs handling today, fed by what is scanned at reception and in the aisle.

What I built

Three applications around a single REST API. The backend (Node.js, Express, Prisma, PostgreSQL) owns batches, alerts and role-based permissions. The web dashboard is for running the store. The mobile PWA is for the shop floor: scanning a barcode or a GS1-128 logistics label that yields batch and date, thumb-friendly input, and a task list sorted first-expired, first-out.

When a code cannot be read, a photo of the label or the delivery note is read by an AI model, and the user confirms the result before it is saved.

Technical choices

The production server compiles nothing. Docker images are built by GitHub Actions, only after lint, tests and build pass for all three applications, then pushed to a registry. The server only pulls them.

The API address is injected when the container starts, not at build time. A single image serves every environment: changing domain is a redeploy, never a rebuild.

What was hard

One day production answered 404 on a route merged minutes earlier. Several merges in quick succession had started parallel builds, and the “latest” tag had gone to the last build to finish, which was not the newest. Since then only the build whose commit is still the head of the main branch may set that tag, and a health route exposes the commit actually being served.

Another trap: the reverse proxy cache kept the old configuration file despite its “no-store” header, and browsers called a stale API for hours. The file URL is now stamped on every start.