Urgent.News

What's breaking now, across thousands of outlets.

Tech

The bakery label is not the page: modelling a shop's information by how often it changes

Every small business site I have worked on makes the same modelling mistake: it treats "the shop's information" as one thing. A bakery makes the mistake visible, because three of its lists change at three completely different speeds — and one of them is fixed to the package by law. The label. Name of the food, ingredients, allergens. Changes when the recipe changes. Must be on the package or on a…

When modelling a shop's information, the primary mistake is treating it as a single entity. A bakery exemplifies this by having three lists with distinct change speeds. The label, containing the bakery's name, ingredients, and allergens, remains unchanged once printed. In contrast, the order changes hourly, while the bake times and sold-out status fluctuate daily.

Treating these lists as one content type results in a chaotic representation, with a fixed label for the package, an allergen list on the website, and a QR code attempting to perform label duties. The reasoning behind this approach is to assign each fact a medium that matches its change rate. Clock-related information, such as shop name and address, should be printed on labels, while hourly details like bake times and sold-out status should be displayed on pages behind a code.

The label's contents depend on the country's regulations. In the US, the FALCPA (2004) mandates allergen declarations, while the FASTER Act added sesame as a ninth allergen in 2023. In the UK, Natasha's Law (2021) requires the name of the food and a full ingredients list with the 14 allergens emphasized. A QR code is not permitted for prepacked-for-direct-sale food in the UK, and a code is a single point of failure in the US.

The model should validate three fields: "may contain," the allergen list, and the allergen advisory statement.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Presence Accuracy: Realtime Lifecycle Guarantees for Collaborative Whiteboard Updates

Short answer: when designing reliable updates for a collaborative whiteboard, make the realtime channel lifecycle treat typing indicators and read receipts as expiring evidence, not durable state…

  • Durable state includes canvas operations only, not typing indicators or cursors.
  • Bind signals to participant session and channel epoch to ensure presence accuracy.
  • Four invariants govern realtime channel lifecycle for reliable updates.

JWT Login in Spring Boot 4 Without jjwt or a Custom Filter

Spring Security already ships everything you need. Here's the whole setup in four small classes. Search "Spring Boot JWT" and most tutorials give you the same recipe. Add the jjwt library.

  • Implement JWT login in Spring Boot 4 using OAuth2 Resource Server module
  • Configure secret key and JwtEncoder/Decoder using Nimbus library
  • Create TokenService to generate tokens for authenticated users

Jason Snell’s HomeView Review

Jason Snell: The hardware is solid and coherent, the screen a pleasure to touch and tilt. In terms of software, though, the HomeView feels like a peculiar amalgam of numerous other Apple products.

More from Saturday 14 November →