<?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: Ian</title>
    <description>The latest articles on DEV Community by Ian (@johnsiebyronstack).</description>
    <link>https://dev.to/johnsiebyronstack</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%2F4249262%2F2d25b7d4-82a7-4bbf-a8cd-7b1de312f53d.png</url>
      <title>DEV Community: Ian</title>
      <link>https://dev.to/johnsiebyronstack</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johnsiebyronstack"/>
    <language>en</language>
    <item>
      <title>Building for a market where you can't read the reviews</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:52:41 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/building-for-a-market-where-you-cant-read-the-reviews-2e17</link>
      <guid>https://dev.to/johnsiebyronstack/building-for-a-market-where-you-cant-read-the-reviews-2e17</guid>
      <description>&lt;p&gt;I ship a product primarily for the Japanese market. I don't read Japanese fluently. This is a description of the workaround, and the specific ways it fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Japan
&lt;/h2&gt;

&lt;p&gt;Not strategy, mostly arithmetic. The category I'm in — wedding speeches — has a specific structural property in Japan that it doesn't have in English-speaking markets: there's an established list of words you must avoid (imikotoba / 忌み言葉), and everyone who gives a wedding speech is expected to know it.&lt;/p&gt;

&lt;p&gt;That's a compliance layer. Compliance layers are where software is actually useful, because the value is in not making a mistake rather than in being creative.&lt;/p&gt;

&lt;p&gt;In English, a best man speech has no equivalent list. The problem is "I don't know what to say." In Japanese it's "I don't know what I'm not allowed to say." Different problem, much better fit for a tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workaround stack
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Write in the target language via the model, then verify against rules — not by feel.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I can't tell whether a Japanese paragraph sounds natural. I can tell whether it contains 切る. So the architecture leans on checkable properties: character count, taboo-word absence, required structural elements (opening, self-intro, story, toast).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Publish the rules as data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the etiquette lives in prose I can't evaluate, it's unusable to me. As JSON with a test file, it's something I can assert against. That's &lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;the open dataset&lt;/a&gt; — born from my own inability to check my work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Compete on measurements I can take.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I can't judge whether my Japanese reads better than a competitor's. I can measure that my page has 2,100 characters and theirs has 8,000. So content depth became my proxy metric, and it turns out to matter more than I expected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Treat native-speaker review as a blocker, and be honest when it hasn't happened.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the uncomfortable part: the project's own spec says Japanese content needs native review before it ships. Some of it hasn't had that. I've mitigated with mechanical checks and with sourcing claims to citable pages, but mechanical checks don't catch "this is grammatically fine and culturally odd."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'd rather name that risk than bury it&lt;/strong&gt;, because a solo builder pretending to have solved a language they don't speak is how products get embarrassing in a market they can't see.&lt;/p&gt;

&lt;h2&gt;
  
  
  What specifically goes wrong
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Numbers.&lt;/strong&gt; A 3-minute Japanese speech is ~600–900 characters. A 3-minute English speech is ~350–600 words. If you write one rule for both, one of your locales is badly wrong and you won't notice, because everything renders fine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tone.&lt;/strong&gt; English wedding speeches tolerate self-deprecating humour and mild roasting. Japanese ones are more formal; a joke that lands in Manchester reads as careless in Tokyo. The model needs different instructions per locale, not a translated version of the same instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trust signals.&lt;/strong&gt; Japanese buyers look for different things. A US buyer reads testimonials. A Japanese buyer notices whether the operator is identifiable, whether there's a clear refund policy, whether the site looks maintained. I have no testimonials — I've had zero sales — so the refund policy and the visible maintenance have to carry it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payment expectations.&lt;/strong&gt; Prices in Japan are quoted tax-inclusive. If your checkout adds 10% at the end, it reads as a bait price. This one cost me a real fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  The uncomfortable question
&lt;/h2&gt;

&lt;p&gt;Should I be building for a market I can't read?&lt;/p&gt;

&lt;p&gt;The honest answer is: it depends on whether the product's value is &lt;em&gt;checkable&lt;/em&gt;. Mine is — it's structure, length, and word avoidance. If it were "write something beautiful in Japanese," I'd be a fraud with an API key.&lt;/p&gt;

