<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tukri</title>
    <description>The latest articles on DEV Community by Tukri (@tukri).</description>
    <link>https://dev.to/tukri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4215521%2Fd0397695-aa51-41e9-a87f-f204efc7a85b.png</url>
      <title>DEV Community: Tukri</title>
      <link>https://dev.to/tukri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tukri"/>
    <language>en</language>
    <item>
      <title>Printing Bangla receipts on a cheap thermal printer straight from the browser</title>
      <dc:creator>Tukri</dc:creator>
      <pubDate>Tue, 03 Nov 2026 16:45:43 +0000</pubDate>
      <link>https://dev.to/tukri/printing-bangla-receipts-on-a-cheap-thermal-printer-straight-from-the-browser-64o</link>
      <guid>https://dev.to/tukri/printing-bangla-receipts-on-a-cheap-thermal-printer-straight-from-the-browser-64o</guid>
      <description>&lt;p&gt;Tukri is a point-of-sale app for small shops in Bangladesh. Shopkeepers asked for receipts to come straight out of a cheap Bluetooth thermal printer when they tap Print, with no print window in between. This is how we did it from a web app, and the traps we hit on the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with sending text
&lt;/h2&gt;

&lt;p&gt;Cheap 58 mm and 80 mm receipt printers speak ESC/POS. Their built-in fonts have no Bangla letters, and their code pages have no Bangla letters or taka sign either. So we cannot send text and ask the printer to print it.&lt;/p&gt;

&lt;p&gt;Text never travels. The browser draws it, and only dots go down the wire.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The server composes the receipt as finished lines&lt;/strong&gt;: text, left/right pairs, rules, the logo, barcode bars. They are already translated, in the shop's digits, with every amount formatted from integer paisa. The browser computes no money and chooses no words.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The browser draws the lines on a canvas exactly as wide as the print head&lt;/strong&gt;: 384 dots for 58 mm paper and 576 for 80 mm at 203 dpi, so nothing is scaled after it is drawn. Bangla is drawn with Noto Sans Bengali, so the browser shapes the conjuncts and the printer's own fonts are never involved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The canvas becomes a 1-bit image with a plain threshold, not a dither.&lt;/strong&gt; The receipt is black text and black bars on white, and a dither would scatter grey dots along the very bar edges a scanner reads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The image goes out as ESC/POS raster commands&lt;/strong&gt;: &lt;code&gt;ESC @&lt;/code&gt; to initialise, &lt;code&gt;GS v 0&lt;/code&gt; for the picture, &lt;code&gt;ESC d n&lt;/code&gt; to feed the paper past the tear bar, and a partial cut (&lt;code&gt;GS V 66 0&lt;/code&gt;) only when the printer is saved as having a cutter. No text mode, no code page, no font commands: those are where the cheap clones differ.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The picture is sent in bands of 128 rows. Several clones have small receive buffers and drop the tail of an oversized image, and 128 rows of a 384-dot head is 6 KB a band.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simplified: one bitmap becomes several GS v 0 commands.&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;raster&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Bitmap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bandRows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;bandRows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bandRows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;header&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="mh"&gt;0x1d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x76&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x00&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                          &lt;span class="c1"&gt;// GS v 0, normal size&lt;/span&gt;
      &lt;span class="nx"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bytesPerRow&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mh"&gt;0xff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bytesPerRow&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;h&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mh"&gt;0xff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;rowBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why the server sends lines instead of a PDF
&lt;/h3&gt;

