๐ŸฅคBevFacts

Technical / Overview

The DBNF-1 Specification

Dynamic Beverage Nutrition Facts โ€” the complete technical standard for computing, formatting, and exchanging nutrition facts for made-to-order beverages, as ordered.

DBNF-1 ยท Version 1.0-draft Status: Working Draft License: open, royalty-free Reference impl.: BevFacts app

DBNF exists because the nutrition of a made-to-order drink is decided at the register โ€” by size, sweetness level, syrup pumps, milk choice, and toppings โ€” while every disclosure regime in force today describes a base recipe nobody actually ordered. DBNF closes that gap with three normative pieces: a label format consumers already know how to read, a deterministic calculation model any point-of-sale system can implement, and an interchange format with APIs so labels are machine-readable, addressable, and auditable.

The key words MUST, SHOULD, and MAY are used per RFC 2119 throughout. Content marked Live is implemented in the reference implementation today; content marked Draft is specified ahead of implementation and open for comment.

ยงSpecification documents

ยงSystem architecture

A conforming DBNF system is three components with clean seams:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Recipe database โ”‚ โ”€โ”€โ–ถ โ”‚  Calculation engine  โ”‚ โ”€โ”€โ–ถ โ”‚  Presentation surfaces  โ”‚
โ”‚  base recipes   โ”‚     โ”‚  modifier pipeline   โ”‚     โ”‚  printed label (Part 1) โ”‚
โ”‚  modifier defs  โ”‚     โ”‚  (Part 2)            โ”‚     โ”‚  DBNF document (Part 4) โ”‚
โ”‚  (per vendor)   โ”‚     โ”‚  rounding (Part 3)   โ”‚     โ”‚  QR / APIs (Parts 5โ€“6)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The seams are deliberate: a POS vendor can implement only the engine; a printer vendor only the presentation; a cafรฉ only maintains recipes. Any component can be swapped as long as the interchange format (Part 4) is honored.

ยงReading order

Implementing a label printer or POS plugin? Parts 2 โ†’ 3 โ†’ 1, then validate against the Part 7 checklist.
Integrating with BevFacts today? Part 5 (ยง1โ€“2 are live), with Part 4 for the payload shape.
Building a cup deposit/return program? Part 6, then Part 5 ยง3 for the return endpoints.
Evaluating for policy or procurement? Part 7, then the Manifesto for the legislative context.

ยงTerminology

TermDefinition
Base recipeThe vendor's published nutrient vector for a drink at a named size, before any customization.
ModifierA typed, ordered transformation of the nutrient vector (size scale, sweetness factor, syrup pump, espresso shot, milk substitution, topping).
Computed valuesThe unrounded output of the calculation pipeline for the as-ordered drink.
Declared valuesComputed values after declaration rounding (Part 3) โ€” what is printed.
DBNF documentThe canonical JSON record of one as-ordered drink: base + modifiers + computed + declared (Part 4).
Nutrient vectorThe 12-tuple: calories, total fat, saturated fat, trans fat, cholesterol, sodium, total carbohydrate, fiber, total sugars, added sugars, protein, caffeine.
FleetThe set of returnable cups operated by one deposit program (Part 6).

ยงChangelog

VersionChanges
1.0-draft.3Split the spec into Parts 1โ€“7; added compact linear format, milk/topping reference tables, JSON Schema, webhook signatures, Luhn mod-16 check digits, conformance checklists.
1.0-draft.2Single-page spec; live JS API (window.BevFacts); hashchange deep-link handling.
1.0-draft.1Initial draft: label format, calculation, rounding, URL API.

Open the reference implementation  Start with Part 1 โ†’