<?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: Nandan Kumar</title>
    <description>The latest articles on DEV Community by Nandan Kumar (@sirius93).</description>
    <link>https://dev.to/sirius93</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%2F175617%2Fffbce4aa-7b34-4bd8-837d-41da6d24ddeb.jpeg</url>
      <title>DEV Community: Nandan Kumar</title>
      <link>https://dev.to/sirius93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sirius93"/>
    <language>en</language>
    <item>
      <title>Mystery aocr.org Traffic Is Likely Crawlers</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Wed, 11 Nov 2026 03:48:39 +0000</pubDate>
      <link>https://dev.to/sirius93/mystery-aocrorg-traffic-is-likely-crawlers-5gg9</link>
      <guid>https://dev.to/sirius93/mystery-aocrorg-traffic-is-likely-crawlers-5gg9</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffs0wor2itz7smdt2ma1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffs0wor2itz7smdt2ma1b.png" alt="Banner Aocr traffic" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have noticed a burst of visits with the referrer &lt;code&gt;www.aocr.org&lt;/code&gt; in GA4, PostHog, Plausible, Umami, Fathom, or Cloudflare, you are not alone. The short version: &lt;strong&gt;the referrer is forged.&lt;/strong&gt; AOCR is not involved, and the fingerprint points to a likely ByteDance crawler stack. Who operates it is not proven.&lt;/p&gt;

&lt;p&gt;This post adapts the findings of Tin Analytics, &lt;a href="https://tin.computer/blog/aocr-org-referrer-bot" rel="noopener noreferrer"&gt;"Getting traffic from aocr.org? That's ByteDance crawling your website"&lt;/a&gt; (29 Oct 2026).&lt;/p&gt;

&lt;h2&gt;
  
  
  What people are seeing
&lt;/h2&gt;

&lt;p&gt;Since about 24 Sep 2026, many sites show visits with the referrer &lt;a href="http://www.aocr.org" rel="noopener noreferrer"&gt;www.aocr.org&lt;/a&gt; (American Osteopathic College of Radiology). The pattern is consistent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One page per visit, with a bounce rate near 100%.&lt;/li&gt;
&lt;li&gt;One forum got 3,135 sessions in a day; another report cites 2,768 in a day.&lt;/li&gt;
&lt;li&gt;Targets include GitHub repos, docs sites, and large company sites.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the sites Tin monitors: &lt;a href="http://clawmessenger.com" rel="noopener noreferrer"&gt;clawmessenger.com&lt;/a&gt; had 187 visits (27-29 Oct, still active), tin.computer had 3, and two other sites had 74 (28 Sep-28 Oct).&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is a screenshot from my own analytics traffic for &lt;a href="http://nandan.dev" rel="noopener noreferrer"&gt;nandan.dev&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft1vkkygfvnmsyh4lzrdm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft1vkkygfvnmsyh4lzrdm.png" alt="Nandan's blog analytics screenshot" width="799" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it is not a person, and not AOCR
&lt;/h2&gt;

&lt;p&gt;Requests carry &lt;code&gt;Sec-Fetch-Site: none&lt;/code&gt;, which means the page was typed in or opened by a program. A real click from another site would be &lt;code&gt;cross-site&lt;/code&gt;. &lt;strong&gt;The referrer is forged.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AOCR does not link to your pages and shows no sign of a hack. &lt;strong&gt;Do not contact them.&lt;/strong&gt; They have nothing to fix and nothing to tell you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it points to ByteDance
&lt;/h2&gt;

&lt;p&gt;Tin confirmed several independent signals that line up.&lt;/p&gt;

&lt;h3&gt;
  
  
  The network fingerprint
&lt;/h3&gt;