&lt;p&gt;Our PDFs are rendered on the server, and we wanted to keep one renderer for them. Turning a PDF into dots on the server would have needed an image dependency we do not have, and the image library we do have cannot shape Bangla conjuncts. So the server also produces the receipt as lines, and a test renders the PDF template and checks that every line of the direct receipt appears in it, so the two cannot quietly drift apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the bytes to the printer
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Android, Bluetooth:&lt;/strong&gt; Web Serial over Bluetooth Classic (the Serial Port Profile), not Web Bluetooth. Most cheap printers speak that profile. Our help article asks for Chrome 138 or newer on Android.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SPP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;00001101-0000-1000-8000-00805f9b34fb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;serial&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;requestPort&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;allowedBluetoothServiceClassIds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;SPP&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;bluetoothServiceClassId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SPP&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;baudRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;9600&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bluetooth LE printers:&lt;/strong&gt; Web Bluetooth only lets a page open services it named up front, so a printer on a service we did not list cannot be reached at all. We list only the services documented by the MIT-licensed WebBluetoothReceiptPrinter driver and never add a guessed UUID.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computers:&lt;/strong&gt; Chrome or Edge, with USB or serial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iPhone and iPad:&lt;/strong&gt; no browser there can reach a Bluetooth or USB printer. Tukri turns those choices off on those devices and says why, and the option left is AirPrint through the system print window.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Never resend after bytes have left
&lt;/h2&gt;

&lt;p&gt;If a write fails halfway, we cannot know what is on the paper. So an error carries how many bytes were sent, and anything above zero is marked &lt;code&gt;ambiguous&lt;/code&gt; and is never retried by itself. A write that timed out is not retried either.&lt;/p&gt;

&lt;p&gt;The one exception is a link that died while idle (the printer was switched off and on): its first write fails with nothing sent, so no paper can have moved, and only that case reconnects and sends once more. Half a receipt followed by a whole one is worse than an error message. Print jobs also run one at a time, through a queue.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap: awaiting abort
&lt;/h2&gt;

&lt;p&gt;When a write stalls, we abort the writer. But &lt;code&gt;await writer.abort()&lt;/code&gt; never returns, because abort settles only after the in-flight write it is aborting, which is exactly the thing that is stuck. So every chunk gets a timeout, and the abort is fired and forgotten.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;writer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;writable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getWriter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nf"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;withTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;sent&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Not awaited: abort() waits for the stuck write.&lt;/span&gt;
  &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nx"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abort&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PrintError&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;bytesSent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sent&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;releaseLock&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Labels have their own gotchas
&lt;/h2&gt;

&lt;p&gt;Label printers that speak TSPL take the same kind of bitmap, with two traps. In TSPL a &lt;code&gt;SIZE&lt;/code&gt; without a unit means inches, so we always write &lt;code&gt;mm&lt;/code&gt;. And in &lt;code&gt;BITMAP&lt;/code&gt; a 0 bit prints, the opposite of ESC/POS, so the rows have to be inverted.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we have actually tested
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;On an Android phone, a Bluetooth printer connected and printed the test receipt and new sales' receipts from the installed app. That is the only path we have seen on paper.&lt;/li&gt;
&lt;li&gt;On an iPhone nothing prints, by design.&lt;/li&gt;
&lt;li&gt;USB, Bluetooth LE, label printers and other printer models have only run against simulated devices in our tests. Simulated devices prove our bytes, not that a given printer accepts them, so we do not call those paths working yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing a phone against a dev server without HTTPS
&lt;/h2&gt;

&lt;p&gt;Web Serial needs a secure context, and &lt;code&gt;localhost&lt;/code&gt; counts as one. So with &lt;code&gt;adb reverse tcp:8168 tcp:8168&lt;/code&gt; a phone can open &lt;code&gt;http://localhost:8168&lt;/code&gt; on your dev machine over USB. If the phone's USB port is holding the printer through an OTG adapter, use wireless adb instead. A saved printer belongs to an origin, so &lt;code&gt;localhost&lt;/code&gt; and &lt;code&gt;127.0.0.1&lt;/code&gt; each need their own setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If the printer cannot print your language, draw the page yourself and send dots.&lt;/li&gt;
&lt;li&gt;Put what the receipt says on the server and how it is drawn in the browser, and test that the two agree.&lt;/li&gt;
&lt;li&gt;Threshold, do not dither, anything a scanner has to read.&lt;/li&gt;
&lt;li&gt;Band the raster and keep the commands to the subset every clone implements.&lt;/li&gt;
&lt;li&gt;After the first byte leaves, never resend by yourself.&lt;/li&gt;
&lt;li&gt;Do not claim a printer works until you have seen paper.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tukri is at &lt;a href="https://tukri.bd" rel="noopener noreferrer"&gt;tukri.bd&lt;/a&gt;, with a free plan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: we are the Tukri team. This post was written by an AI agent from our own codebase and project notes, and published by the Tukri team.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>hardware</category>
      <category>bangladesh</category>
    </item>
    <item>
      <title>A 200 that wasn't a save: how fetch() redirects could delete queued POS sales</title>
      <dc:creator>Tukri</dc:creator>
      <pubDate>Tue, 03 Nov 2026 16:40:54 +0000</pubDate>
      <link>https://dev.to/tukri/a-200-that-wasnt-a-save-how-fetch-redirects-could-delete-queued-pos-sales-25o</link>
      <guid>https://dev.to/tukri/a-200-that-wasnt-a-save-how-fetch-redirects-could-delete-queued-pos-sales-25o</guid>
      <description>&lt;p&gt;Tukri is a point-of-sale app for small shops in Bangladesh, and its till keeps working without a connection. When the connection drops, each sale is saved on the device and sent to the server later. This post is about the one decision in that path that destroys money when it is wrong: when is it safe to delete a queued sale from the device?&lt;/p&gt;

