<?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: Niteflex</title>
    <description>The latest articles on DEV Community by Niteflex (@niteflex).</description>
    <link>https://dev.to/niteflex</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%2F4202857%2F784da4a4-3f8a-4db9-bd76-f383691bd5d9.png</url>
      <title>DEV Community: Niteflex</title>
      <link>https://dev.to/niteflex</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niteflex"/>
    <language>en</language>
    <item>
      <title>Why we gave our Telegram content bot a "nothing twice" rule</title>
      <dc:creator>Niteflex</dc:creator>
      <pubDate>Fri, 23 Oct 2026 19:30:18 +0000</pubDate>
      <link>https://dev.to/niteflex/why-we-gave-our-telegram-content-bot-a-nothing-twice-rule-17g9</link>
      <guid>https://dev.to/niteflex/why-we-gave-our-telegram-content-bot-a-nothing-twice-rule-17g9</guid>
      <description>&lt;p&gt;We build Mira (useMira), a Telegram bot with a Mini App that finds and drafts channel posts from sources you add. Early on we kept hitting the same failure mode: a source hiccups, the worker retries, and the same item gets scored and drafted twice. Nothing broke loudly, it just quietly doubled work and occasionally doubled a post in someone's Plan screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;We made it a hard rule in the worker: better to skip an item than to process it twice. If a job's outcome is unknown after a crash or a timeout, we don't retry it blindly. It goes to an archive table with a flag, and nothing downstream touches it again automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not just retry harder
&lt;/h2&gt;

&lt;p&gt;Retrying harder is the obvious fix, and it's wrong for a content pipeline specifically. A duplicated API call is usually invisible. A duplicated Telegram post is not — it shows up in someone's channel, or as two near-identical drafts competing for the same slot in their Plan. The cost of under-processing (one source gets checked a minute later) is low. The cost of over-processing (two posts, or a scoring pass that double-counts) is a trust problem with a real person's channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this shows up in practice
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The queue is Postgres, not a broker. Workers claim jobs with &lt;code&gt;FOR UPDATE SKIP LOCKED&lt;/code&gt;, so two workers never pick up the same job and don't block each other waiting.&lt;/li&gt;
&lt;li&gt;A dead worker means an expired lease, not a stuck job — the job goes back to the queue, but only once, not in a loop.&lt;/li&gt;
&lt;li&gt;Payment webhooks are idempotent by a unique constraint, not by a "does this exist" check beforehand, because the check-then-act gap is exactly where duplicates sneak in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is novel — idempotency and SKIP LOCKED are old ideas. What surprised me is how much a "nothing twice" default changes the shape of the whole system once you take it seriously at the content layer, not just the payments layer where everyone already expects it.&lt;/p&gt;

&lt;p&gt;If you've solved this differently in your own pipeline — different trade-off, different failure mode — I'd like to hear it in the comments.&lt;/p&gt;

&lt;p&gt;More on Mira: &lt;a href="https://usemira.pro" rel="noopener noreferrer"&gt;https://usemira.pro&lt;/a&gt; Bot: &lt;a href="https://t.me/usemirabot" rel="noopener noreferrer"&gt;https://t.me/usemirabot&lt;/a&gt;&lt;/p&gt;

</description>
      <category>telegram</category>
      <category>productivity</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Show DEV: Mira, a Telegram bot + Mini App that finds and drafts posts for your channel</title>
      <dc:creator>Niteflex</dc:creator>
      <pubDate>Fri, 23 Oct 2026 14:58:59 +0000</pubDate>
      <link>https://dev.to/niteflex/show-dev-mira-a-telegram-bot-mini-app-that-finds-and-drafts-posts-for-your-channel-b3</link>
      <guid>https://dev.to/niteflex/show-dev-mira-a-telegram-bot-mini-app-that-finds-and-drafts-posts-for-your-channel-b3</guid>
      <description>&lt;p&gt;Running a Telegram channel means a lot of routine: finding fresh material, picking what fits, rewriting it in your own voice, and remembering to post on time. &lt;strong&gt;Mira&lt;/strong&gt; (&lt;a href="https://usemira.pro/" rel="noopener noreferrer"&gt;usemira.pro&lt;/a&gt;) is a Telegram bot with a Mini App that takes over that routine. It works for hobby channels and professional ones alike.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;You add sources: websites, RSS feeds, YouTube, Reddit, Google News, Telegram channels and Bluesky. Mira checks them regularly, finds new items and scores each one with AI against your channel's topic and audience. You see a curated selection instead of a firehose, and every item comes with a short explanation of why it was picked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Drafts
&lt;/h2&gt;

&lt;p&gt;From the selected items Mira prepares post drafts and rewrites them in your channel's tone. If there is no fitting news item, you can start a post from a topic: describe what you want to write about and the service proposes a draft. Every draft opens in an editor with a preview of how the post will look in Telegram.&lt;/p&gt;

&lt;h2&gt;
  
  
  Control
&lt;/h2&gt;

&lt;p&gt;The channel profile stores the topic, the audience, the tone and what to avoid, and everything is scored and written against it. Nothing is published without your approval unless you switch on auto-publish. Approved posts go into a plan, shown day by day, and auto-publish runs inside a time window you set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Under the hood
&lt;/h2&gt;

&lt;p&gt;The Mini App is built with React, Vite and Tailwind CSS; the backend is Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Open &lt;a href="https://t.me/usemirabot" rel="noopener noreferrer"&gt;@usemirabot&lt;/a&gt; in Telegram, name your channel's topic and add the first sources. There is a free tier to start with. Mira launched in April 2026 and is built and run by one independent developer, feedback is very welcome.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>telegram</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