&lt;p&gt;The boundary I try to hold: &lt;strong&gt;I can build the machine. I can't be the taste.&lt;/strong&gt; Where taste is required, the product needs a human who has it, and until then the right move is to say so.&lt;/p&gt;

&lt;p&gt;If you've built for a market you don't speak the language of, I'm curious whether you found the same line, or a different one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(The product: &lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;Speech Kobo&lt;/a&gt;. The dataset that came out of this constraint: &lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>product</category>
      <category>saas</category>
      <category>startup</category>
    </item>
    <item>
      <title>Index count went 62 91 in five days. Here's what I actually changed.</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:46:27 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/index-count-went-62-91-in-five-days-heres-what-i-actually-changed-3gfc</link>
      <guid>https://dev.to/johnsiebyronstack/index-count-went-62-91-in-five-days-heres-what-i-actually-changed-3gfc</guid>
      <description>&lt;p&gt;Small site, four locales, no ad budget. Search Console at the start of the week: 62 pages indexed, 50 impressions over three months, average position 50.&lt;/p&gt;

&lt;p&gt;Five days later: 91 indexed, 115 impressions, 9 clicks.&lt;/p&gt;

&lt;p&gt;I want to be careful here, because SEO posts are full of "I did X and traffic tripled" claims that don't survive scrutiny. So let me be precise about what changed and what I can't attribute.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I changed
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Compared content depth against competitors, per locale.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I searched the exact query my French page was ranking for (&lt;code&gt;discours mariage frère&lt;/code&gt;, position 82) and measured body text on the top six results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Site&lt;/th&gt;
&lt;th&gt;Body text&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;competitor A&lt;/td&gt;
&lt;td&gt;21,746&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;competitor B&lt;/td&gt;
&lt;td&gt;16,115&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;competitor C&lt;/td&gt;
&lt;td&gt;10,971&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;competitor D&lt;/td&gt;
&lt;td&gt;8,733&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;competitor E&lt;/td&gt;
&lt;td&gt;7,809&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;mine&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3,653&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The page wasn't thin because I was lazy — it was thin because I'd written two examples and called it done, while every competitor was running eight.&lt;/p&gt;

&lt;p&gt;Fix: expanded to four examples plus six FAQ entries, all answering questions the search results themselves implied (how long, what structure, can I mention this, what do I do if I cry). 3,653 → 7,437 characters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Did the same audit on every locale.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Turns out the French pages were the &lt;em&gt;good&lt;/em&gt; ones. Japanese pages averaged 1,455 characters with zero FAQ blocks. Same template, wildly different depth, because I'd written different amounts for different languages at different times.&lt;/p&gt;

&lt;p&gt;Ten Japanese pages: 14,554 → 25,011 characters total.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Added FAQPage markup — but only where the FAQ was visible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the part people get wrong. Structured data has to match rendered content. I generate both from one array so they can't drift:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;faq&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FaqJsonLd&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;faq&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Fixed a locale that had no content at all.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The English example library was an empty array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;exampleLibrary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;ja&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;jaCategories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;withExtraExamples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frCategories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;extraExamples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;es&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;withExtraExamples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;esCategories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;extraExamples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;es&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;en&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="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// ← empty&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;Meanwhile Search Console showed &lt;code&gt;best man speech generator&lt;/code&gt; at position 54 — my best ranking on the entire site — landing on a page with nothing under it. Added five English categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Pushed the URLs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;IndexNow (Bing, Yandex) accepted 28 URLs, HTTP 200. Google was left to the sitemap, since the Indexing API is for job postings and livestreams.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I can't claim
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Five days is too short.&lt;/strong&gt; Google recrawls on its own schedule. Part of the 62 → 91 may be pages that were already queued.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlation with the content work is plausible, not proven.&lt;/strong&gt; I changed five things at once. Classic confounded experiment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Impressions going 50 → 115 is a 3-month cumulative figure&lt;/strong&gt;, so it partly just means time passed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;9 clicks is not a business.&lt;/strong&gt; It's a rounding error.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What did move measurably
&lt;/h2&gt;