&lt;p&gt;We got it wrong once, in a way no test of ours noticed, and fixed it in October. This post describes the mechanism and the rule we use now. It does not claim how many sales, if any, were affected.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the queue works
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A sale rung offline is written to IndexedDB with a client-generated &lt;code&gt;uuid&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When the device is back online, the app (and a service worker, through Background Sync) replays each queued sale with a &lt;code&gt;POST&lt;/code&gt; to the same endpoint the online till uses.&lt;/li&gt;
&lt;li&gt;If the server saved the sale, the device may forget it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The server treats the &lt;code&gt;uuid&lt;/code&gt; as an idempotency key: sending the same sale twice saves it once and answers with the saved sale. That makes retrying always safe. Deleting is the dangerous part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug: a 200 that was not a save
&lt;/h2&gt;

&lt;p&gt;The queue removed a sale when &lt;code&gt;response.ok&lt;/code&gt; was true. And &lt;code&gt;fetch()&lt;/code&gt; follows redirects on its own.&lt;/p&gt;

&lt;p&gt;Our server redirects a signed-in account that has no shop yet to the onboarding page. Now take a till that still holds one shop's queued sales, and let a different account sign in on it: a brand-new sign-up, an invitee, a platform admin. Every replay went like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;POST /pos/sales&lt;/code&gt; is answered with a &lt;code&gt;302&lt;/code&gt; to the onboarding page.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fetch&lt;/code&gt; follows it with a &lt;code&gt;GET&lt;/code&gt;, and the onboarding page answers &lt;code&gt;200&lt;/code&gt; with HTML.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;response.ok&lt;/code&gt; is true, so the sale is removed from the device.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nothing was saved, and every waiting sale was deleted. In a shop, that is cash in the drawer with no sale record behind it.&lt;/p&gt;

&lt;p&gt;No test caught it, because from the server's point of view nothing failed. It never saw a failed save, only a redirect, which is a normal answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule now: ask the response for a receipt
&lt;/h2&gt;

&lt;p&gt;Treat the response as evidence, and require it to name the thing you are about to delete.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A redirect is never a save.&lt;/strong&gt; Replays are sent with &lt;code&gt;redirect: 'manual'&lt;/code&gt;. A redirect (&lt;code&gt;response.redirected&lt;/code&gt;, or &lt;code&gt;response.type === 'opaqueredirect'&lt;/code&gt;) means this session was sent somewhere else, so the sale is kept and the drain stops until an account that may post it signs in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 2xx counts only if its JSON names this sale.&lt;/strong&gt; The server's answer carries the saved sale's &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;uuid&lt;/code&gt;, and the client compares that uuid with the record it is about to delete.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anything else keeps the sale.&lt;/strong&gt; An empty or unrelated 200 (a captive portal, a proxy, a truncated body) is kept and retried later. Because of the idempotency key, a retry after a save that did land is harmless.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A simplified version of the decision:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;redirected&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;body&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;confirmsSale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)?.&lt;/span&gt;&lt;span class="nx"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isInteger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;uuid&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;uuid&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;uuid&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;classify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Answer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redirected&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blocked&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// never a save&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Only a body that names this sale is a receipt. Otherwise keep it and retry.&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;confirmsSale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;synced&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;offline&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// 401/403 keep the sale; a 422 about this sale needs a person; 419 and 5xx are transient.&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;classifyByStatusAndCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server half matters just as much: any endpoint a JSON caller can reach answers a coded 4xx (we use codes such as &lt;code&gt;SHOP_REQUIRED&lt;/code&gt;), never a redirect. That also protects devices still running an older service worker, which you cannot update on demand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three answers, not two
&lt;/h2&gt;

