A recall system that actually stops dangerous products from selling

Every week brings another headline: a recalled crib, a defective car seat, a tainted food item that somehow keeps being sold. The notice is posted, the email is sent, but the product still slips through to another family. SafeState flips the script by turning recalls into action rather than words.
Turning notices into enforcement
SafeState runs on Next.js in Vercel and pairs with Amazon Aurora DSQL to block recalled items at the moment of sale. When a second-hand listing appears, the marketplace checks SafeState by serial number before checkout. Recalled units are rejected; safe ones still change hands. The live demo is at safestate.vercel.app and the code is on GitHub.
Why strong consistency matters for safety
Recalls need to propagate instantly across every marketplace, not eventually overnight. Aurora DSQL’s active-active, multi-region setup with strong consistency closes the window where a recalled product might still look safe. Write a recall in one region and read it back in another right away. SafeState’s demo page lets you test the cross-region flow yourself.
The trick that makes it work
SafeState uses Aurora DSQL’s snapshot isolation with optimistic concurrency, but snapshot isolation alone can’t prevent write skew. To guarantee that a recall and a sale collide, both transactions write to the same safety_guard row. The recall updates the epoch number first; the sale’s commit throws SQLSTATE 40001 if it conflicts. A small retry wrapper catches the conflict, backs off with jitter, and runs the transaction again—this time reading the recalled state and returning BLOCKED. No recalled product slips through as safe.
Source: DEV Community. AI-assisted editorial synthesis — TechnoExpress.