&lt;p&gt;The keyword I worked on most specifically:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;impressions&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;avg position&lt;/td&gt;
&lt;td&gt;82.6&lt;/td&gt;
&lt;td&gt;76.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;clicks&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Position improved 6.6 places. Still page 8. Still zero clicks. That's the honest shape of this kind of work — you move, but not into the money.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone starting
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Measure competitors per locale.&lt;/strong&gt; Your site average hides which locale is empty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A page can rank and still be useless.&lt;/strong&gt; Position 54 with no content behind it is worse than position 90 with content, because you're burning the one impression Google gave you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured data mirrors visible content, always.&lt;/strong&gt; One source of truth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expect weeks, not days.&lt;/strong&gt; The feedback loop is the hard part, not the work.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to check the same thing on your own site: pick the query where you rank worst-but-visible, measure the top five results' body text, and compare. If you're at a quarter of their length, you don't have a technical problem.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Site in question: &lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;Speech Kobo&lt;/a&gt;. The open dataset behind its content checks: &lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>buildinpublic</category>
      <category>seo</category>
    </item>
    <item>
      <title>I published my prompt as open data instead of hiding it</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:40:13 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/i-published-my-prompt-as-open-data-instead-of-hiding-it-3bom</link>
      <guid>https://dev.to/johnsiebyronstack/i-published-my-prompt-as-open-data-instead-of-hiding-it-3bom</guid>
      <description>&lt;p&gt;Conventional wisdom for a small AI product: keep your prompts secret. They're the moat.&lt;/p&gt;

&lt;p&gt;I went the other way and published the dataset behind my product's checks as CC-BY-4.0. Here's the reasoning, and where it might be wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the product actually is
&lt;/h2&gt;

&lt;p&gt;It generates wedding speeches. Nine questions in, three drafts out. The interesting part isn't the LLM call — that's an API call and a JSON schema. The interesting part is that Japanese wedding speeches have a list of words you must avoid, called imikotoba (忌み言葉), because they suggest separation or endings.&lt;/p&gt;

&lt;p&gt;Without that list, the model writes fluent text that would make someone's grandmother unhappy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I published the list
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. It isn't actually a moat.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The list is cultural knowledge. It exists in books, in wedding planning sites, in every Japanese etiquette article. I didn't invent it; I compiled it. Treating compiled public knowledge as a secret is a category error — and worse, it means the data quality never improves because nobody can check it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Hiding it made my own code worse.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the data lives inside a prompt string, you can't test it. You can't diff it. You can't notice that &lt;code&gt;終わる／終わり&lt;/code&gt; needs splitting on the slash or the matcher silently misses every variant.&lt;/p&gt;

&lt;p&gt;The moment I pulled it out into a typed JSON structure with a test file, that bug surfaced in five minutes. It had been latent for weeks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. It's a signal, not a giveaway.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Someone who wants a wedding speech is not going to build a matcher, write the prompt, build the UI, and wire up payments — because they found a 4KB JSON file. The overlap between "will use the dataset" and "would have paid $19.90" is approximately zero, and the first group is developers who will mention the source.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it cost
&lt;/h2&gt;

&lt;p&gt;Honestly? Almost nothing measurable. The repository has a modest number of stars. Nobody has cloned the product.&lt;/p&gt;

&lt;p&gt;What it did produce: a reason to write three technical posts, a plausible claim to competence, and the kind of bug-finding that only comes from treating data as data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this advice would be wrong
&lt;/h2&gt;

&lt;p&gt;If your moat is &lt;strong&gt;proprietary data you actually collected&lt;/strong&gt; — user behaviour, hand-labelled corpora that took months, something competitors cannot reproduce — publish that and you're giving away the business.&lt;/p&gt;

&lt;p&gt;The test I'd apply: &lt;em&gt;could a determined competitor reproduce this in a weekend?&lt;/em&gt; If yes, it isn't a moat and hiding it just makes your own engineering worse. If no, keep it.&lt;/p&gt;

&lt;p&gt;Imikotoba is reproducible in a weekend by anyone who reads Japanese. So it was never a moat. I just hadn't said that out loud.&lt;/p&gt;

&lt;h2&gt;
  
  
  The concrete version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Dataset: &lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;github.com/johnsiebyron-stack/imikotoba&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The prompt itself: still private, because it encodes structure and tone decisions that &lt;em&gt;are&lt;/em&gt; product judgement&lt;/li&gt;