&lt;p&gt;A related mistake: we first had only &lt;code&gt;synced&lt;/code&gt; and &lt;code&gt;failed&lt;/code&gt;, and every 422 was &lt;code&gt;failed&lt;/code&gt;. A failed sale's only button was delete. So a shop whose subscription froze overnight could come back to a queue of real sales, cash already taken at the counter, with nothing to do but bin them one at a time. The queue now tells three situations apart:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;failed&lt;/strong&gt;: the server rejected this sale (a validation error, an oversell). A person has to look at it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;blocked&lt;/strong&gt;: the server rejected the shop or the account (a frozen subscription, a plan limit, a different account signed in). Nothing is wrong with the sale, and it syncs unchanged once that is fixed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;offline&lt;/strong&gt;: nobody rejected anything. Try again later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The comment above our classifier says it plainly: nothing there ever deletes a sale because authorization failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing it without a real shop
&lt;/h2&gt;

&lt;p&gt;The browser tests run against a throwaway database on their own local server, never against real shop data. Their router can be told to answer the replay with a redirect, an empty 200, an unrelated 200, or a refusal for a frozen subscription, so the real client and the real service worker meet each of them over the network. Two details that cost us time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trigger the service worker's sync from a page that has none of the app's code, using the Chrome DevTools Protocol call &lt;code&gt;ServiceWorker.dispatchSyncEvent&lt;/code&gt;. Otherwise the app's own drain gets there first.&lt;/li&gt;
&lt;li&gt;Prove that a redirect was not followed from the server's own request log, not from the browser's network view. Our test runner reported a phantom &lt;code&gt;/onboarding&lt;/code&gt; request that never reached the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Never delete client-side data on &lt;code&gt;response.ok&lt;/code&gt; alone. Ask the response to name what it saved.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fetch()&lt;/code&gt; follows redirects unless you tell it not to. For an API call, a redirect is an error.&lt;/li&gt;
&lt;li&gt;Make writes idempotent, so "when unsure, keep it and retry" is always safe.&lt;/li&gt;
&lt;li&gt;Keep "this record is bad" and "you are blocked" as separate outcomes, with different buttons.&lt;/li&gt;
&lt;li&gt;Make the server answer JSON clients with a coded 4xx instead of a redirect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tukri is at &lt;a href="https://tukri.bd" rel="noopener noreferrer"&gt;tukri.bd&lt;/a&gt;, with a free plan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: we are the Tukri team. This post was written by an AI agent from our own codebase and project notes, and published by the Tukri team.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>pwa</category>
      <category>webdev</category>
      <category>serviceworkers</category>
    </item>
    <item>
      <title>We submitted a Bangla POS app to 50 directories. Here is what actually happened.</title>
      <dc:creator>Tukri</dc:creator>
      <pubDate>Sat, 31 Oct 2026 01:17:22 +0000</pubDate>
      <link>https://dev.to/tukri/we-submitted-a-bangla-pos-app-to-50-directories-here-is-what-actually-happened-5bpa</link>
      <guid>https://dev.to/tukri/we-submitted-a-bangla-pos-app-to-50-directories-here-is-what-actually-happened-5bpa</guid>
      <description>&lt;p&gt;Tukri is a point-of-sale, stock and dues-book app for small shops in Bangladesh. It has a free plan and works offline. When we wrote our outreach plan on 21 October, Search Console showed a single external link to tukri.bd.&lt;/p&gt;

&lt;p&gt;So we took a list of 50 directories and launch sites and tried to get Tukri listed on every one of them, on free plans only.&lt;/p&gt;

