<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-Bring v2 — a maintained, zero-dependency fork with app-identical category sorting]]></title><description><![CDATA[<p dir="auto">Hi everyone,</p>
<p dir="auto">I’ve tried a longer time ago without success - recently I gave it a second try and surprisingly it’s “working” right now:  David Werth’s  <strong>MMM-Bring</strong>.<br />
It is a lovely little module and I want to be clear up front that all the original credit goes to him. The trouble is that it has not seen any maintenance in roughly six years (the original dates back to 2019), and my recent <code>npm install</code> started throwing security warnings at me.<br />
Rather than let it bit-rot, I reworked it fairly thoroughly and published the result as a fork: <strong><a href="https://github.com/rkorell/MMM-Bring" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/rkorell/MMM-Bring</a></strong>.</p>
<p dir="auto">I thought it might be useful to others here, so here is what changed and, more importantly, why.</p>
<h2>1. The original has been unmaintained for ~6 years</h2>
<p dir="auto">The original module goes back to 2019 and has effectively been dormant since. That is not a criticism — it simply did its job and life moved on. But six years is a long time in Node land: it was written against an older dependency and rendering style, and nobody was around to react when its dependencies started aging out. If you install it today on a current MagicMirror / Node setup, you feel that age immediately (see the next point). My goal with the fork was not to reinvent it, but to bring it back to a state where it installs cleanly, runs on current Node, and can be maintained going forward.</p>
<h2>2. The npm security issues — now zero runtime dependencies</h2>
<p dir="auto">This is what actually pushed me to act. Installing the original pulls in <code>axios ^0.21.2</code> (released back in 2021) and <code>data-store</code>. On that axios line, <code>npm audit</code> reports <strong>two high-severity advisories</strong> — credential leakage across an HTTP-to-HTTPS redirect, and a prototype-pollution issue — plus a transitive <code>follow-redirects</code> advisory. For a module that authenticates with your Bring! account, shipping a known-vulnerable HTTP client is not great.</p>
<p dir="auto">Instead of merely bumping versions, I removed both dependencies entirely. The fork now has <strong>zero runtime dependencies</strong>. All HTTP goes through Node’s built-in <code>fetch</code> (Node 18+), and the auth-token cache is a tiny fs-based JSON file that replaces <code>data-store</code>. The upshot: <code>npm audit</code> is clean, there is nothing to compile, and there is no <code>npm install</code> step at all anymore — you just clone it. Fewer moving parts, no native build, and nothing that can rot silently in the background.</p>
<h2>3. The headline feature: app-identical category sorting</h2>
<p dir="auto">This is the part I am most happy with. The original shows the list in whatever raw order the API returns. The Bring! app, however, groups items into categories (Fruits &amp; Vegetables, Milk &amp; Cheese, Meat &amp; Fish, …) and sorts those categories in an order you can customise per list. I worked out how the app reconstructs that and reproduced it faithfully.</p>
<p dir="auto">There is a new option, <code>useSections</code>, with three modes:</p>
<ul>
<li><code>"off"</code> — the classic flat list in raw API order (the old behaviour).</li>
<li><code>"on"</code> (the default) — items sorted into your list’s category order as one continuous list, without visible headers. Same layout footprint as before, just in the right order.</li>
<li><code>"show"</code> — the same sorting, plus a text header per category, exactly like the app.</li>
</ul>
<p dir="auto">The grouping is genuinely app-identical rather than a guess: it follows your list’s own saved section order (<code>listSectionOrder</code>), honours the sections you have hidden, and shows the localized category names and item names for your list’s language. Items you typed that are not in Bring!'s catalog land in an “own items” section — and even that fallback label is localized (13 language files covering all 20 Bring! locales). Under the hood the canonical item id is kept separate from the translated display name, so marking things bought and adding items keeps working regardless of language. There are screenshots of all three modes in the README if you want to see the difference.</p>
<h2>Other improvements worth mentioning</h2>
<ul>
<li><strong>Backend-driven polling with a cached last-good state.</strong> The node helper owns the refresh cycle, so a browser reload shows data instantly and a transient network blip never blanks the list.</li>
<li><strong>Modern auth.</strong> The access token is refreshed via its refresh token, with a full password re-login only as a fallback.</li>
<li><strong><code>showCount</code>.</strong> An optional count in the title line when the list is longer than <code>maxItems</code>, so you can see there is more than what is shown.</li>
<li><strong>Font licensing tidied up.</strong> The bundled paid “Museo Sans 300” weight was removed; the free 500 weight stays with proper exljbris attribution, and the spec label falls back to the MagicMirror default font.</li>
<li><strong>Touch support retained.</strong> You can still mark items bought and add items via MMM-Keyboard.</li>
</ul>
<h2>Install</h2>
<pre><code>cd ~/MagicMirror/modules
git clone https://github.com/rkorell/MMM-Bring.git
</code></pre>
<p dir="auto">That is it — no <code>npm install</code>. Then add the module block to your <code>config.js</code> (there is a full options table in the README). If you already run the original module, you can simply replace the folder; your <code>config.js</code> entry stays the same. Step-by-step migration notes are in the README.</p>
<h2>Credits and the usual caveat</h2>
<p dir="auto">All credit for the original module goes to <strong>David Werth</strong> (<a href="https://github.com/werthdavid/MMM-Bring" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/werthdavid/MMM-Bring</a>). The API-interaction design was inspired by <strong>miaucl/bring-api</strong> (<a href="https://github.com/miaucl/bring-api" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/miaucl/bring-api</a>), the well-maintained Python client, as a reference for a current, state-of-the-art Bring! implementation.</p>
<p dir="auto">Standard caveat: Bring! offers no official public API, so this — like every Bring! integration — talks to the same private endpoints the app uses. They could change at any time. It has been stable for years, but be aware of that.</p>
<p dir="auto">Repo, README and changelog: <strong><a href="https://github.com/rkorell/MMM-Bring" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/rkorell/MMM-Bring</a></strong>. Feedback, issues and pull requests are very welcome.</p>
<p dir="auto">Hope you will find it useful.<br />
Warmest regards,<br />
Ralf</p>
]]></description><link>https://forum.magicmirror.builders/topic/20297/mmm-bring-v2-a-maintained-zero-dependency-fork-with-app-identical-category-sorting</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 12:58:45 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/20297.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jul 2026 09:27:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Bring v2 — a maintained, zero-dependency fork with app-identical category sorting on Tue, 07 Jul 2026 11:08:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rkorell" aria-label="Profile: rkorell">@<bdi>rkorell</bdi></a> Cool! Would be nice if you would switch on “Issues” in your repos.</p>
]]></description><link>https://forum.magicmirror.builders/post/131538</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/131538</guid><dc:creator><![CDATA[KristjanESPERANTO]]></dc:creator><pubDate>Tue, 07 Jul 2026 11:08:02 GMT</pubDate></item></channel></rss>