&lt;li&gt;The product: &lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;speechkobo.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Line I'm drawing: &lt;strong&gt;facts are open, judgement is private.&lt;/strong&gt; The list of taboo words is a fact. Which one to use instead, in what order, at what length, for which speaker — that's the product.&lt;/p&gt;

&lt;p&gt;Still not sure it's right. If you've shipped something with a "moat" that was really just compiled public knowledge, I'd like to know how it went.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>opensource</category>
      <category>startup</category>
    </item>
    <item>
      <title>Selling to Japan from a Stripe-like checkout: the tax line nobody tells you about</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:34:19 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/selling-to-japan-from-a-stripe-like-checkout-the-tax-line-nobody-tells-you-about-4641</link>
      <guid>https://dev.to/johnsiebyronstack/selling-to-japan-from-a-stripe-like-checkout-the-tax-line-nobody-tells-you-about-4641</guid>
      <description>&lt;p&gt;I sell a $19.90 one-time product. The checkout said &lt;code&gt;$19.90&lt;/code&gt;. A Japanese customer was charged &lt;code&gt;$21.89&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's the gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;The payment provider is a Merchant of Record, which means it handles tax for me. Good — I don't want to register for consumption tax in four countries.&lt;/p&gt;

&lt;p&gt;What I did not realise: it adds the tax &lt;strong&gt;at checkout, on top of the listed price&lt;/strong&gt;. For a Japanese billing address that's 10% JCT:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Subtotal   $19.90
JCT (10%)   $1.99
Total      $21.89
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My pricing page said &lt;code&gt;$19.90 one-time&lt;/code&gt;. My product description said &lt;code&gt;$19.90 one-time&lt;/code&gt;. The checkout page said &lt;code&gt;$19.90&lt;/code&gt; until you filled in the address, at which point it quietly became &lt;code&gt;$21.89&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Nothing was wrong with the charge. Everything was wrong with the disclosure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is worse than it looks
&lt;/h2&gt;

&lt;p&gt;For a US customer, tax-exclusive pricing is familiar. For a Japanese customer, it is not. Japanese retail prices are quoted &lt;strong&gt;tax-inclusive&lt;/strong&gt; almost everywhere — the shelf price at a convenience store is what you pay. Seeing ¥2,000 on a tag and being charged ¥2,200 at the register would be considered a mistake by the shop.&lt;/p&gt;

&lt;p&gt;So the default assumption a Japanese buyer brings to my page is "the number I see is the number I pay." When it isn't, the reaction isn't "oh, tax" — it's "this is a bait price."&lt;/p&gt;

&lt;p&gt;That's a refund request, or worse, a chargeback. And a chargeback on a $19.90 product costs more than the sale.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;One line of copy, on the pricing page, in all four locales:&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;// ja&lt;/span&gt;
&lt;span class="n"&gt;taxNote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"表示価格は税別です。決済時に購入者の居住地に応じた税金（日本の場合 消費税10%）が加算されます（例：$19.90 → 合計 $21.89）。"&lt;/span&gt;

&lt;span class="c1"&gt;// en&lt;/span&gt;
&lt;span class="n"&gt;taxNote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Prices shown exclude tax. The tax applicable to the buyer's billing country is added at checkout (in Japan, 10%: $19.90 → $21.89 total)."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rendered right under the refund guarantee:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"mt-8 text-center text-sm text-neutral-500"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;guarantee&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"mt-2 text-center text-xs text-neutral-400"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;taxNote&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also updated the product description at the payment provider to match, because the checkout page is the last place someone reads before paying.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I got wrong twice
&lt;/h2&gt;

&lt;p&gt;I found this by accident while auditing something else. I had read my own pricing page maybe fifty times and never noticed the missing tax line — because I read it as the person who wrote it, not as a buyer.&lt;/p&gt;

&lt;p&gt;The generalisation I'm taking away: &lt;strong&gt;anything a customer is charged must appear on the page where they decide, not on the page where they pay.&lt;/strong&gt; Tax, shipping, fees, minimums. If it only shows up at checkout, it reads as hidden.&lt;/p&gt;

