A tool that spots regulars before they drift away
A neighborhood shop owner uploads a card sales CSV. For each customer, it works out how far past their usual visit interval they are, excluding rainy days and holidays, and suggests which regulars to reach out to this week and what to say.

By the numbers
Every figure is a measured value with a source. Values from the rebuilt environment are marked as such.
Unit / E2E / demo-mode E2EReproducible measurement
212 (20 files) / 95 / 9
CI: tsc --noEmit → unit → E2E → demo-mode E2E (.github/workflows/ci.yml), 2026-11-09
Public URL smokeProduction measurement
8/8 (per-visitor isolation, HttpOnly/Secure cookies)
Cloud Run public demo, 2026-11-09, Development log (private)
CI and deploy timeProduction measurement
ci passed in 2 min 4 s, deploy passed in 1 min 23 s
GitHub Actions run history, 2026-11-09, confirmed and reported by the user
2026 public holidaysReproducible measurement
20 days (public office holiday regulation, including local election day)
README.md "2026 holiday basis"
Runtime dependenciesReproducible measurement
2 (csv-parse, gsap)
package.json
A clock for every regular
How this project works, redrawn as one machine. Left alone it tours itself; press or drag to take over.
How it was solved
The POS holds every payment record, yet nobody analyzes it, and the owner realizes "haven't seen them lately" too late. Existing CRMs are complex to set up and built for large franchises.
Narrow it to one job, and always show the reason behind each customer.
Real screens



1. Situation
A neighborhood cafe owner remembers regulars by face but knows neither their names nor their numbers. When a customer who came every 2 weeks has been gone for 5 weeks, the owner notices only much later. The POS holds every payment record, but nobody looks at it. Regulars don't announce that they are leaving, so I figured the only way to keep them is to notice in the very week they stop coming. I defined success as a regular who got a check-in message coming back within 14 days.
2. Scoping
I narrowed the input to a single card sales CSV. I did not build a points app, customer sign-up prompts, bulk ad messaging, or a direct POS integration. Card numbers are hashed the moment they are uploaded and never stored, and names and phone numbers are not collected. The judgment is a delay multiple against each customer's own usual interval. At 2.0x or more, the customer is a regular to reach out to, and public holidays and days with 10mm or more of rain are excluded. The screen speaks only in the owner's terms, such as "usually every 13 days → day 38".
3. Build
| Category | What | Why |
|---|---|---|
| Adopted | CSV parsing (csv-parse), screen motion (GSAP), check-in message model (Qwen), Cloud Run | Keep runtime dependencies at 2 |
| Fixed | 2026 holiday list, pinned reference date, per-visitor isolation on the public demo | So results don't shift with the date or environment |
| Built myself | Delay multiple with rain and holiday correction, Monday briefing, 14-day return check, reason sentences | To always show why this customer |
The public demo separates visitors without login or a database. Only in demo mode, a random cookie switches the data folder per visitor so the existing request handling code runs unchanged, and the folder is deleted 24 hours after last use. Because the instance's disk is in memory, I lowered the visitor cap from 100 to 30 and the cleanup interval from 30 minutes to 10 minutes.
4. What broke
The holiday list. The 19-day list in the code could have contained wrong dates. If one holiday is wrong, the delay multiple changes for every customer whose interval spans that week. Instead of relying on memory, I applied the public holiday and substitute holiday clauses of the public office holiday regulation as written. I removed one day that had no substitution grounds, added local election day and the National Foundation Day substitute, settled on 20 days, and documented the basis in the README.
Different results every day. The delay multiple depends on "today", so the same sample came out as day 38 at 2.9x in screen tests and day 40 at 3.1x in the check output. I added a reference-date environment variable that, if given an invalid date, logs a warning and falls back to today. Checks and demo recordings run with a pinned date, so they produce the same screen whenever they run.
The model messages didn't appear. Even after I set a new key, the check-in messages came out as the default text. Because the response carries the message source, I saw right away that it had silently fallen back to the default. The cause was an old server running on the same port without the config. The new server failed to start because of the port conflict, and the old server was taking the requests. I shut down the old server, ran it again, and confirmed all 3 messages came from the model.
5. Results
| Metric | Value | Scope | Source |
|---|---|---|---|
| Unit / E2E / demo-mode E2E | 212 (20 files) / 95 / 9 | Repository tests | CI, 4 stages |
| Public URL smoke | 8/8 (per-visitor isolation, HttpOnly/Secure cookies) | Public demo | Development log (private) |
| CI and deploy time | ci passed in 2 min 4 s, deploy passed in 1 min 23 s | GitHub Actions | Development log (private) |
| 2026 public holidays | 20 days (public office holiday regulation, including local election day) | Judgment rules | README.md |
| Runtime dependencies | 2 (csv-parse, gsap) | Repository | package.json |
The shops, customers, and sales in the screens and tests are all synthetic data. There is no return rate measured on real store data yet.
6. If I did it again
The first thing to do is run it for 4 weeks on real data at 1 store and compare the return rate of customers who got an alert against the rate of those who came back without one. Right now the CSV has to be reshaped into a 4-column format before upload, so automatic header mapping per card company is needed. The model messages are somewhat generic, for example they don't mention menu items, so the prompt needs work. On the public demo, visitor data disappears when the instance shuts down and the first visit takes a few seconds, which I accepted for a demo.