&lt;p&gt;This is the scoreboard from our own sign-up log, and what the numbers hide. The counts are as of 30 October 2026. We have no traffic or ranking results yet, so none are claimed here.&lt;/p&gt;

&lt;h2&gt;
  
  
  The scoreboard
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What happened&lt;/th&gt;
&lt;th&gt;Sites&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A public Tukri page exists&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Submitted, waiting in a review queue (not live)&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Account or draft made, one step left&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stopped at a CAPTCHA, bot check or sign-in loop&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Would not save (G2, plus the three sites it feeds)&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free only if a badge or backlink goes on our homepage&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paid only&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Not a fit&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That adds up to 50. The six live pages are Crunchbase, F6S, Peerlist, dev.to, Hashnode and GitLab. Two of them are thin: GitLab is only a profile, and Peerlist is a project page we have not launched. All six used Google sign-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the numbers hide
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Submitted is not live.&lt;/strong&gt; PeerPush put us in a free queue of about three months. Uneed scheduled our free launch for 4 May 2027. whatlaunched.today gave us 27 January 2027. One small directory's own page says more than 82% of free listings there are rejected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Free" often means "free if you link to us".&lt;/strong&gt; Five directories list a product for free only after their badge or a backlink is live on our homepage or footer. Four more are paid only. We bought nothing, and we held back on the badges: what goes in our footer is a product decision, not an outreach task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some listings ask for things we do not have.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One review platform wants a personal work address (not a shared info@ one), at least 100 customers and a LinkedIn page with 10 or more employees. We have none of those yet, so we did not apply.&lt;/li&gt;
&lt;li&gt;One AI-tool directory wants a tick that the product is an AI tool and not a generic service. Tukri is a POS with an AI assistant inside it, and we could not honestly tick that.&lt;/li&gt;
&lt;li&gt;Two developer registries want a public repository or a public MCP endpoint. Tukri's MCP server only works with a shop's own token, so there is nothing safe to list. RapidAPI got an account and nothing else, because Tukri has no public API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Humans still hold the gate.&lt;/strong&gt; Nine sign-ups stopped at a CAPTCHA, a bot wall or a sign-in loop, and a person has to pass the first two. We also stopped on purpose at boxes that declare something personal, such as "I am 16 or older" or "I declare this information is truthful". Those are a person's to tick.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two sites failed for reasons we cannot see.&lt;/strong&gt; G2's Add Product form took every field and returned a generic "Something went wrong while saving your product" on six attempts. It also feeds Capterra, GetApp and Software Advice, so all four are stuck behind it. StartupBlink refused our submission with "Your account email does not use the tukri.bd domain", although the account email is on that domain. We do not know the cause of either. The next step is their support teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we refused to do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ask for votes.&lt;/strong&gt; One site's free launch expects ten upvotes on launch day. We will not ask anyone to vote.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask for reviews&lt;/strong&gt; from people who have not used the product.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep numbers that are not ours.&lt;/strong&gt; One directory had already scraped Tukri and showed a monthly-revenue badge and a starting price that we never reported. We corrected the listing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show Bangla script on English pages.&lt;/strong&gt; Our own repo screenshots contain Bangla product names and the taka sign, so English listings got screenshots without them, and prices are written as BDT.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we would do differently
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start with ten sites, not fifty.&lt;/strong&gt; The other 44 ended in queues, puzzles, paywalls, or a decision about our own footer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the terms before making an account.&lt;/strong&gt; The badge, backlink and price rules are on the submit page and decide whether a site is worth it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log every site with its next step.&lt;/strong&gt; A table with one status per site and the single thing left to do is what let us pick the work back up after every pause.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What comes next
&lt;/h2&gt;

&lt;p&gt;We will watch the referrers in Cloudflare Web Analytics and the Links report in Search Console, and we will not claim a result until we see one.&lt;/p&gt;

&lt;p&gt;If you run a directory with a free route that does not need a badge, tell us in the comments.&lt;/p&gt;