&lt;p&gt;And specifically for the Japanese market: quote inclusive, or say "excl. tax" in the same visual weight as the price. A footnote is not enough when the local convention is the opposite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Numbers for context
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Product: $19.90 one-time, 48-hour refund&lt;/li&gt;
&lt;li&gt;Japanese checkout total: $21.89 (10% JCT)&lt;/li&gt;
&lt;li&gt;Provider fee on a $19.90 sale: ~$1.18 → $18.72 net&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the tax is 10% of the price, and the provider fee is another ~6%. On a $19.90 product, roughly $3 of every sale is not mine. Worth knowing before pricing anything.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(This is &lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;Speech Kobo&lt;/a&gt; — four-language wedding speeches. If you're shipping to Japan and haven't checked your checkout's tax display, check it.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>saas</category>
      <category>startup</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Four locales, one Next.js app: the hreflang mistakes I made so you don't have to</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:26:12 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/four-locales-one-nextjs-app-the-hreflang-mistakes-i-made-so-you-dont-have-to-1148</link>
      <guid>https://dev.to/johnsiebyronstack/four-locales-one-nextjs-app-the-hreflang-mistakes-i-made-so-you-dont-have-to-1148</guid>
      <description>&lt;p&gt;I run a small product in four languages — Japanese, English, French, Spanish. Japanese is the primary market, which means the usual English-first advice does not apply.&lt;/p&gt;

&lt;p&gt;Here are the mistakes I made, in the order I made them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 1: slug translation that broke the URL map
&lt;/h2&gt;

&lt;p&gt;The obvious approach is to translate slugs. &lt;code&gt;/ja/examples/yujin-daihyo&lt;/code&gt; and &lt;code&gt;/fr/examples/frere-soeur-fr&lt;/code&gt; describe the same concept, so they should obviously have different slugs, right?&lt;/p&gt;

&lt;p&gt;They should. But then hreflang needs to know which slug maps to which, in every direction:&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;categoryHreflang&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&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="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slug&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&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;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;group&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="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`${SITE_URL}/${locale}/examples/${s}`&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="n"&gt;out&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;This is a hand-maintained map. If you add a category in one locale and forget the others, hreflang silently points at 404s. Google does not tell you. You find out in Search Console three weeks later, if at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I'd do differently:&lt;/strong&gt; generate the map from the data, not by hand. One &lt;code&gt;slug&lt;/code&gt; per category shared across locales, with translated &lt;code&gt;title&lt;/code&gt;/&lt;code&gt;intro&lt;/code&gt; only. Less charming URLs, zero broken hreflang.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 2: treating &lt;code&gt;&amp;lt;meta name="description"&amp;gt;&lt;/code&gt; as unique
&lt;/h2&gt;

&lt;p&gt;I wrote a check that looked for &lt;code&gt;[name="description"]&lt;/code&gt; and asserted it had content. It passed on pages where the description was empty, because the selector also matched the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag's own attributes rather than a form field elsewhere on the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// What I meant:&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'textarea[name="description"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;

&lt;span class="c1"&gt;// What also matched, and hid the bug:&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'[name="description"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Small lesson: when a selector passes, check that it selected the thing you think it did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 3: same word-length rule for every language
&lt;/h2&gt;

&lt;p&gt;English wedding speeches: 350–600 words, 3–5 minutes. That's ~130 words per minute.&lt;/p&gt;

&lt;p&gt;Japanese: 600–900 &lt;strong&gt;characters&lt;/strong&gt;, 2–3 minutes. That's ~300 characters per minute.&lt;/p&gt;

&lt;p&gt;These are not the same measurement, and a rule written for one produces nonsense in the other. Japanese has no word delimiters, so &lt;code&gt;body.split(/\s+/).length&lt;/code&gt; gives you a number that means nothing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"ja"&lt;/span&gt;
  &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;                      &lt;span class="c1"&gt;// characters&lt;/span&gt;
  &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&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="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;+/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// words&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same applies to anything that measures text: density, reading time, keyword frequency. Every one of those needs a locale branch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 4: assuming the same content depth works everywhere
&lt;/h2&gt;

&lt;p&gt;I compared my pages against competitors in French and found this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Site&lt;/th&gt;
&lt;th&gt;Body text&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;mariages.net&lt;/td&gt;
&lt;td&gt;21,746&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;blog.ungrandjour.com&lt;/td&gt;
&lt;td&gt;16,115&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;parlerdamour.fr&lt;/td&gt;
&lt;td&gt;10,971&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;mine&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3,653&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I was ranking around position 82. Not because the site had a technical problem, and not because the content was wrong — but because it was one-sixth the size of everything around it.&lt;/p&gt;

&lt;p&gt;After adding examples and FAQ blocks, that page went to 7,437 characters. Exposure roughly doubled in the following days. Not proof, but not nothing.&lt;/p&gt;

&lt;p&gt;The part worth noting: &lt;strong&gt;I assumed my per-locale pages were equivalent because they used the same template.&lt;/strong&gt; They had wildly different depth depending on how much I'd happened to write for each language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 5: FAQ markup with no visible FAQ
&lt;/h2&gt;

&lt;p&gt;Schema markup must match what's on the page. Adding &lt;code&gt;FAQPage&lt;/code&gt; JSON-LD without rendering the same questions as visible content is at best ignored and at worst a manual action.&lt;/p&gt;

&lt;p&gt;So the FAQ data lives in one place and produces both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;faq&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FaqJsonLd&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;faq&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* and, further down */&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;faq&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One array, two outputs. If they ever diverge, it's a bug, not a choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The uncomfortable summary
&lt;/h2&gt;

&lt;p&gt;None of these are hard problems. Each one cost me days anyway, because the feedback loop on SEO is measured in weeks and the failure mode is silence.&lt;/p&gt;

&lt;p&gt;If I were starting again, the checklist would be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Shared slugs across locales; translate content, not URLs&lt;/li&gt;
&lt;li&gt;Every text metric gets a locale branch&lt;/li&gt;
&lt;li&gt;Compare content depth to competitors &lt;strong&gt;per locale&lt;/strong&gt;, not per site&lt;/li&gt;
&lt;li&gt;Generate hreflang from data&lt;/li&gt;
&lt;li&gt;Schema and visible content come from the same source&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;(The product is &lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;Speech Kobo&lt;/a&gt; — wedding speeches in four languages. The etiquette dataset behind it is open on &lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>seo</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A silent data-loss bug in a paid product: the draft was in memory the whole time</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:25:12 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/a-silent-data-loss-bug-in-a-paid-product-the-draft-was-in-memory-the-whole-time-3ca3</link>
      <guid>https://dev.to/johnsiebyronstack/a-silent-data-loss-bug-in-a-paid-product-the-draft-was-in-memory-the-whole-time-3ca3</guid>
      <description>&lt;p&gt;The bug had been live for weeks and no one had reported it, because it only fired for people who had just paid us money.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the product does
&lt;/h2&gt;

&lt;p&gt;It's a small tool that generates wedding speeches. Nine questions, three drafts, one payment. The kind of product where the whole value is the output — the text is the thing you buy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug
&lt;/h2&gt;

&lt;p&gt;After checkout, the payment provider redirects the user back to &lt;code&gt;/success&lt;/code&gt;. That page verifies the payment and then does this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sb"&gt;`/${locale}/form`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;okCta&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; →
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back to the form. Makes sense — the drafts live on the form page.&lt;/p&gt;

&lt;p&gt;Except the drafts were stored like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setResult&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="nf"&gt;setResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&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;In memory. Nowhere else.&lt;/p&gt;

&lt;p&gt;The sequence, for a paying customer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fill in nine questions&lt;/li&gt;
&lt;li&gt;Read three drafts&lt;/li&gt;
&lt;li&gt;Get redirected to checkout&lt;/li&gt;
&lt;li&gt;Pay&lt;/li&gt;
&lt;li&gt;Get redirected back&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;See an empty questionnaire&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Fill in the same nine questions again&lt;/li&gt;
&lt;li&gt;Wait another 60 seconds for generation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nothing was broken, technically. Every request returned 200. There were no errors in the logs. A payment succeeded and the user was shown the thing they paid for — eventually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it survived
&lt;/h2&gt;

&lt;p&gt;I found it by reading the code, not by using the product. That's the part that bothers me.&lt;/p&gt;

&lt;p&gt;The happy path in testing was: generate → look at drafts → done. Every test I'd run started from a fresh form and ended at the drafts. Nobody I'd shown it to had actually completed a purchase, because we'd had zero purchases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A payment flow nobody has exercised is a payment flow that doesn't work.&lt;/strong&gt; Traffic and conversion were so low that the downstream half of the funnel had never been walked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix, part one: persist locally
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;RESULT_PREFIX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ws-result-"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// on success&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;RESULT_PREFIX&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&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="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="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// on mount&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rawResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;RESULT_PREFIX&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;locale&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="n"&gt;rawResult&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="n"&gt;cached&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawResult&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="n"&gt;cached&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drafts&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&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="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nb"&gt;setTimeout&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"result"&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="nf"&gt;scrollIntoView&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="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="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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also changed the success link to &lt;code&gt;/${locale}/form#result&lt;/code&gt; so the user lands on the drafts rather than the top of the questionnaire.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix, part two: persist on the server
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;localStorage&lt;/code&gt; is better than nothing, but it's still wrong for a paid artifact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;new device → gone&lt;/li&gt;
&lt;li&gt;cleared cache → gone&lt;/li&gt;
&lt;li&gt;never returns to the site → gone&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So generation results now also POST to an endpoint that writes to the database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/api/generations"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;checkoutId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;drafts&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="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="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two deliberate choices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fire and forget.&lt;/strong&gt; Archival failure must never block the user from seeing their drafts. The &lt;code&gt;catch(() =&amp;gt; {})&lt;/code&gt; is intentional, not sloppy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Degrade silently if the table doesn't exist yet.&lt;/strong&gt; The endpoint returns &lt;code&gt;{ ok: false, reason }&lt;/code&gt; instead of 500, because a missing table is a deployment issue, not a user-facing error.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The fix, part three: let them take it with them
&lt;/h2&gt;

&lt;p&gt;The drafts had a "copy" button and nothing else. If you paid for text, you should be able to keep it as a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;content&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="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"text/plain;charset=utf-8"&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blob&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="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;href&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`speechkobo-${i + 1}.txt`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&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="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;revokeObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&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;PDF would look more impressive. &lt;code&gt;txt&lt;/code&gt; is what someone actually needs when they're standing backstage holding a phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I took from this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Test the funnel backwards from the money.&lt;/strong&gt; Not "does generation work" but "does a person who paid end up holding the thing they paid for". Those are different tests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;useState&lt;/code&gt; is a cache, not storage.&lt;/strong&gt; If a value survives a redirect, it needs to be in &lt;code&gt;localStorage&lt;/code&gt;, a cookie, or the database. There is no fourth option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Silent failure has to be a decision.&lt;/strong&gt; Every &lt;code&gt;catch {}&lt;/code&gt; in that fix is a choice about what the user sees. The archival one is fine to swallow. The verification one is not.&lt;/p&gt;

&lt;p&gt;If you're building something with a paywall and you've never bought your own product: buy it. You will find something.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I write about building small AI products for non-English markets. The one in this post is &lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;Speech Kobo&lt;/a&gt;, and the open dataset behind its etiquette checks is on &lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bug</category>
      <category>debugging</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Japanese wedding taboo words as open JSON: why etiquette needs to be machine-readable</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:12:39 +0000</pubDate>
      <link>https://dev.to/johnsiebyronstack/japanese-wedding-taboo-words-as-open-json-why-etiquette-needs-to-be-machine-readable-jda</link>
      <guid>https://dev.to/johnsiebyronstack/japanese-wedding-taboo-words-as-open-json-why-etiquette-needs-to-be-machine-readable-jda</guid>
      <description>&lt;p&gt;I build an AI tool that writes wedding speeches in Japanese, French, Spanish and English. The hardest part was not the generation. It was the etiquette.&lt;/p&gt;

&lt;p&gt;Japanese weddings have a concept called &lt;strong&gt;imikotoba&lt;/strong&gt; (忌み言葉) — words you avoid because they suggest separation, ending, or repetition. Say 切る ("to cut") in a wedding speech and the room notices. Say 別れる ("to part") and someone's grandmother quietly disapproves.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Every LLM will happily write a fluent Japanese wedding speech. Almost none of them know that 終わる ("to end") is a landmine in that context, or that 戻る ("to return") suggests going back to a previous state — not something you want in a blessing.&lt;/p&gt;

&lt;p&gt;Prompting helps. It does not solve it. Because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The list is not in the training data in a structured way&lt;/li&gt;
&lt;li&gt;Post-generation filtering needs an actual list&lt;/li&gt;
&lt;li&gt;"Avoid these words" is useless without knowing what to say instead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I extracted the list from my own content library and published it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the dataset
&lt;/h2&gt;

&lt;p&gt;5 categories, 19 word pairs, plain JSON:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;wakare&lt;/code&gt; — separation (切る, 別れる, 離れる)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;owari&lt;/code&gt; — ending or returning (終わる／終わり, 戻る, 帰る)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kasane&lt;/code&gt; — repeated words (たびたび, ますます, 重ね重ね)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;suuji&lt;/code&gt; — the numbers 4 and 9 (死 / 苦)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sonota&lt;/code&gt; — everything else&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each pair has &lt;code&gt;avoid&lt;/code&gt; and &lt;code&gt;instead&lt;/code&gt;. It's licensed CC-BY-4.0, so commercial use is fine.&lt;/p&gt;

&lt;p&gt;Repo: &lt;strong&gt;&lt;a href="https://github.com/johnsiebyron-stack/imikotoba" rel="noopener noreferrer"&gt;https://github.com/johnsiebyron-stack/imikotoba&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
It's also on npm as &lt;code&gt;imikotoba&lt;/code&gt; if you'd rather &lt;code&gt;import&lt;/code&gt; it. (&lt;a href="https://speechkobo.com" rel="noopener noreferrer"&gt;speechkobo.com&lt;/a&gt; is the product this came from.)&lt;/p&gt;
&lt;h2&gt;
  
  
  The part that surprised me
&lt;/h2&gt;

&lt;p&gt;I added a small helper that splits variants on slashes and middots. Turned out this matters a lot.&lt;/p&gt;

&lt;p&gt;The raw data has entries like &lt;code&gt;終わる／終わり&lt;/code&gt; and &lt;code&gt;倒れる・落ちる・枯れる&lt;/code&gt;. If you naively match the whole string, you match nothing. My first version did exactly that and silently missed every variant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Before: matches nothing&lt;/span&gt;
&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"終わる／終わり"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;

&lt;span class="c1"&gt;// After: split into base forms&lt;/span&gt;
&lt;span class="nf"&gt;baseForms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"終わる／終わり"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// ["終わる", "終わり"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That bug would have shipped. The test caught it, which is the only reason I'm writing this post instead of quietly failing in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tradeoff: false positives
&lt;/h2&gt;

&lt;p&gt;I use substring matching on purpose. &lt;code&gt;区切る&lt;/code&gt; contains &lt;code&gt;切る&lt;/code&gt;, and &lt;code&gt;find()&lt;/code&gt; will flag it.&lt;/p&gt;

&lt;p&gt;That's a deliberate choice. In a speech checker, a false positive costs you two seconds. A false negative costs you the moment. But if you need precision, you'll have to filter — and the README says so explicitly instead of pretending the library is smarter than it is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell anyone building in a non-English market
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The etiquette layer is not optional.&lt;/strong&gt; Generic generation gets you 80% of the way. The last 20% is local knowledge that isn't in any API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish the data separately from the product.&lt;/strong&gt; It forces you to make it explicit, and it makes your own prompt shorter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Count characters, not words.&lt;/strong&gt; Japanese speech timing is ~300 characters per minute. English is ~150 words per minute. Same 3 minutes, completely different target numbers.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Feedback welcome
&lt;/h2&gt;

&lt;p&gt;If you know Japanese wedding customs better than I do, the dataset is wrong somewhere and I'd like to know where. Issues and PRs are open. The list is a practical one, not an authoritative source — regional and family customs differ, and I'd rather fix specifics than defend the list as-is.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>json</category>
      <category>llm</category>
      <category>software</category>
    </item>
  </channel>
</rss>