&lt;p&gt;The TLS ClientHello sizes (1722/1754/1786/1818 bytes), HTTP/2 priority weight 256 exclusive, and an Accept header including &lt;code&gt;image/heif&lt;/code&gt; match Bytespider, ByteDance's declared crawler. The numbers are stark:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Traffic group&lt;/th&gt;
&lt;th&gt;Matching requests&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="http://aocr.org" rel="noopener noreferrer"&gt;aocr.org&lt;/a&gt; crawler&lt;/td&gt;
&lt;td&gt;199 of 199 (100%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Declared Bytespider/TikTokSpider&lt;/td&gt;
&lt;td&gt;646 of 1,142 (57%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All other traffic&lt;/td&gt;
&lt;td&gt;115 of 137,964 (0.08%)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Browser timing fields stock Chrome lacks
&lt;/h3&gt;

&lt;p&gt;The browser timing data includes &lt;code&gt;extensionTiming&lt;/code&gt; with &lt;code&gt;forestResFrom&lt;/code&gt; and &lt;code&gt;forestResLoadStart&lt;/code&gt;, plus &lt;code&gt;htmlPredictorHit&lt;/code&gt;. "Forest" is ByteDance's internal resource loader. Of 37 real-visitor recordings, 0 had these fields.&lt;/p&gt;

&lt;h3&gt;
  
  
  The servers and the proxies
&lt;/h3&gt;

&lt;p&gt;The real servers are in AS132510 (China Mobile, Shanxi). They run Linux x86_64 with 4 cores, 32 GB, and Chinese fonts, yet claim to be Windows. The time zone is Asia/Shanghai, the screen is 800x600, and each page gets a wait and scroll of about 28 seconds.&lt;/p&gt;

&lt;p&gt;The IPs you see are not those servers. They are rented US proxies: 187 visits came from 186 different IPs (Datacamp/CDN77, Web2Objects, Ace Data Centres, EGIHosting, M247, and others) on ports 1180, 40000, and 60000, likely a commercial proxy pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is not proven
&lt;/h2&gt;

&lt;p&gt;It is not established whether a ByteDance team runs this or a customer of a ByteDance service (for example, Volcano Engine) using the same browser. Tin asked ByteDance for comment on 29 Oct 2026.&lt;/p&gt;

&lt;p&gt;Say "likely ByteDance crawler stack", not "ByteDance did this".&lt;/p&gt;

&lt;h2&gt;
  
  
  Why now
&lt;/h2&gt;

&lt;p&gt;The stack is old: Bytespider has existed since 2024. What is new since late Sep 2026 is a Windows Chrome 146 disguise, a US proxy pool, and the forged referrer. &lt;strong&gt;The referrer made previously invisible traffic visible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is precedent. In 2025, Cloudflare found that Perplexity ran undeclared stealth crawlers.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Do not block IPs.&lt;/strong&gt; There is a new one per visit, so a blocklist is useless. Do not contact AOCR either.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloudflare WAF
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a rule with action &lt;strong&gt;Managed Challenge&lt;/strong&gt; (start in &lt;strong&gt;Log mode&lt;/strong&gt; ) when the &lt;code&gt;Accept&lt;/code&gt; header contains &lt;code&gt;image/heif,image/avif&lt;/code&gt; and there is no &lt;code&gt;sec-ch-ua&lt;/code&gt; header.&lt;/li&gt;
&lt;li&gt;Add a second rule where &lt;code&gt;referer&lt;/code&gt; contains &lt;code&gt;aocr.org&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Analytics exclusions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GA4:&lt;/strong&gt; exclude session source &lt;code&gt;aocr.org&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostHog:&lt;/strong&gt; exclude &lt;code&gt;$referring_domain&lt;/code&gt; = &lt;code&gt;www.aocr.org&lt;/code&gt;. The durable filter is &lt;code&gt;$timezone&lt;/code&gt; = &lt;code&gt;Asia/Shanghai&lt;/code&gt; with &lt;code&gt;$screen_width&lt;/code&gt; = 800.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plausible, Umami, Fathom:&lt;/strong&gt; exclude the referrer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Expect it to change
&lt;/h2&gt;

&lt;p&gt;Expect the referrer to change; the fingerprint probably will not. That is why the Accept/&lt;code&gt;sec-ch-ua&lt;/code&gt; rule and the Asia/Shanghai + 800 screen-width filter matter more than the &lt;a href="http://aocr.org" rel="noopener noreferrer"&gt;aocr.org&lt;/a&gt; referrer rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="http://aocr.org" rel="noopener noreferrer"&gt;aocr.org&lt;/a&gt; referrer is forged; AOCR is not involved.&lt;/li&gt;
&lt;li&gt;The fingerprint matches Bytespider in 199 of 199 requests, versus 0.08% of other traffic.&lt;/li&gt;
&lt;li&gt;Attribution is "likely ByteDance crawler stack", not proven.&lt;/li&gt;
&lt;li&gt;Challenge on the fingerprint (Log mode first), filter in analytics, and skip IP blocking.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Source: &lt;a href="https://tin.computer/blog/aocr-org-referrer-bot" rel="noopener noreferrer"&gt;tin.computer/blog/aocr-org-referrer-bot&lt;/a&gt;&lt;/p&gt;

</description>
      <category>crawlers</category>
      <category>bot</category>
      <category>spamprotection</category>
    </item>
    <item>
      <title>I Added a CDN, and My Cloud Bill Went Up 15x</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:46:23 +0000</pubDate>
      <link>https://dev.to/sirius93/i-added-a-cdn-and-my-cloud-bill-went-up-15x-21c7</link>
      <guid>https://dev.to/sirius93/i-added-a-cdn-and-my-cloud-bill-went-up-15x-21c7</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftc9fc85ug0vsfeifu4ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftc9fc85ug0vsfeifu4ef.png" alt="CDN OG Image" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A couple of days back, we were working on a website and wanted to add a CDN. It sounded like a small change, and in engineering terms it was. On the bill, it wasn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup that was already fine
&lt;/h2&gt;

&lt;p&gt;Right now, we run the website on Google Cloud Run with request-based instances. The site doesn't get much traffic yet, and with request-based billing you only pay when something actually hits it. The result is a bill of around a dollar a month.&lt;/p&gt;

&lt;p&gt;For a site like this, that's usually the sweet spot: nothing idles, nothing needs babysitting, and the bill is small enough that nobody reads it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The performance scan made a suggestion
&lt;/h2&gt;

&lt;p&gt;Then performance scans suggested we add a CDN for better caching and to reduce load times. Reasonable advice. Static assets served from an edge location load faster than assets served from a single region.&lt;/p&gt;

&lt;p&gt;I thought, why not? How much would it cost?&lt;/p&gt;

&lt;p&gt;I didn't actually answer that second question before acting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a CDN on Google Cloud actually involves
&lt;/h2&gt;

&lt;p&gt;So we set up Google Cloud CDN, with a load balancer and everything. Cloud CDN doesn't sit directly in front of Cloud Run. It hangs off an external HTTP(S) load balancer, and the load balancer is the part with a fixed monthly cost whether you get ten requests or ten million.&lt;/p&gt;

&lt;p&gt;The setup looked roughly like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cloud Run service, unchanged.&lt;/li&gt;
&lt;li&gt;A serverless network endpoint group pointing at that service.&lt;/li&gt;
&lt;li&gt;A backend service with Cloud CDN enabled.&lt;/li&gt;
&lt;li&gt;An external load balancer with forwarding rules, a URL map and a certificate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of those steps is especially difficult. The problem is that one of them comes with a meter that never stops running.&lt;/p&gt;

&lt;h2&gt;
  
  
  The number
&lt;/h2&gt;

&lt;p&gt;It’s estimated at around $30 a month.&lt;/p&gt;

&lt;p&gt;For context, last month’s bill was about $2. This month it will probably reach $30. That’s a 15x jump.&lt;/p&gt;

&lt;p&gt;The cost itself isn’t a problem. What intrigued me was the jump in the bill. Thirty dollars won't break anything. But going from "rounding error" to "a line item" in one change, for a site with very little traffic, is the kind of thing I'd like to know before I click deploy, not after.&lt;/p&gt;

&lt;h2&gt;
  
  
  Was the latency worth it?
&lt;/h2&gt;

&lt;p&gt;For this site, at this traffic level, the CDN is solving a problem we barely have. Without it, some visitors far from the region wait a bit longer for a page.&lt;/p&gt;

&lt;p&gt;I’m okay with 200ms of extra latency there, right?&lt;/p&gt;

&lt;p&gt;If I had seen both numbers side by side up front, 200ms on one side and a 15x bill on the other, I could have decided that I don't want a 15x jump in my cloud bill just for adding a CDN.&lt;/p&gt;

&lt;h2&gt;
  
  
  So I built the thing I wanted
&lt;/h2&gt;

&lt;p&gt;What I wanted was a place where I could put these pieces together, an instance here, a load balancer there, a CDN, and see what they would cost me before provisioning anything. Not after the first invoice.&lt;/p&gt;

&lt;p&gt;So I thought, let’s build that.&lt;/p&gt;

&lt;p&gt;That's Cloud Cost Compute. Whatever you add to it, the cost is calculated across Google Cloud, AWS and Azure. So while you're checking what your setup costs on the provider you already use, you can also see what the same setup would cost on a different one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The limitations, stated plainly
&lt;/h2&gt;

&lt;p&gt;It’s open source.&lt;/p&gt;

&lt;p&gt;The prices are static, picked up from publicly available sources, with no live API calls yet. That means they can drift as providers change their pricing.&lt;/p&gt;

&lt;p&gt;So don’t take them as absolute, but you can use it to get a general idea of your future cloud costs before making a decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;"Small change" in architecture and "small change" on the bill are different measurements. Check both.&lt;/li&gt;
&lt;li&gt;Fixed-cost components, like a load balancer, hurt most on low-traffic setups, because there's no traffic to spread the cost over.&lt;/li&gt;
&lt;li&gt;A performance scan tells you what's faster. It doesn't tell you whether faster is worth it.&lt;/li&gt;
&lt;li&gt;Price the setup first. Then decide whether 200ms matters to you.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can find Cloud Cost Compute at &lt;a href="https://nandan.dev/cloud-cost-estimator" rel="noopener noreferrer"&gt;nandan.dev/cloud-cost-estimator&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>googlecloud</category>
      <category>aws</category>
      <category>azure</category>
      <category>cdn</category>
    </item>
    <item>
      <title>What I Built in the Last Year: A List of Failures</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Mon, 05 Oct 2026 01:51:51 +0000</pubDate>
      <link>https://dev.to/sirius93/what-i-built-in-the-last-year-a-list-of-failures-136k</link>
      <guid>https://dev.to/sirius93/what-i-built-in-the-last-year-a-list-of-failures-136k</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo75h5uie2v6u7ibcan1c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo75h5uie2v6u7ibcan1c.png" alt="OG Image A list of failures" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A list of failures.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's the most accurate title I could come up with. Here's the summary:&lt;/p&gt;

&lt;p&gt;In the last year or so, I have built 4 web apps, 3 open-source tools, wrote one book, onboarded 250+ users overall, and made 25 dollars overall.&lt;/p&gt;

&lt;p&gt;Read that sentence a few times. Eight projects and 250+ users went in, and 25 dollars came out. That isn't a monthly number or a per-project number. It's the total.&lt;/p&gt;

&lt;p&gt;I'm not writing this to ask for sympathy, or to pretend it was all a learning experience. Some of it was. Mostly, I want the numbers written down in one place, because the gap between building something and getting someone to pay for it is easy to ignore when you only look at one project at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The web apps
&lt;/h2&gt;

&lt;p&gt;These are the ones where revenue was supposed to happen.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://bailoutt.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Bailoutt.com&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;- Fake AI calls and call reminders - live ~200 users, 2 paid&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://chunkybabies.com" rel="noopener noreferrer"&gt;https://chunkybabies.com&lt;/a&gt; - Baby health tracker - 2 users, didn’t take off. Offline now&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://kitaaben.com" rel="noopener noreferrer"&gt;Kitaaben&lt;/a&gt; &lt;strong&gt;- Book tracker, journal and AI reviews. - 60+ users - 1 active subscriber&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wobuddy.app" rel="noopener noreferrer"&gt;WO Buddy&lt;/a&gt; &lt;strong&gt;- Build your exercise plan, with illustrated guide - 10 users - none paid&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Put those side by side, and you get a funnel that starts wide at "built" and ends at a few coins at "paid."&lt;/p&gt;

&lt;h2&gt;
  
  
  The open source tools
&lt;/h2&gt;

&lt;p&gt;I never expected these to make money. They're free, they solved my own problems, and a couple of them might solve yours.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GWDAP - Automate verification and adding aliases for multiple domains.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;COPE agent - A multi-model content repurposing tool that turns any provided source into a canonical brief, which in turn converts it into multi-format content, i.e. long form like LinkedIn, short form like Twitter, etc., carousel, both image and and pdf&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DoCk - A browser extension that routes your Google Workspace links to their respective PWAs rather than opening a new tab for each link.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The book
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Dad, Debriefed - Journaled my experience as a father and turned it into a book that works as a guide to new fathers.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  So where does that leave things?
&lt;/h2&gt;

&lt;p&gt;Here's the scoreboard: 8 projects, 250+ users, $25.&lt;/p&gt;

&lt;p&gt;You can read that a few ways. Turns out I'm good at shipping. Getting anyone to pay is a separate skill, and the list shows I haven't learned it yet. Every one of these went live. Most of them found at least a handful of people. Almost none of them found people with a reason to pay.&lt;/p&gt;

&lt;p&gt;A few things I'm taking from the year:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shipping is not the bottleneck.&lt;/strong&gt; I can build things. That clearly isn't what's holding me back.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Users are not customers.&lt;/strong&gt; Bailoutt has about 200 users and 2 paying ones. That ratio says a lot about what I've actually validated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One paying subscriber counts.&lt;/strong&gt; Kitaaben's single subscriber tells me more than its 60+ free users do.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Killing a project is fine.&lt;/strong&gt; Chunkybabies is offline, and nothing broke.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not everything has to make money.&lt;/strong&gt; The open source tools and the book were worth doing anyway. I just shouldn't confuse them with a business.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So it's a list of failures, by the only number that pays rent. By the count of things that exist now and didn't a year ago, the year went better than that number suggests. Both readings are true. I'm just not going to pretend the second one cancels out the first.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>saas</category>
      <category>startup</category>
    </item>
    <item>
      <title>Dock: Stops Letting Google Meet Links Open a New Window Every Time</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Fri, 25 Sep 2026 07:46:18 +0000</pubDate>
      <link>https://dev.to/sirius93/dock-stops-letting-google-meet-links-open-a-new-window-every-time-b69</link>
      <guid>https://dev.to/sirius93/dock-stops-letting-google-meet-links-open-a-new-window-every-time-b69</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fakmj2pzu1dmxjppy7vcv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fakmj2pzu1dmxjppy7vcv.png" alt="Dock OG Image" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Three Workspaces, infinite windows
&lt;/h3&gt;

&lt;p&gt;I have three Google Workspaces: personal Gmail, my own Workspace, and my company's. That means three separate PWAs for Mail, three for Meet, three for Calendar, and so on down the line.&lt;/p&gt;

&lt;p&gt;Here's the thing: every time a Meet link landed in my chat, it opened a brand new window. Not focused an existing one — opened a new one. Multiply that by three accounts and a normal day of meetings, and you end up with a wall of Meet windows and duplicate Gmail tabs you can't tell apart. It got really hard to manage.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I built
&lt;/h3&gt;

&lt;p&gt;So I built Dock. If you click a link and there's already a matching PWA open, Dock redirects you to that window instead of spawning a new one. Gmail, Meet, Calendar, Drive, Docs, Sheets, Slides, or Chat — same idea for all of them. Holding Shift bypasses it for that one click, for the times you actually want a fresh window.&lt;/p&gt;

&lt;p&gt;Dock also helps me manage all my open tabs. Say I've got six Meet windows open across accounts — I can close any of them, for any account, from any screen. It keeps everything decluttered, the mental load is reduced. You don't need five mailboxes open just to check personal email once. One mailbox for personal, one for work, one for the side Workspace — or whatever your split looks like.&lt;/p&gt;

&lt;p&gt;And I gave it a cute mascot: Meet Doc-k&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr5dhffqa2ljbo222m8ec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr5dhffqa2ljbo222m8ec.png" alt="Doc-k Mascot" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting the account right
&lt;/h3&gt;

&lt;p&gt;The tricky part isn't catching the link. It's knowing &lt;em&gt;which&lt;/em&gt; account's window to send you to. Dock routes to the window for the account the link actually names — via &lt;code&gt;authuser=&lt;/code&gt;, &lt;code&gt;/u/N/&lt;/code&gt;, or a stored mapping — and it keeps a window's identity correct even after you switch accounts from inside the PWA itself. It reuses the already-open window for that account instead of spawning a duplicate.&lt;/p&gt;

&lt;h3&gt;
  
  
  The switcher
&lt;/h3&gt;

&lt;p&gt;Press Ctrl/Cmd+Shift+Space and you get a fuzzy-searchable popup listing every app window, grouped by account. Live calls are surfaced first. One-click close, per window or per whole account.&lt;/p&gt;

&lt;p&gt;A few other things it does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Each login gets an automatically assigned, editable colour tag, shown on the toolbar icon and in the switcher.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can add your own custom rules for apps Dock doesn't know about — Figma, Notion, whatever — with a match pattern, target behaviour, and account strategy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Built-in Google Workspace rules can be disabled but not deleted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rules import/export as JSON.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  No network requests
&lt;/h3&gt;

&lt;p&gt;It makes no network requests — nothing it does ever leaves your device. All the routing logic runs locally against windows Chrome already knows about.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;

&lt;p&gt;I haven't put it in the Chrome Store yet. Not sure I will. So clone the repo, build it yourself, and load it as an unpacked extension: &lt;a href="https://github.com/sirius93/dock" rel="noopener noreferrer"&gt;github.com/sirius93/dock&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That's the whole idea, and so far it's worked wonders for me. If it works for you too, star the repo or leave feedback — and if enough people find it worth the hassle, I'll look at making it live.&lt;/p&gt;

</description>
      <category>googleworkspace</category>
      <category>googlemeet</category>
      <category>chromeextension</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Introducing COPE: Create Once Post Everywhere</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Fri, 18 Sep 2026 06:53:57 +0000</pubDate>
      <link>https://dev.to/sirius93/introducing-cope-create-once-post-everywhere-40hi</link>
      <guid>https://dev.to/sirius93/introducing-cope-create-once-post-everywhere-40hi</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7k0meqeutuwkqxvq3hpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7k0meqeutuwkqxvq3hpq.png" alt="COPE OG Banner" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  COPE: Create Once Post Everywhere
&lt;/h2&gt;

&lt;p&gt;So here's the thing I've been building. It's called COPE — Create Once Post Everywhere — and it's exactly what it sounds like: write your thought down once, let an agent turn it into content for every platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually is
&lt;/h2&gt;

&lt;p&gt;COPE is an agent that runs on Claude or Codex. You give it a rough text note — voice-to-text ramble, half-formed idea, whatever — or even a URL, like one of your own blog posts, and it repurposes that into a full set of platform-ready outputs: a LinkedIn post, an X thread, a blog version, images, and a carousel PDF.&lt;/p&gt;

&lt;p&gt;It also generates threaded tweets or posts, so if you've got something meaty to say, it can spread it across multiple posts instead of cramming it into one.&lt;/p&gt;

&lt;h2&gt;
  
  
  How you use it
&lt;/h2&gt;

&lt;p&gt;There's no hosted app or dashboard here. You download the repo from GitHub and run it inside Claude or Codex directly. From there you feed it your note or a URL for context, and it does the repurposing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the outputs go
&lt;/h2&gt;

&lt;p&gt;Once COPE generates everything, here's the flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Carousel images → post to Instagram&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Carousel PDF → post to LinkedIn&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Short-form content → post to Threads or X&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The current limitation
&lt;/h2&gt;

&lt;p&gt;Automatic posting is not supported yet. That's a real limitation right now — you still have to manually post everything COPE generates. It handles the repurposing, not the publishing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best part
&lt;/h2&gt;

&lt;p&gt;Best part about it, it is open source. It's hosted on my GitHub at github.com/sirius93/cope, so anyone can pull it down, poke at it, or extend it.&lt;/p&gt;

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

&lt;p&gt;If you've got a rough note sitting in a text file or a blog post you want to squeeze more mileage out of, download the repo from &lt;a href="http://github.com/sirius93/cope" rel="noopener noreferrer"&gt;github.com/sirius93/cope&lt;/a&gt; and run it inside Claude or Codex. See what it turns your mess into.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>claude</category>
      <category>codex</category>
      <category>contentcreation</category>
    </item>
    <item>
      <title>Bulk-Adding Google Workspace Domain Aliases Without Service-Account Keys</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Sun, 16 Aug 2026 06:35:00 +0000</pubDate>
      <link>https://dev.to/sirius93/bulk-adding-google-workspace-domain-aliases-without-service-account-keys-234e</link>
      <guid>https://dev.to/sirius93/bulk-adding-google-workspace-domain-aliases-without-service-account-keys-234e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqu1vfaue9q5d5v2ypuo1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqu1vfaue9q5d5v2ypuo1.png" alt="Bulk-Adding Google Workspace Domain Aliases Banner" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Managing one domain in Google Workspace is straightforward. Managing ten, twenty, or more domains across several brands is where the process starts to hurt.&lt;/p&gt;

&lt;p&gt;For every domain, an administrator has to prove ownership, publish a DNS record, wait for propagation, return to Google Workspace, add the domain, configure mail routing, and verify the result. None of those steps is especially difficult. The problem is repetition — and repetition is where small mistakes become outages.&lt;/p&gt;

&lt;p&gt;I recently needed a better workflow for attaching a collection of brand domains to one Google Workspace account. The domains used GoDaddy DNS, and the intended behavior was simple: every existing Workspace user should receive the same username on every brand domain.&lt;/p&gt;

&lt;p&gt;That made the domains good candidates for Google Workspace user alias domains. It also made the process a good candidate for automation. The result is a CSV-driven Python CLI with three commands — &lt;code&gt;plan&lt;/code&gt;, &lt;code&gt;apply&lt;/code&gt;, &lt;code&gt;verify&lt;/code&gt; — that connects the Google Workspace Admin SDK, the Site Verification API, and the GoDaddy DNS API, authenticates with OAuth instead of a service-account key, and treats every write as something to check for before doing. Code's open source at &lt;a href="https://github.com/sirius93/google-workspace-domain-alias-provisioner" rel="noopener noreferrer"&gt;github.com/sirius93/google-workspace-domain-alias-provisioner&lt;/a&gt;, link at the bottom too.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with doing it manually
&lt;/h2&gt;

&lt;p&gt;The manual workflow usually looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the Google Admin console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a domain alias.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy Google's verification token.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the DNS provider.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the TXT record.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wait for DNS propagation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask Google to verify the domain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure MX records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat for the next domain. Do this once and it feels harmless. Do it twenty times and several risks appear:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A domain is skipped.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A TXT value is copied incorrectly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The wrong parent domain is selected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Existing MX records are replaced accidentally.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The spreadsheet and the real configuration drift apart.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nobody has a reliable record of what succeeded. The goal was not merely to make the process faster. The goal was to make it repeatable, inspectable, and safe to rerun.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Domain alias or secondary domain?
&lt;/h2&gt;

&lt;p&gt;Before automating anything, it is important to choose the correct Google Workspace domain model.&lt;/p&gt;

&lt;p&gt;A user alias domain gives existing users and groups equivalent addresses on another domain. If &lt;code&gt;brand.example&lt;/code&gt; is an alias of &lt;code&gt;company.example&lt;/code&gt;, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alex@company.example -&amp;gt; alex@brand.example
sales@company.example -&amp;gt; sales@brand.example

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both addresses point to the existing account or group. Users continue signing in with their primary address, and there is no separate mailbox.&lt;/p&gt;

&lt;p&gt;A secondary domain is different. It is intended for a separate collection of users whose primary accounts live on that domain. Secondary-domain users normally require their own Workspace licences.&lt;/p&gt;

&lt;p&gt;The automation described here is specifically for user alias domains. That keeps the mapping predictable: one parent Workspace domain, many brand domains, and matching usernames across all of them.&lt;/p&gt;

&lt;p&gt;Google documents the distinction and current domain limits in its multiple-domain guidance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning the domain list into a source of truth
&lt;/h2&gt;

&lt;p&gt;The first useful improvement is surprisingly mundane: put the desired state in a CSV file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;parent&lt;/span&gt;&lt;span class="err"&gt;_&lt;/span&gt;&lt;span class="k"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;dns&lt;/span&gt;&lt;span class="err"&gt;_&lt;/span&gt;&lt;span class="k"&gt;provider&lt;/span&gt;
&lt;span class="k"&gt;brand&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="k"&gt;one&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;example&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;domain&lt;/span&gt;&lt;span class="err"&gt;_&lt;/span&gt;&lt;span class="k"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;company&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;example&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;godaddy&lt;/span&gt;
&lt;span class="k"&gt;brand&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="k"&gt;two&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;example&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;domain&lt;/span&gt;&lt;span class="err"&gt;_&lt;/span&gt;&lt;span class="k"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;company&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;example&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;godaddy&lt;/span&gt;
&lt;span class="k"&gt;brand&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="k"&gt;three&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;example&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;domain&lt;/span&gt;&lt;span class="err"&gt;_&lt;/span&gt;&lt;span class="k"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;company&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="k"&gt;example&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;godaddy&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This file becomes the input to every operation. It is easy to review, version, split into pilot batches, and compare with the actual environment.&lt;/p&gt;

&lt;p&gt;The script validates that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Every domain is unique.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every row has a parent domain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The requested type is &lt;code&gt;domain_alias&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The DNS provider is supported. That validation catches boring mistakes before an API call turns them into an operational problem.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The automation flow
&lt;/h2&gt;

&lt;p&gt;The workflow connects three APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Site Verification API&lt;/strong&gt; generates a DNS verification token and confirms ownership.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GoDaddy Domains API v3&lt;/strong&gt; reads the zone and creates missing TXT or MX records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Workspace Admin SDK Directory API&lt;/strong&gt; creates and inspects domain aliases. For each CSV row, the tool performs this sequence:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Check whether the domain is already verified.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check whether the Workspace alias already exists.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Read the current GoDaddy DNS records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Request a Google verification token when needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the token as an apex TXT record if it is missing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Poll public DNS until the token is visible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask Google to verify ownership.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the Workspace domain alias under the configured parent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optionally add Google MX when — and only when — the domain has no MX records. The read-before-write behavior is essential. A rerun should continue an incomplete job, not create duplicates.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why the CLI has plan, apply, and verify
&lt;/h2&gt;

&lt;p&gt;Infrastructure tools are much easier to trust when inspection and mutation are separate operations.&lt;/p&gt;

&lt;p&gt;The CLI exposes three commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;python workspace_domain_aliases.py plan domains.csv
python workspace_domain_aliases.py apply domains.csv
python workspace_domain_aliases.py verify domains.csv

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  plan
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;plan&lt;/code&gt; is read-only. It checks Google and GoDaddy, then prints a compact summary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DOMAIN DNS VERIFIED WORKSPACE MX
brand-one.example ok no missing 0
brand-two.example ok yes missing 5
brand-three.example ok no present 1

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This answers the questions that matter before a change: Can the tool access the DNS zone? Does Google already recognize the owner? Does the Workspace alias already exist? Is mail already configured?&lt;/p&gt;

&lt;h3&gt;
  
  
  apply
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;apply&lt;/code&gt; creates missing ownership records, verifies domains, and creates missing Workspace aliases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;python workspace_domain_aliases.py apply domains.csv

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DNS propagation is asynchronous, so the tool polls for the verification TXT record. If the record does not become visible before the timeout, the run reports the domain as pending. Nothing needs to be rolled back: wait, then rerun the same command.&lt;/p&gt;

&lt;h3&gt;
  
  
  verify
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;verify&lt;/code&gt; reconciles the CSV with the live state, checking ownership, alias presence, parent-domain association, and whether the domain has at least one MX record. A non-zero exit code makes it usable in a shell script or a future CI workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication without service-account keys
&lt;/h2&gt;

&lt;p&gt;My first instinct was to use a service account with domain-wide delegation. That is a common design for unattended Workspace administration, but the organization enforced this policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iam.managed.disableServiceAccountKeyCreation

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was not a problem to work around. It was a useful security boundary.&lt;/p&gt;

&lt;p&gt;Long-lived service-account JSON keys are portable credentials. If one leaks into a repository, backup, support ticket, or developer machine, it can be abused until revoked. Google recommends avoiding service-account keys when a safer authentication method fits the workload.&lt;/p&gt;

&lt;p&gt;For a locally operated administrative tool, interactive OAuth is a good match. The application uses an OAuth 2.0 Desktop app client and asks the administrator to authorize two scopes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://www.googleapis.com/auth/admin.directory.domain
https://www.googleapis.com/auth/siteverification

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Python flow is conceptually simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;google_auth_oauthlib.flow&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;InstalledAppFlow&lt;/span&gt;

&lt;span class="n"&gt;scopes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://www.googleapis.com/auth/admin.directory.domain&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://www.googleapis.com/auth/siteverification&lt;/span&gt;&lt;span class="sh"&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;flow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;InstalledAppFlow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_client_secrets_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;oauth-client.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;credentials&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;flow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run_local_server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;port&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first run opens a browser. The administrator signs in and approves access. The resulting refresh token is stored locally and reused on later runs.&lt;/p&gt;

&lt;p&gt;That token must still be treated like a password. It should never be committed, pasted into an issue, or stored beside public example files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting to Google Workspace
&lt;/h2&gt;

&lt;p&gt;Once OAuth credentials are available, the Python client can construct both Google services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;googleapiclient.discovery&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;

&lt;span class="n"&gt;directory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;admin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;directory_v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;cache_discovery&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;verification&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;siteVerification&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;cache_discovery&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&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;Creating a domain alias uses the Directory API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;domainAliases&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_customer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;domainAliasName&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;brand.example&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;parentDomainName&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company.example&lt;/span&gt;&lt;span class="sh"&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="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before inserting, the tool lists existing aliases and compares the live parent domain with the CSV. If an alias already exists under a different parent, the script stops instead of guessing how to repair it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating domain verification
&lt;/h2&gt;

&lt;p&gt;Google ownership verification has two distinct operations: obtain a token and verify the resource.&lt;/p&gt;

&lt;p&gt;The request describes an internet domain and asks for DNS verification:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;verification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;webResource&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;getToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;site&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;identifier&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;brand.example&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;INET_DOMAIN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;verificationMethod&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DNS&lt;/span&gt;&lt;span class="sh"&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="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;token&lt;/span&gt;&lt;span class="sh"&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 token is published as an apex TXT record. Once it is visible in public DNS, the tool asks Google to verify the resource:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;verification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;webResource&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;verificationMethod&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DNS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;site&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;identifier&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;brand.example&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;INET_DOMAIN&lt;/span&gt;&lt;span class="sh"&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="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeping these steps separate makes DNS propagation explicit. A successful API response from the DNS provider does not mean every resolver can see the record immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding records through GoDaddy safely
&lt;/h2&gt;

&lt;p&gt;GoDaddy's v3 DNS API supports individual record creation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST /v3/domains/zones/{zone}/dns-records

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A verification record looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TXT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"google-site-verification=..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ttl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The safe pattern is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;List existing records of the relevant type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normalize record names and values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the record only when an exact match is absent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Never replace the entire DNS zone. This matters because DNS APIs differ. Some "set records" methods replace every record with a matching name and type. Others can replace the whole zone. A provisioning tool should use the narrowest operation available.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GoDaddy also warns that record creation is not inherently idempotent: blindly replaying a failed POST can create duplicates. Reading the zone before each write significantly reduces that risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why MX changes are opt-in
&lt;/h2&gt;

&lt;p&gt;Verification TXT records are additive and relatively low-risk. MX records are different: they control where inbound email is delivered.&lt;/p&gt;

&lt;p&gt;The tool therefore does not touch MX during the default &lt;code&gt;apply&lt;/code&gt; operation. Mail configuration requires an explicit flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;python workspace_domain_aliases.py apply domains.csv --add-google-mx

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even with the flag, the tool adds &lt;code&gt;smtp.google.com&lt;/code&gt; only when the domain has zero MX records. If any MX record already exists, it prints a warning and leaves the configuration untouched.&lt;/p&gt;

&lt;p&gt;That conservative decision handles several real-world cases: the domain already uses Google's older five-record MX configuration, the domain uses Google's newer single-record configuration, another mail provider is still active, or the domain has intentional routing or migration records.&lt;/p&gt;

&lt;p&gt;Automation should not interpret "different from my preferred configuration" as "safe to overwrite."&lt;/p&gt;

&lt;p&gt;SPF, DKIM, and DMARC are also intentionally outside the first version. Each requires knowledge of the organization's complete mail-sending environment. For example, adding a second SPF record can make SPF invalid rather than more secure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making reruns safe
&lt;/h2&gt;

&lt;p&gt;Bulk administrative work rarely completes in one flawless pass. DNS might be slow, one domain might belong to another account, an API can rate-limit a request, or an administrator might pause the rollout.&lt;/p&gt;

&lt;p&gt;The tool is designed so that rerunning &lt;code&gt;apply&lt;/code&gt; is normal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Existing TXT token: skip creation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Already verified domain: skip verification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Existing Workspace alias with correct parent: skip insertion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Existing MX records: leave unchanged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pending DNS: retry later. This is the practical meaning of idempotency for the workflow. The entire run may involve APIs whose individual POST operations are not idempotent, but the program checks the current state before deciding whether a write is necessary.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A rollout strategy that minimizes surprises
&lt;/h2&gt;

&lt;p&gt;For a real environment, I would use the following sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Export or back up every DNS zone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Put one non-critical domain in a pilot CSV.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;plan&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inspect any existing MX records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;apply&lt;/code&gt; without the MX flag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm the alias in the Google Admin console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test receiving mail after the approved MX change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm outbound authentication separately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expand to small batches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;verify&lt;/code&gt; and keep the output with the change record. The pilot is not ceremony. It confirms that the OAuth project, administrator privileges, Workspace tenant, GoDaddy account, authoritative nameservers, and API behavior all match the assumptions in the code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I would add next
&lt;/h2&gt;

&lt;p&gt;The first release solves one narrow problem well. Natural next steps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DNS-provider adapters for Cloudflare, Route 53, TransIP, and others&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secondary-domain support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON output for CI and audit systems&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit tests with mocked API responses&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explicit DNS backup and rollback workflows&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SPF, DKIM, and DMARC validation without automatic enforcement&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A keyless workload-identity design for approved unattended execution Any future provider should preserve the same safety contract: read before write, create only what is missing, never replace a zone implicitly, and require explicit intent for destructive actions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lessons learned
&lt;/h2&gt;

&lt;p&gt;Three ideas mattered more than the API calls themselves.&lt;/p&gt;

&lt;p&gt;First, model the desired state before writing code. The CSV is small, but it turns an informal checklist into something reviewable and repeatable.&lt;/p&gt;

&lt;p&gt;Second, treat security controls as design input. A blocked service-account key did not require disabling an organization policy. It led to an authentication flow better suited to a human-operated CLI.&lt;/p&gt;

&lt;p&gt;Third, make dangerous behavior inconvenient. The tool can automate MX creation, but only through an explicit flag, and it refuses to modify existing mail routing. A little friction is valuable when a command can affect production email.&lt;/p&gt;

&lt;p&gt;That's usually the sweet spot for internal automation. I've open sourced it — if you're wiring up your own multi-brand Workspace setup, the CLI and the client wrappers are there to fork.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Source code:&lt;/strong&gt; &lt;a href="https://github.com/sirius93/ggwdap" rel="noopener noreferrer"&gt;github.com/sirius93/ggwdap&lt;/a&gt; — plan/apply/verify CLI, CSV schema, and the Google + GoDaddy client wrappers described above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Workspace Admin SDK Directory API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Site Verification API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Directory API Python quickstart&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Workspace multiple-domain guidance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GoDaddy DNS API guide&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Cloud authentication guidance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This project is not affiliated with or endorsed by Google or GoDaddy. DNS and mail-routing changes can disrupt production services; test with a non-critical domain and keep current DNS backups.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>googleworkspace</category>
      <category>python</category>
      <category>dns</category>
      <category>godaddy</category>
    </item>
    <item>
      <title>How I Moved My Google AI Studio App to GitHub CI</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Sun, 12 Jul 2026 05:59:58 +0000</pubDate>
      <link>https://dev.to/sirius93/how-i-moved-my-google-ai-studio-app-to-github-ci-2a4k</link>
      <guid>https://dev.to/sirius93/how-i-moved-my-google-ai-studio-app-to-github-ci-2a4k</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frmyx89bodvb62f1cju59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frmyx89bodvb62f1cju59.png" alt="Blog banner" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kitaaben started life in Google AI Studio. No shame in that — it's genuinely the fastest way I know to get a full-stack app with Firebase wired up and live. But "fast to start" and "where your code should live forever" are two different things.&lt;/p&gt;

&lt;p&gt;I wanted GitHub to be the source of truth. Real commit history. Real pull requests. A deploy pipeline I could reason about without a proprietary UI sitting in the middle. The service was already live on Cloud Run, so the plan was simple: point it at the GitHub repo and be done by lunch.&lt;/p&gt;

&lt;p&gt;It took the whole afternoon. Just not the afternoon I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  The plan that should have worked
&lt;/h2&gt;

&lt;p&gt;Cloud Run has a built-in feature for exactly this — &lt;em&gt;Continuously deploy from a repository&lt;/em&gt;. Connect a GitHub repo, pick a branch, and it auto-generates a Cloud Build trigger that builds and deploys on every push. No YAML. Click, connect, push.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Snag 1.&lt;/strong&gt; The very first build failed, but for a boring reason. My repo had two lockfiles — &lt;code&gt;package-lock.json&lt;/code&gt; and a stray &lt;code&gt;pnpm-lock.yaml&lt;/code&gt; that got committed by accident at some point. Google's Buildpacks saw the pnpm lockfile and built with pnpm. And recent pnpm versions block dependency install scripts by default as a supply-chain protection. So esbuild's postinstall script (the one that downloads its platform binary) never ran, and the build died before it even reached my code.&lt;/p&gt;

&lt;p&gt;Fix: delete the stray lockfile. The project was never pnpm-based anyway. Quick, forgettable, not the story.&lt;/p&gt;

&lt;h2&gt;
  
  
  The error that refused to explain itself
&lt;/h2&gt;

&lt;p&gt;Next push got further — all the way to the deploy step — and then this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR: (gcloud.run.services.update)
spec.template.metadata.annotations[run.googleapis.com/sources]:
Source annotation has sources that are not referenced by a container.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read that sentence a few times. Nothing in it tells you what to do. No stack trace, no file, no line number. Just a Cloud Run validator rejecting a deploy against its own service definition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrong theory #1: strip the annotation
&lt;/h3&gt;

&lt;p&gt;The obvious read — some stale annotation is sitting on the live service, left over from however AI Studio originally provisioned it. So just remove it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gcloud run services update kitaaben &lt;span class="nt"&gt;--region&lt;/span&gt; us-west1 &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--remove-annotations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;run.googleapis.com/sources

ERROR: unrecognized arguments: &lt;span class="nt"&gt;--remove-annotations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;run.googleapis.com/sources
&lt;span class="o"&gt;(&lt;/span&gt;did you mean &lt;span class="s1"&gt;'--remove-env-vars'&lt;/span&gt;?&lt;span class="o"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turns out &lt;code&gt;gcloud run services update&lt;/code&gt; has no generic "edit any annotation" flag. Most of Cloud Run's raw Knative-style metadata isn't meant to be hand-edited through convenience flags — precisely to stop people from doing what I was about to do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrong theory #2: ditch Buildpacks entirely
&lt;/h3&gt;

&lt;p&gt;New theory. The &lt;code&gt;run.googleapis.com/sources&lt;/code&gt; annotation is part of Cloud Run's source-deploy tracking — it maps source paths to containers so the console can show "this revision was built from commit X." A plain prebuilt Docker image needs none of that. So: write a Dockerfile, sidestep Buildpacks and its source-tracking machinery completely.&lt;/p&gt;

&lt;p&gt;I wrote a multi-stage Dockerfile. Built it locally, ran it, confirmed it booted and served traffic. Pushed.&lt;/p&gt;

&lt;p&gt;And this is where it got genuinely confusing. The build went green. The live site didn't change.&lt;/p&gt;

&lt;p&gt;The build log explained why. Adding a Dockerfile made Cloud Build quietly switch strategies. Instead of the four-step Buildpacks template it had been using (build → pull → push → deploy), it fell back to Google's generic "there's a Dockerfile here, build and push an image" default, which has &lt;strong&gt;no deploy step at all&lt;/strong&gt;. Green build. No deploy. Nobody tells you.&lt;/p&gt;

&lt;p&gt;Fix for this part: a handwritten &lt;code&gt;cloudbuild.yaml&lt;/code&gt; with three explicit steps. &lt;code&gt;docker build&lt;/code&gt;, &lt;code&gt;docker push&lt;/code&gt;, &lt;code&gt;gcloud run deploy --image&lt;/code&gt;. Three commands, in order, in the repo. No more guessing what the pipeline does.&lt;/p&gt;

&lt;h3&gt;
  
  
  Same error, completely different deploy method
&lt;/h3&gt;

&lt;p&gt;With a real deploy step finally in place, I pushed again — and got the &lt;em&gt;exact same annotation error&lt;/em&gt;. This time from a plain &lt;code&gt;gcloud run deploy --image&lt;/code&gt; call that had nothing to do with source builds or Buildpacks at all.&lt;/p&gt;

&lt;p&gt;That was the moment the real shape of the problem clicked. It was never about &lt;em&gt;how&lt;/em&gt; I was deploying. Buildpacks, Dockerfile, source-based, image-based — didn't matter. Something was wrong with the live service's own persisted state, and every deploy method was stepping on the same landmine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exporting the body
&lt;/h2&gt;

&lt;p&gt;Time to look at what the service actually thought it was running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gcloud run services describe kitaaben &lt;span class="nt"&gt;--region&lt;/span&gt; us-west1 &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--format&lt;/span&gt; &lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; service.yaml

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Buried in that YAML: the container's &lt;code&gt;image&lt;/code&gt; field wasn't a real image reference. It was the literal string &lt;code&gt;scratch&lt;/code&gt; — Cloud Run's internal placeholder for services that resolve their actual container indirectly, through that same &lt;code&gt;sources&lt;/code&gt; annotation I'd been fighting all afternoon.&lt;/p&gt;

&lt;p&gt;The service was &lt;em&gt;born&lt;/em&gt; this way. AI Studio provisioned it through its own source-deploy pipeline on day one, and it had been carrying that placeholder ever since. A ghost container, quietly broken since birth, and it only mattered the day I tried to deploy any other way.&lt;/p&gt;

&lt;p&gt;So every attempt was failing one of two ways: either the deploy tried to update the sources annotation and Cloud Run rejected the mismatch, or the leftover &lt;code&gt;scratch&lt;/code&gt; placeholder had nothing left to resolve against.&lt;/p&gt;

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

&lt;p&gt;Fix both in one edit, apply atomically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# in service.yaml:&lt;/span&gt;
&lt;span class="c"&gt;# 1. delete the run.googleapis.com/sources annotation line&lt;/span&gt;
&lt;span class="c"&gt;# 2. change image: scratch to the real image path&lt;/span&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;gcloud run services replace service.yaml
Applying new configuration to Cloud Run service &lt;span class="o"&gt;[&lt;/span&gt;kitaaben]...
Deploying... &lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was it. Not a flag. Not a build strategy. Not a YAML rewrite of the pipeline. A genuinely stuck field in the service's own state that no amount of retrying — from any deploy method — was ever going to clear.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you're doing this migration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If AI Studio (or any source-deploy tool) originally provisioned your Cloud Run service, don't assume a clean deploy method inherits a clean service. &lt;code&gt;describe --format export&lt;/code&gt; and &lt;em&gt;read the spec&lt;/em&gt; before you spend a day guessing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;run.googleapis.com/sources&lt;/code&gt; and &lt;code&gt;image: scratch&lt;/code&gt; travel together. See one, check for the other.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud Build silently changes strategy based on what's in your repo. Dockerfile present vs absent produces different pipelines. If a build goes green but nothing deploys, check whether the deploy step still exists.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not every Cloud Run field has a convenience flag. When &lt;code&gt;--remove-X&lt;/code&gt; doesn't exist, the fallback is always: export the spec, hand-edit, &lt;code&gt;services replace&lt;/code&gt;. Haven't touched the pipeline since. It's a Cloud Build trigger watching &lt;code&gt;main&lt;/code&gt;, building a Docker image, deploying it. No mystery annotations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub is the source of truth now. AI Studio is where &lt;a href="https://kitaaben.com" rel="noopener noreferrer"&gt;Kitaaben&lt;/a&gt; was born, not where it lives.&lt;/p&gt;

&lt;p&gt;That’s all, folks! I hope you found this helpful. If you enjoyed this, check out more articles on my Blog, &lt;a href="https://blog.nandan.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;https://blog.nandan.dev/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to comment, email me at &lt;a href="mailto:connect@nandan.dev"&gt;&lt;strong&gt;connect@nandan.dev&lt;/strong&gt;&lt;/a&gt;, or connect with me on Twitter, Instagram, or GitHub. Don’t forget to subscribe to my newsletter for regular updates on JavaScript topics!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/_sirius93_" rel="noopener noreferrer"&gt;&lt;strong&gt;Twitter&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://www.instagram.com/nandandotdev" rel="noopener noreferrer"&gt;&lt;strong&gt;Instagram&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://github.com/sirius93" rel="noopener noreferrer"&gt;&lt;strong&gt;Github&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://nandan.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;Website&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>googleaistudio</category>
      <category>cicd</category>
      <category>book</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>Give it a read.</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Thu, 25 Jun 2026 05:13:21 +0000</pubDate>
      <link>https://dev.to/sirius93/give-it-a-read-3ndl</link>
      <guid>https://dev.to/sirius93/give-it-a-read-3ndl</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/sirius93/i-got-tired-of-goodreads-so-i-built-kitaabencom-1dp3" class="crayons-story__hidden-navigation-link"&gt;I Got Tired of Goodreads. So I Built Kitaaben.com&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/sirius93" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F175617%2Fffbce4aa-7b34-4bd8-837d-41da6d24ddeb.jpeg" alt="sirius93 profile" class="crayons-avatar__image" width="720" height="720"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/sirius93" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Nandan Kumar
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Nandan Kumar
                
              
              &lt;div id="story-author-preview-content-3981556" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/sirius93" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F175617%2Fffbce4aa-7b34-4bd8-837d-41da6d24ddeb.jpeg" class="crayons-avatar__image" alt="" width="720" height="720"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Nandan Kumar&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/sirius93/i-got-tired-of-goodreads-so-i-built-kitaabencom-1dp3" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/sirius93/i-got-tired-of-goodreads-so-i-built-kitaabencom-1dp3" id="article-link-3981556"&gt;
          I Got Tired of Goodreads. So I Built Kitaaben.com
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/books"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;books&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/bookreview"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;bookreview&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/bookstagram"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;bookstagram&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/sirius93/i-got-tired-of-goodreads-so-i-built-kitaabencom-1dp3#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>I Got Tired of Goodreads. So I Built Kitaaben.com</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Wed, 24 Jun 2026 15:57:55 +0000</pubDate>
      <link>https://dev.to/sirius93/i-got-tired-of-goodreads-so-i-built-kitaabencom-1dp3</link>
      <guid>https://dev.to/sirius93/i-got-tired-of-goodreads-so-i-built-kitaabencom-1dp3</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuxtx25gz6p8lecrv17po.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuxtx25gz6p8lecrv17po.png" alt="Kitaaben Banner" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I read a lot. Not as much as I'd like to, but enough that I needed a place to keep track of it all.&lt;/p&gt;

&lt;p&gt;For years, Goodreads was that place. Then Amazon bought it in 2013 and... nothing happened. No meaningful update. No design refresh. No new features worth talking about. Just a bloated, slow, social-feed-first app that cared more about what your friends were reading than what you actually wanted from a reading tracker.&lt;/p&gt;

&lt;p&gt;So I stopped waiting and built my own. It's called &lt;a href="https://kitaaben.com" rel="noopener noreferrer"&gt;Kitaaben&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Even Is Kitaaben?
&lt;/h2&gt;

&lt;p&gt;Kitaaben is a private bookshelf tracker. That's it, honestly.&lt;/p&gt;

&lt;p&gt;You sign in with Google, add your books, and start tracking. No followers, no public profile, no algorithm telling you what to read next. Just your books, organized the way you want them.&lt;/p&gt;

&lt;p&gt;I built it as a React SPA, backed by Firestore for real-time sync and Google OAuth for auth. It works as a PWA too, so you can install it directly on your phone or desktop and it behaves like a native app. Even logs notes offline and syncs when you're back online.&lt;/p&gt;

&lt;p&gt;The stack is deliberately simple. I didn't want to over-engineer a reading tracker.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj6bq8x6dwv39gaw0bn33.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj6bq8x6dwv39gaw0bn33.png" alt="Kitaaben feature banner" width="799" height="422"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Features That Actually Matter
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Reading Progress Tracking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can log how many pages you've read, mark a book as "Reading", "To Read", or "Completed", and watch your progress bar move. Small thing, weirdly satisfying.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yearly Reading Goals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Set a target at the start of the year. Kitaaben shows you a clean gauge of where you stand. No gamification, no streaks, no push notifications guilt-tripping you into reading. Just the number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The AI Review Assistant&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one is my favourite. You know how you finish a book, you have all these raw thoughts, and then you sit down to write a review, and your mind goes blank?&lt;/p&gt;

&lt;p&gt;Kitaaben fixes that. You log rough chapter notes as you read. When you're done, one click and the AI turns your messy notes into a proper, readable review. It uses Gemini under the hood, server-side, so nothing weird is happening with your data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beautiful Bookshelf UI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can pick colour palettes for your book spines, attach local photos, or link directly to publisher dust jackets. Your shelf actually looks good. Goodreads shelf looks like it was designed in 2009 because it was.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Sync + Offline PWA&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Everything syncs in real-time to Firestore. Works across your phone, tablet, and desktop. Add notes on a flight, they'll sync when you land.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your Data Is Yours&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No corporate sponsors. No ads. No one is analysing your reading habits to sell you something. The free tier is genuinely free, forever. If you want AI reviews and premium themes, there's an Elite plan, but the core is completely free.&lt;/p&gt;




&lt;h2&gt;
  
  
  Kitaaben vs Goodreads — Let's Be Honest
&lt;/h2&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;Goodreads&lt;/th&gt;
&lt;th&gt;Kitaaben&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last major update&lt;/td&gt;
&lt;td&gt;Years ago&lt;/td&gt;
&lt;td&gt;Actively built&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Social feed&lt;/td&gt;
&lt;td&gt;Yes, and you can't remove it&lt;/td&gt;
&lt;td&gt;No. Just your books.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ads&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Never&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data privacy&lt;/td&gt;
&lt;td&gt;Amazon owns everything&lt;/td&gt;
&lt;td&gt;Private, encrypted, yours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI reviews&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Offline support&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (PWA)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Design&lt;/td&gt;
&lt;td&gt;Dated&lt;/td&gt;
&lt;td&gt;Clean, warm, actually nice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free tier&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Goodreads isn't bad because it was badly built. It's bad because it stopped being built. Amazon has no incentive to fix it. It already has 150 million users who have nowhere to go.&lt;/p&gt;

&lt;p&gt;Kitaaben is built for readers who are tired of that and just want something that works, looks good, and doesn't treat your reading life as a data point.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who Is It For?
&lt;/h2&gt;

&lt;p&gt;Honestly? People like me.&lt;/p&gt;

&lt;p&gt;If you read regularly and want a clean private place to track it, Kitaaben will feel like a breath of fresh air. If you rely on Goodreads mainly for its social features — seeing what friends are reading, community reviews, that sort of thing — Kitaaben isn't trying to replace that. It's not a social network. It never will be.&lt;/p&gt;

&lt;p&gt;It's a personal reading sanctuary. That's the whole point.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://kitaaben.com" rel="noopener noreferrer"&gt;kitaaben.com&lt;/a&gt; — Sign in with Google, takes about 60 seconds to set up.&lt;/p&gt;

&lt;p&gt;If you have feedback, brutal or otherwise, reach me at &lt;a href="mailto:namastay@kitaaben.com"&gt;namastay@kitaaben.com&lt;/a&gt; or find me on Twitter. I'm building this in the open and I actually read every message.&lt;/p&gt;

&lt;p&gt;Thanks, Nandan&lt;/p&gt;

</description>
      <category>books</category>
      <category>bookreview</category>
      <category>bookstagram</category>
    </item>
    <item>
      <title>How to Convert Nested Objects to Flat Objects in JavaScript.</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Wed, 04 Mar 2026 00:59:34 +0000</pubDate>
      <link>https://dev.to/sirius93/how-to-convert-nested-objects-to-flat-objects-in-javascript-4ld1</link>
      <guid>https://dev.to/sirius93/how-to-convert-nested-objects-to-flat-objects-in-javascript-4ld1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcf5xrd3qtgxlc09mdhh4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcf5xrd3qtgxlc09mdhh4.png" alt="How to Convert Nested Objects to Flat Objects in JavaScript" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am sure you have been asked this question in one of the interviews.&lt;/p&gt;

&lt;p&gt;It looks simple at first. But the interviewer is actually checking whether you understand recursion, objects, and how JavaScript treats arrays.&lt;/p&gt;

&lt;p&gt;So basically, you are given a nested object, and you are expected to simplify it by removing the nesting and printing it in a non-nested format.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is a simple input and output :
&lt;/h3&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="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;c&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&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;h3&gt;
  
  
  Output:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="nx"&gt;b_c&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="nx"&gt;b_d_e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&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;
  
  
  Now look at the solution :
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prefix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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="c1"&gt;// Loop through every key in the object&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;key&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// Skip properties coming from prototype chain&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="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&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="c1"&gt;// If prefix exists, append current key using _&lt;/span&gt;
        &lt;span class="c1"&gt;// Otherwise just use the key itself&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;objKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;prefix&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`\({prefix}_\){key}`&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;key&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;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

        &lt;span class="c1"&gt;// If value is an object and not null,&lt;/span&gt;
        &lt;span class="c1"&gt;// recursively flatten it&lt;/span&gt;
        &lt;span class="k"&gt;if &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;value&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&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;value&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="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;objKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// If it's a primitive value, assign it directly&lt;/span&gt;
            &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;objKey&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&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;// Return the accumulated result&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&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;Let us test it.&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="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;c&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="c1"&gt;// {a: 1, b_c: 2, b_d_e_0: 1, b_d_e_1: 2 }&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now observe something interesting.&lt;/p&gt;

&lt;p&gt;It flattens the nested object correctly.&lt;/p&gt;

&lt;p&gt;But it also destructures the array and adds indexes as keys.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why do you think that happened?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;💡&lt;/p&gt;

&lt;p&gt;As you know, everything in JavaScript is an object. Even &lt;strong&gt;Arrays&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So when we check:&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;typeof&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Arrays also satisfy that condition.&lt;/p&gt;

&lt;p&gt;That means our recursive call is going inside arrays as well, and treating indexes (0, 1) like object keys.&lt;/p&gt;

&lt;p&gt;That is why we are getting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;b_d_e_0: 1
b_d_e_1: 2

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;So, how do we fix it?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Simple.&lt;/p&gt;

&lt;p&gt;We add one more condition to ignore Arrays.&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;function&lt;/span&gt; &lt;span class="nf"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prefix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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="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;key&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// Ensure we are working only with object's own properties&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="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;objKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;prefix&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`\({prefix}_\){key}`&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;key&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;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

        &lt;span class="c1"&gt;// Only recurse if:&lt;/span&gt;
        &lt;span class="c1"&gt;// 1. value is an object&lt;/span&gt;
        &lt;span class="c1"&gt;// 2. value is not null&lt;/span&gt;
        &lt;span class="c1"&gt;// 3. value is NOT an array&lt;/span&gt;
        &lt;span class="k"&gt;if &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;value&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&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;value&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
            &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&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;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;objKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// Directly assign primitives and arrays&lt;/span&gt;
            &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;objKey&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&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;return&lt;/span&gt; &lt;span class="nx"&gt;res&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;
  
  
  &lt;strong&gt;Testing Both Cases&lt;/strong&gt;
&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="nx"&gt;input1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;c&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;c&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input1&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="c1"&gt;// { a: 1, b_c: 2, b_d_e: [1, 2] }&lt;/span&gt;
&lt;span class="c1"&gt;// { a: 1, b_c: 2, b_d_e: 3 }&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is it.&lt;/p&gt;

&lt;p&gt;A simple recursion problem. But it tests whether you truly understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How objects work&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How arrays behave internally&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How recursion accumulates results&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And how small edge cases can break your logic&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why interviewers love this question.&lt;/p&gt;

&lt;p&gt;That’s all, folks! I hope you found this helpful. If you enjoyed this, check out more articles on my Blog, &lt;a href="https://blog.nandan.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;https://blog.nandan.dev/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to comment, email me at &lt;a href="mailto:connect@nandan.dev"&gt;&lt;strong&gt;connect@nandan.dev&lt;/strong&gt;&lt;/a&gt;, or connect with me on Twitter, Instagram, or GitHub. Don’t forget to subscribe to my newsletter for regular updates on JavaScript topics!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/_sirius93_" rel="noopener noreferrer"&gt;&lt;strong&gt;Twitter&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://www.instagram.com/nandandotdev" rel="noopener noreferrer"&gt;&lt;strong&gt;Instagram&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://github.com/sirius93" rel="noopener noreferrer"&gt;&lt;strong&gt;Github&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://nandan.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;Website&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>objects</category>
      <category>json</category>
      <category>jsinterview</category>
    </item>
    <item>
      <title>Built something over last weekend, thought I will share with my dev community. https://bailoutt.com</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Tue, 23 Sep 2025 16:11:02 +0000</pubDate>
      <link>https://dev.to/sirius93/built-something-over-last-weekend-thought-i-will-share-with-my-dev-community-1aki</link>
      <guid>https://dev.to/sirius93/built-something-over-last-weekend-thought-i-will-share-with-my-dev-community-1aki</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://bailoutt.com/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fframerusercontent.com%2Fassets%2Fbx2KHyDlhJQAxsQUXODShrsUz28.png" height="auto" class="m-0"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://bailoutt.com/" rel="noopener noreferrer" class="c-link"&gt;
            BailOutt |  Escape Awkward Situations | AI Fake Call Service | Social Anxiety Solution
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Never get trapped in awkward situations again. Get real, believable phone calls from real numbers when you need them most. BailOutt’s AI-powered fake call service helps you escape bad dates, long meetings, and social anxiety with ease.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fframerusercontent.com%2Fimages%2FR7ZW2oxiKgijD3384CiQcMp0KN4.jpg"&gt;
          bailoutt.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>HTML Pitfalls and Gotchas Every Developer Should Avoid</title>
      <dc:creator>Nandan Kumar</dc:creator>
      <pubDate>Fri, 05 Sep 2025 04:23:19 +0000</pubDate>
      <link>https://dev.to/sirius93/html-pitfalls-and-gotchas-every-developer-should-avoid-51em</link>
      <guid>https://dev.to/sirius93/html-pitfalls-and-gotchas-every-developer-should-avoid-51em</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hwe05rdp4iuytc1xcq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hwe05rdp4iuytc1xcq5.png" alt="HTML pitfalls Banner" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML is easy, said every developer ever.&lt;/p&gt;

&lt;p&gt;HTML is deceptively simple. You open a tag, you close a tag, and something appears on screen. But beneath that simplicity lurk gotchas that can silently break your layout, wreck your SEO, or make your site look unprofessional when shared on social media.&lt;/p&gt;

&lt;p&gt;In this world of frameworks and libraries, its easy to miss some of the basic stuff that needs to be taken care of in your webpage, because your frameworks boilerplate code adds up most of the stuff and takes care of the basics. But its always good to know some of them that are important or arent added by your framework by default.&lt;/p&gt;

&lt;p&gt;Here are the critical HTML pitfalls to avoid and how to fix them immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Forgetting the DOCTYPE Declaration
&lt;/h2&gt;

&lt;p&gt;Skipping the doctype triggers something called as the &lt;strong&gt;quirks mode&lt;/strong&gt; , where browsers start behaving like it's 1999. This results in inconsistent CSS rendering and unpredictable JavaScript behaviour across browsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always declare it at the very top of your HTML file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Missing the Character Encoding Meta Tag
&lt;/h2&gt;

&lt;p&gt;Without proper character encoding, special characters turn into garbled symbols i.e. (). This breaks accented letters, smart quotes, and emojis, and it makes your webpage content look broken and unprofessional.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Place this inside the&lt;/strong&gt; &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta charset="UTF-8"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Forgetting the Viewport Meta Tag
&lt;/h2&gt;

&lt;p&gt;Has it ever happened to you? Your page zooms awkwardly when users double-tap on mobile; Thats because you're missing the viewport meta tag. Without it, your site isn't truly responsive, regardless of your CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add this to your&lt;/strong&gt; &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; &lt;strong&gt;section&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Skipping Open Graph Meta Tags
&lt;/h2&gt;

&lt;p&gt;Ever shared your blog on LinkedIn, Twitter, or Facebook only to see a bare URL with no preview card? That's because Open Graph tags are missing. These tags control how your content appears when shared on social media.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add these OG tags for rich sharing previews:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta property="og:title" content="My Blog Title"&amp;gt;
&amp;lt;meta property="og:description" content="A quick guide to avoiding HTML gotchas."&amp;gt;
&amp;lt;meta property="og:image" content="https://example.com/preview.png"&amp;gt;
&amp;lt;meta property="og:url" content="https://example.com/blog"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Also consider adding Twitter Card tags for optimal Twitter/X previews.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Ignoring Content Security Policy
&lt;/h2&gt;

&lt;p&gt;Content Security Policy (CSP) helps prevent cross-site scripting (XSS) attacks and other code injection vulnerabilities. It tells browsers which scripts, styles, and resources are allowed to run on your page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with a basic CSP meta tag:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline';"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is a starting point. Adjust the policy based on your specific needs and third-party resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Improper Nesting of Elements
&lt;/h2&gt;

&lt;p&gt;Browsers are forgiving, but invalid HTML nesting leads to unpredictable rendering and can break JavaScript that relies on the DOM structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common nesting mistakes:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- Inline elements shouldn't contain block elements --&amp;gt;
&amp;lt;span&amp;gt;&amp;lt;div&amp;gt;Wrong!&amp;lt;/div&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;!-- Paragraphs can't contain divs --&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;div&amp;gt;Also wrong!&amp;lt;/div&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Follow these nesting rules:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Inline elements (&lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;strong&amp;gt;&lt;/code&gt;) should &lt;strong&gt;never&lt;/strong&gt; contain block-level elements (&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; Tags should only wrap inline content, never block-level elements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When in doubt, check the HTML specification for content models&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These six HTML gotchas might seem minor, but they're the difference between a professional website and one that breaks in subtle, embarrassing ways. Take five minutes to audit your HTML templatesyour future self (and your users) will thank you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick checklist for your next project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DOCTYPE declaration at the top&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;UTF-8 character encoding&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Viewport meta tag for mobile&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Graph tags for social sharing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basic Content Security Policy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Valid HTML nesting&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember: browsers are forgiving, but that doesn't mean we should be sloppy. Clean HTML is the foundation of a reliable web experience.&lt;/p&gt;

&lt;p&gt;Thats all, folks! I hope you found this helpful. If you enjoyed this, check out more articles on my Blog, &lt;a href="https://blog.nandan.dev/" rel="noopener noreferrer"&gt;https://blog.nandan.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to comment, email me at &lt;a href="http://mailto:connect@nandan.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;connect@nandan.dev&lt;/strong&gt;&lt;/a&gt;, or connect with me on Twitter, Instagram, or GitHub. Dont forget to subscribe to my newsletter for regular updates on JavaScript topics!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/_sirius93_" rel="noopener noreferrer"&gt;&lt;strong&gt;Twitter&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://www.instagram.com/nandandotdev" rel="noopener noreferrer"&gt;&lt;strong&gt;Instagram&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://github.com/sirius93" rel="noopener noreferrer"&gt;&lt;strong&gt;Github&lt;/strong&gt;&lt;/a&gt; | &lt;a href="https://nandan.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;Website&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>metatags</category>
      <category>gotchas</category>
    </item>
  </channel>
</rss>