&lt;p&gt;Tukri is at &lt;a href="https://tukri.bd" rel="noopener noreferrer"&gt;tukri.bd&lt;/a&gt;: a free plan, Standard at BDT 250 a month, Premium at BDT 400 a month, and a 14-day trial on the paid plans.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: we are the Tukri team. This post was written by an AI agent from our own sign-up log and published by the Tukri team. The counts come from that log.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>startup</category>
      <category>marketing</category>
      <category>buildinpublic</category>
      <category>bangladesh</category>
    </item>
    <item>
      <title>How to choose a POS and inventory app for a small shop in Bangladesh: a 12-point checklist</title>
      <dc:creator>Tukri</dc:creator>
      <pubDate>Thu, 29 Oct 2026 14:51:20 +0000</pubDate>
      <link>https://dev.to/tukri/how-to-choose-a-pos-and-inventory-app-for-a-small-shop-in-bangladesh-a-12-point-checklist-18aa</link>
      <guid>https://dev.to/tukri/how-to-choose-a-pos-and-inventory-app-for-a-small-shop-in-bangladesh-a-12-point-checklist-18aa</guid>
      <description>&lt;p&gt;Most "best POS" lists are written for shops in other countries. A grocery, pharmacy, garments or electronics shop in Bangladesh has its own needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bangla on screen &lt;strong&gt;and on the printed bill&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;customers who buy on credit (baki);&lt;/li&gt;
&lt;li&gt;internet that drops at the worst moment;&lt;/li&gt;
&lt;li&gt;an owner who runs everything from one phone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use these twelve questions to compare any app before you trust it with your shop.&lt;/p&gt;

&lt;h2&gt;
  
  
  The checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is it fully in Bangla, including invoices?&lt;/strong&gt; A Bangla menu isn't enough. Print a test bill with your shop name and a Bangla product name, and check the letters join correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it keep working without internet?&lt;/strong&gt; Ask specifically: &lt;em&gt;can I bill and record a due while offline, and does it sync by itself afterwards?&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it run on the phone you already have?&lt;/strong&gt; You shouldn't need a special terminal. A barcode scanner or thermal printer should be optional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can it scan barcodes, including with the phone camera?&lt;/strong&gt; Look for search billing too, for loose items without a barcode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it have a real dues book (bakir khata)?&lt;/strong&gt; You want a ledger per customer, a running balance, part payments, and a way to send the customer their statement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Will it warn you before stock runs out?&lt;/strong&gt; Low-stock alerts, and for pharmacies, &lt;strong&gt;batch and expiry tracking&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can it handle your product shape?&lt;/strong&gt; Garments need variants (size and colour); a grocery sells by weight; a wholesaler buys by the box and sells by the piece.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can staff use it without seeing everything?&lt;/strong&gt; Roles should let a cashier bill without seeing your profit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it print the bills you actually use?&lt;/strong&gt; A4 for some customers, 80 mm thermal at the counter, and a shareable digital receipt (SMS or WhatsApp).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Will it tell you your real profit?&lt;/strong&gt; You want daily profit and loss, top products and stock value. If you need it, check for a VAT report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is your data yours?&lt;/strong&gt; Can you &lt;strong&gt;export&lt;/strong&gt; products, customers and records to CSV at any time? Can you delete your account?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What does it really cost as you grow?&lt;/strong&gt; Read the limits of the free plan (users, products, bills a month), the yearly price, and which payment methods it takes (bKash, cards).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A comparison table you can copy
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;App A&lt;/th&gt;
&lt;th&gt;App B&lt;/th&gt;
&lt;th&gt;App C&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Bangla on invoices&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Works offline (bill + dues)&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phone only, no extra hardware&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Barcode / camera scan&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dues book with statements&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low-stock and expiry alerts&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Variants, loose, packs&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Staff roles&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A4 + thermal + digital receipt&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Profit and loss, VAT&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CSV export&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free-plan limits / yearly price&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Test the apps on a real day's work: ring up a few bills, record a part payment, switch the phone to airplane mode and bill again, print one invoice, then export your data. An app that passes that test is worth paying for.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article comes from the Tukri team. Tukri is a Bangla POS, stock and dues-book app for small shops in Bangladesh: &lt;a href="https://tukri.bd/" rel="noopener noreferrer"&gt;https://tukri.bd/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pos</category>
      <category>smallbusiness</category>
      <category>bangladesh</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
