<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anand on Medium]]></title>
        <description><![CDATA[Stories by Anand on Medium]]></description>
        <link>https://medium.com/@anand_14490?source=rss-fb36181dc394------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Anand on Medium</title>
            <link>https://medium.com/@anand_14490?source=rss-fb36181dc394------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:59:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anand_14490/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Got 100 Users in 48 Days (Solo Founder, $500 Ad Spend, 5% Conversion)]]></title>
            <link>https://medium.com/@anand_14490/how-i-got-100-users-in-48-days-solo-founder-500-ad-spend-5-conversion-db638da144a0?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/db638da144a0</guid>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 17:31:57 GMT</pubDate>
            <atom:updated>2026-01-30T17:34:04.777Z</atom:updated>
            <content:encoded><![CDATA[<p>48 days ago, I launched <a href="https://jo4.io/">jo4.io</a> — a URL shortener with analytics, bio pages, and custom domains. Today, I hit 100 users with 5 of them paying customers.</p><p>That’s a 5% conversion rate. In a market dominated by Bitly, TinyURL, and a dozen other established players.</p><p>Here’s the raw, unfiltered story of what worked, what spectacularly failed, and what I’d do differently.</p><h3>The Numbers</h3><p>Not life-changing money. But proof that strangers will pay for something I built.</p><h3>What Worked: Google (Paid + Organic)</h3><p>The screenshot below is from this morning. Search “url shortener” on Google:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*30EI2eZkTLC817IZisfz_w.png" /><figcaption>jo4.io appearing as sponsored result on Google</figcaption></figure><p><strong>jo4.io is right there at the top.</strong> Above shorturl.at. Above TinyURL. Above Bitly.</p><p>For $500 in ad spend over 48 days (~$10/day), I’m competing with companies that have been around for 15+ years.</p><h3>Why Google Ads Worked</h3><ol><li><strong>High intent traffic</strong> — People searching “url shortener” want to shorten a URL <em>right now</em></li><li><strong>Direct competition</strong> — My ad copy directly addresses what users want: “Simple, fast, developer-friendly”</li><li><strong>Free tier available</strong> — Low friction to try, high chance to convert later</li></ol><p>Organic search is starting to pick up too. Blog posts about technical problems I’ve solved while building jo4 are ranking for long-tail keywords.</p><h3>What Absolutely Did Not Work: Reddit</h3><p>I tried both paid Reddit ads and organic posts.</p><p><strong>The results were brutal:</strong></p><ul><li>Paid ads: ~$50 spent, 2 clicks, 0 signups</li><li>Organic posts: Either ignored or downvoted into oblivion</li></ul><p>Reddit has this allergic reaction to anything that smells like self-promotion. Even genuinely helpful posts get flagged. The community is fantastic for learning, terrible for customer acquisition.</p><p>If you’re a solo founder, skip Reddit ads. The targeting is weak, the audience is hostile to marketing, and your money evaporates.</p><h3>The Struggles (There Were Many)</h3><p>Building in public means sharing the painful parts too. Here’s what almost broke me:</p><h3>Week 1–3: Zero Paying Users</h3><p>The first three weeks were brutal. Users signed up, created a few links, and… nothing. No upgrades. No feedback. Just silence.</p><p>I kept asking myself: <em>Is this thing even useful? Should I just quit?</em></p><h3>The Self-Inflicted DDoS</h3><p>I accidentally took down my own service. My rate limiting code had a bug — when Redis failed, instead of allowing requests through, it blocked EVERYONE:</p><p>Every API call returned “Rate limit exceeded: 0 requests/minute.” My users couldn’t shorten a single URL.</p><p>The fix was one line: return true; - fail open, not closed.</p><h3>Bot Scanners Filling My Logs</h3><p>Within hours of going live, my server was getting hammered with requests for wp-admin, index.php, and phpmyadmin. Bots scanning for WordPress vulnerabilities on a Java server.</p><p>Completely harmless, but the log noise was insane. 12,000+ PHP exploit attempts in the first month.</p><h3>Stripe Webhooks Returning Empty Objects</h3><p>Payments started coming in, but my webhook handler couldn’t read them. The Stripe SDK silently returned empty objects when the API version didn’t match.</p><p>The “fix” was using deserializeUnsafe() - a method name that inspires zero confidence. But it works.</p><h3>The Feature Sprint</h3><p>To compete with Bitly and TinyURL, I needed feature parity. In 48 days, I shipped:</p><ul><li>Click analytics with geo/device/referrer tracking</li><li>Custom short URLs</li><li>Bio pages (like Linktree)</li><li>QR code generation</li><li>REST API with documentation</li><li>Custom domains</li><li>Password-protected links</li><li>Link expiration</li><li>Team workspaces</li><li>Chrome extension</li><li>Mobile app (React Native)</li></ul><p>Each feature was a mini-marathon. Some took 2 hours. Some took 2 days. All of them had bugs that showed up in production.</p><h3>The Mindset That Kept Me Going</h3><h3>“Ship today, fix tomorrow”</h3><p>Perfection is the enemy of progress. I shipped features with known bugs, then fixed them based on actual user feedback.</p><h3>“One paying customer proves the model”</h3><p>The first $16 payment felt better than any salary I’ve ever received. A stranger decided my creation was worth their money. That’s validation no amount of user signups can match.</p><h3>“Compete on speed, not features”</h3><p>Bitly has 100 engineers. I have Claude Code and caffeine. I can’t out-feature them, but I can ship faster and be more responsive to individual users.</p><h3>What Users Actually Said</h3><p>A few messages that kept me going:</p><blockquote><em>“Finally, a URL shortener that doesn’t feel like it was designed in 2010.”</em></blockquote><blockquote><em>“The analytics are exactly what I needed. Switched from Bitly.”</em></blockquote><blockquote><em>“Your API documentation is better than services 10x your size.”</em></blockquote><p>These weren’t solicited testimonials. Just random messages from users who took the time to write.</p><h3>The Pricing That Converts</h3><p>The free tier is generous enough to be useful. The Pro tier is cheap enough to be a no-brainer for anyone who hits the limit.</p><p>5% conversion on a freemium model is solid. Industry average is 2–3%.</p><h3>What I’d Do Differently</h3><p><strong>Hire (or find) someone for marketing/sales/GTM.</strong></p><p>I’m a developer. I can build products all day. But social media? Networking? Sales calls? I’d rather debug a race condition.</p><p>The biggest bottleneck isn’t the product. It’s distribution. Finding someone who actually enjoys the go-to-market grind would 10x the growth.</p><h3>The Road to 1,000</h3><p>100 users in 48 days. Can I 10x in the next 100 days?</p><p>The playbook:</p><ol><li><strong>Double down on Google Ads</strong> — It’s working. Scale it.</li><li><strong>SEO content</strong> — Technical blog posts that rank</li><li><strong>Integrations</strong> — Zapier, Make, Chrome extension are already live</li><li><strong>Word of mouth</strong> — Happy users bring more users</li></ol><p>If you’re building a SaaS and drowning in the same struggles, know this: <strong>it gets easier once you have paying customers.</strong> That first dollar changes everything.</p><p><strong>What’s your user acquisition story?</strong> I’d love to hear what worked (or didn’t) in the comments.</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — URL shortener with analytics for creators and marketers. 100 users and counting.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/how-i-got-100-users-in-48-days-solo-founder-500-ad-spend-5-conversion-3okf"><em>https://dev.to</em></a><em> on January 30, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db638da144a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Hype: Balancing AI Innovation with Architectural Integrity]]></title>
            <link>https://medium.com/@anand_14490/beyond-the-hype-balancing-ai-innovation-with-architectural-integrity-535e273d7cce?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/535e273d7cce</guid>
            <category><![CDATA[discussion]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Wed, 14 Jan 2026 09:44:58 GMT</pubDate>
            <atom:updated>2026-01-14T09:45:20.227Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*jGxGwY1N1OIWGYTD.png" /></figure><p>The tech world is currently split into two camps: the “AI-first” enthusiasts who believe prompt engineering can solve almost any problem, and the “Traditionalist” architects who view LLMs as unpredictable liabilities. However, reality exists in the middle. While prompt engineering is a powerful new interface, it cannot compensate for a crumbling structural foundation.</p><p>To build production-ready AI applications, we must find the balance between <strong>rapid LLM integration</strong> and <strong>principled system design</strong>.</p><h3>1. Prompting as an Interface, Not a Database</h3><p>The common pitfall is treating a system prompt as the “source of truth” for business logic.</p><ul><li><strong>The Risk:</strong> When you embed complex business rules (e.g., “Only discount items for users in the EU if they have a loyalty score over 50”) inside a prompt, you create <strong>“Hidden Logic.”</strong> This logic is hard to version control, impossible to unit test reliably, and expensive to process every time the LLM runs.</li><li><strong>The Balanced Approach:</strong> Treat the LLM as a <strong>translator</strong>. The business logic should live in your code or database. The prompt’s job is simply to help the user interact with that logic using natural language.</li></ul><h3>2. The “Predictability Gap”</h3><p>The most frequent complaint about AI is its non-determinism (the same input yielding different results).</p><ul><li><strong>The Reality:</strong> No amount of “clever prompting” can make an LLM 100% predictable. However, a solid architecture can <strong>contain the chaos.</strong> * <strong>The Solution:</strong> Use the “LLM Sandwich” pattern.</li><li><strong>Strict Input:</strong> Use code to validate and sanitize user data before it hits the AI.</li><li><strong>AI Synthesis:</strong> Let the LLM process the request.</li><li><strong>Strict Output:</strong> Use tools like TypeChat or Pydantic to force the AI to return structured data (JSON), then validate that JSON against your system’s actual constraints.</li></ul><h3>3. Prompt Engineering as a Prototyping Tool</h3><p>Critics often dismiss prompt engineering as “unreal” engineering. In reality, it is perhaps the greatest <strong>prototyping tool</strong> ever created.</p><ul><li><strong>Efficiency:</strong> It is far faster to test a feature idea by describing it in a prompt than by building a full backend service.</li><li><strong>The Pivot:</strong> The goal should be to “graduate” logic out of the prompt. If a specific prompt-based instruction becomes a core part of your business, move that logic into a dedicated microservice or a hard-coded validation layer.</li></ul><h3>4. Designing for Failure (Graceful Degradation)</h3><p>Traditional architecture is built on the assumption that components will eventually fail. AI architecture must be built on the assumption that the component will eventually <strong>lie</strong>.</p><h3>Conclusion: The Symbiotic Future</h3><p>Prompt engineering and system architecture are not rivals; they are partners. Prompting provides the <strong>flexibility</strong> to handle the messy reality of human language, while architecture provides the <strong>rigor</strong> to ensure that language translates into safe, reliable actions.</p><p>Building a great AI product isn’t about choosing between “magic” and “math”-it’s about using math to build a stage where the magic can actually perform without falling through the floorboards.</p><p><strong>Would you like me to create a checklist for auditing whether a feature should be handled by a prompt or by traditional code?</strong> <br> Building <a href="https://jo4.io/">jo4.io</a> — a URL shortener with analytics and white-labeling.</p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/beyond-the-hype-balancing-ai-innovation-with-architectural-integrity-575n"><em>https://dev.to</em></a><em> on January 14, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=535e273d7cce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turning a 2013 Dell E6540 into a Dedicated TV Media Controller]]></title>
            <link>https://medium.com/@anand_14490/turning-a-2013-dell-e6540-into-a-dedicated-tv-media-controller-64a48c4522f5?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/64a48c4522f5</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[dell]]></category>
            <category><![CDATA[laptop]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tv]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Sun, 11 Jan 2026 21:32:06 GMT</pubDate>
            <atom:updated>2026-01-11T21:41:12.280Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*kEFkpOFL8pEDKLyT.png" /></figure><p><strong>TL;DR</strong>: I spent 12+ hours fighting Ubuntu 24.04’s layered squashfs, hidden welcome wizards, and Chrome sandbox crashes to create a turnkey live USB for my old Dell E6540 laptop. Here’s everything I learned so you don’t have to.</p><h3>The Setup</h3><p>I have a Dell Latitude E6540 (circa 2013) collecting dust. I also have a TV that needs a dedicated browser for streaming. The plan: create a custom Ubuntu live USB that boots directly into Chrome, no setup wizards, no login screens, just plug and play.</p><p>Hardware:</p><h3>The Journey (aka What Went Wrong)</h3><h3>1. Ubuntu 24.04’s Layered Squashfs</h3><p><strong>The Problem</strong>: Ubuntu 24.04 doesn’t use a single filesystem.squashfs anymore. It uses a layered system:</p><pre>casper/ ├── minimal.squashfs # Base layer ├── minimal.standard.squashfs # Standard additions └── minimal.standard.live.squashfs # Live environment customizations</pre><p><strong>What I Tried</strong>: Merging all layers into one filesystem.squashfs.</p><p><strong>What Happened</strong>: Boot failure — “File system layers are missing”</p><p><strong>The Fix</strong>: Keep ALL layers intact. Only modify the specific layer containing what you need to change. Casper expects the layered structure.</p><p><strong>Reference</strong>: <a href="https://manpages.ubuntu.com/manpages/noble/man7/casper.7.html">Ubuntu Casper Manual</a></p><h3>2. Finding gnome-initial-setup</h3><p><strong>The Problem</strong>: The GNOME initial setup wizard kept appearing on boot. I needed to remove it.</p><p><strong>What I Tried</strong>: Searching and removing from the top layer only.</p><p><strong>What Happened</strong>: Still appeared. The binary wasn’t in the top layer.</p><p><strong>The Fix</strong>: Search ALL layers using unsquashfs -l (list mode - fast!) instead of extracting:</p><p><strong>Lesson</strong>: gnome-initial-setup lives in minimal.squashfs (the base layer).</p><h3>3. The “Welcome to Ubuntu” Imposter</h3><p><strong>The Problem</strong>: After removing gnome-initial-setup, a “Welcome to Ubuntu” wizard STILL appeared.</p><p><strong>What I Tried</strong>: Removing more gnome-initial-setup files, masking systemd services, creating done files.</p><p><strong>What Happened</strong>: Still appeared. Different icon, different behavior.</p><p><strong>The Fix</strong>: It’s NOT gnome-initial-setup. It’s ubuntu-desktop-bootstrap - a completely different snap package!</p><pre># Search for the REAL culprit unsquashfs -l layer.squashfs | grep -E &quot;ubuntu-desktop-bootstrap|desktop-bootstrap&quot;</pre><p><strong>Lesson</strong>: Don’t assume. Check the actual desktop shortcut or process name.</p><h3>4. Auto-Login Configuration</h3><p><strong>The Problem</strong>: System landed on login screen instead of auto-logging in.</p><p><strong>The Fix</strong>: Configure GDM properly in the squashfs:</p><h3>5. Chrome Crashes on Live USB</h3><p><strong>The Problem</strong>: Chrome installed fine but crashed immediately on launch. Error reporter appeared.</p><p><strong>What I Tried</strong>: Adding --disable-gpu (wrong assumption about nomodeset).</p><p><strong>The Real Problem</strong>: Chrome’s sandbox doesn’t play nice with overlayfs (used by live USB environments).</p><p><strong>Note</strong>: --no-sandbox reduces security but is necessary for live USB environments.</p><h3>6. pactl: command not found</h3><p><strong>The Problem</strong>: Script failed with pactl: command not found on Ubuntu 24.04 live environment.</p><p><strong>Why</strong>: Ubuntu 24.04 uses PipeWire, and pactl (PulseAudio control) may not be available in the minimal live environment.</p><p><strong>The Fix</strong>: Check before using:</p><h3>7. Slow USB Write on macOS</h3><p><strong>The Problem</strong>: Writing 6GB ISO took 1085 seconds (~18 minutes).</p><p><strong>The Fix</strong>: Use raw device /dev/rdisk instead of /dev/disk:</p><p><strong>Why</strong>: /dev/rdisk bypasses macOS&#39;s buffer cache, giving ~10x faster writes.</p><h3>8. EFI Partition Extraction</h3><p><strong>The Problem</strong>: Custom ISO wouldn’t boot on UEFI systems.</p><p><strong>The Fix</strong>: Extract and preserve the original EFI partition:</p><h3>The Final Solution</h3><p>I built a Docker-based tool that:</p><ol><li>Downloads Ubuntu 24.04 desktop ISO</li><li>Extracts and modifies the layered squashfs</li><li>Removes ALL welcome wizards (gnome-initial-setup, gnome-tour, ubuntu-desktop-bootstrap)</li><li>Configures auto-login</li><li>Pre-installs wallpapers, Chrome policies, dark mode</li><li>Rebuilds a bootable hybrid ISO (BIOS + UEFI)</li><li>Writes to USB with one command</li></ol><pre>./make.sh # Does everything: clean, build, write to USB</pre><h3>Use It Yourself</h3><p>If you have a Dell E6540 (or similar older laptop) and want a dedicated TV/media controller:</p><p><strong>GitHub</strong>: <a href="https://github.com/tv6540/cubic2">github.com/tv6540/cubic2</a> <em>(replace with actual repo URL)</em></p><p><strong>Requirements</strong>:</p><pre>git clone https://github.com/tv6540/cubic2 cd cubic2 ./make.sh</pre><p>The script will:</p><ol><li>Prompt for sudo (kept alive during build)</li><li>Show USB device picker</li><li>Confirm before erasing</li><li>Download Ubuntu ISO (cached for future builds)</li><li>Build custom ISO in Docker</li><li>Write to USB</li></ol><p>Boot the USB, and the setup script runs automatically to configure display, install Chrome, and you’re ready to stream.</p><h3>Key Takeaways</h3><ol><li><strong>Ubuntu 24.04 uses layered squashfs</strong> — don’t merge them, modify in place</li><li><strong>unsquashfs -l is your friend</strong> - list files without extracting (fast!)</li><li><strong>ubuntu-desktop-bootstrap != gnome-initial-setup</strong> — check process names</li><li><strong>Chrome needs </strong><strong>--no-sandbox on live USB</strong> - overlayfs breaks the sandbox</li><li><strong>Use </strong><strong>/dev/rdisk on macOS</strong> - 10x faster USB writes</li><li><strong>Get all prompts upfront</strong> — nobody wants to wait 20 min then type “yes”</li></ol><h3>Hardware Recommendation</h3><p>The <a href="https://a.co/d/2OPBlTy">Logitech K400 Plus</a> is perfect for this setup:</p><ul><li>Wireless with tiny USB receiver</li><li>Built-in trackpad</li><li>Media keys</li><li>Long battery life</li><li>Compact for couch use</li></ul><p><em>Built with mass frustration, mass trial-and-error, and mass caffeine.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/turning-a-2013-dell-e6540-into-a-dedicated-tv-media-controller-4pmi"><em>https://dev.to</em></a><em> on January 11, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64a48c4522f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Claude Code Helped Me Migrate from AWS to DigitalOcean in 4 Hours (With Live Traffic)]]></title>
            <link>https://medium.com/@anand_14490/how-claude-code-helped-me-migrate-from-aws-to-digitalocean-in-4-hours-with-live-traffic-c1d50c1dc1d7?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1d50c1dc1d7</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[digitalocean]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-migration]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 01:19:42 GMT</pubDate>
            <atom:updated>2026-01-08T01:22:37.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*RvqNuO6-IgieDoOd.png" /></figure><p>At 6 AM this morning, my SaaS was running on AWS. By 10 AM, it was fully migrated to DigitalOcean with zero downtime. The entire migration-infrastructure provisioning, database seeding, SSL setup, DNS cutover, and debugging production issues-was done with Claude Code as my pair programmer.</p><p>This is the story of how AI is changing the cloud provider landscape, and why AWS’s moat might not be as deep as they think.</p><h3>The Problem: $120/month for a Side Project + some unknown $s based on traffic</h3><p>My URL shortener <a href="https://jo4.io/">jo4.io</a> was running on AWS with a fairly standard setup:</p><p><strong>Total: ~$120/month</strong> for a side project that gets maybe 1000 requests/day + some unknown $s based on traffic.</p><p>DigitalOcean equivalent:</p><p><strong>Total: ~$44/month</strong> — a 63% cost reduction.</p><h3>The Old Way: Weeks of Planning</h3><p>Traditionally, a migration like this would require:</p><ol><li><strong>Week 1–2</strong>: Document existing infrastructure, create migration plan</li><li><strong>Week 3</strong>: Set up new infrastructure manually or write Terraform</li><li><strong>Week 4</strong>: Test, fix issues, test again</li><li><strong>Week 5</strong>: Migration weekend with planned downtime</li><li><strong>Week 6</strong>: Monitor and fix post-migration issues</li></ol><p>I’ve done migrations like this before. They’re painful, error-prone, and time-consuming.</p><h3>The Claude Code Way: 4 Hours, Zero Downtime</h3><p>Here’s what actually happened:</p><h3>Hour 1: Infrastructure Setup (6:00–7:00 AM)</h3><p>I told Claude: <em>“I want to migrate from AWS to DigitalOcean. Create GitHub Actions workflows to bootstrap the infrastructure.”</em></p><p>Claude generated:</p><ul><li>DigitalOcean-410-init.yml - Initialize DO project and Spaces</li><li>DigitalOcean-420-bootstrap.yml - Create droplet and managed PostgreSQL</li><li>DigitalOcean-430-apply.yml - Configure droplet with Docker, env vars, and deploy scripts</li></ul><p>But here’s where it gets interesting. The first run failed with:</p><pre>psql: error: connection to server failed: sslmode value &quot;sslmode=require&quot; invalid</pre><p>Claude caught the issue immediately- sslmode=require was being passed as a positional argument instead of using PGSSLMODE=require environment variable. It fixed the workflow and explained why.</p><h3>Hour 2: Database Migration (7:00–8:00 AM)</h3><p>The database dump from AWS had jo4admin as the owner (my RDS master user). DigitalOcean&#39;s managed PostgreSQL uses doadmin.</p><p>The first seed attempt failed with 50+ errors:</p><pre>psql:/tmp/seed.sql:29: ERROR: role &quot;jo4admin&quot; does not exist</pre><p>Claude immediately added a fix to the seed workflow:</p><pre>- name : Fix Owner References run : | # Replace jo4admin with doadmin (AWS user -&gt; DO user) sed -i &#39;s/jo4admin/doadmin/g&#39; /tmp/seed.sql # Remove unsupported settings sed -i &#39;/SET transaction_timeout/d&#39; /tmp/seed.sql</pre><p>29 tables, 3000+ rows, migrated cleanly.</p><h3>Hour 3: SSL and nginx (8:00–9:00 AM)</h3><p>This is where things got tricky. Cloudflare was returning 521 errors because:</p><ol><li>Cloudflare’s “Full” SSL mode requires the origin server to have valid SSL on port 443</li><li>My droplet only had nginx listening on port 80</li></ol><p>Claude generated DigitalOcean-450-ssl.yml that:</p><ul><li>Creates Cloudflare Origin Certificates via API</li><li>Deploys them to the droplet</li><li>Configures nginx with SSL for both frontend and API</li><li>Sets up proper firewall rules</li></ul><p>But then we hit another issue-SPA routing was broken. /admin/users returned a 403 from DO Spaces.</p><h3>Hour 4: The SPA Routing Bug (9:00–10:00 AM)</h3><p>The nginx config looked correct:</p><p>But requests to /admin/users were being proxied to:</p><pre>https://jo4-assets.nyc3.digitaloceanspaces.com/client/index.html/admin/users</pre><p>nginx was appending the request URI to the proxy path! The fix:</p><p>By forcing a rewrite before the proxy, all SPA routes correctly serve index.html.</p><h3>What Made This Possible</h3><h3>1. Claude Knows the Docs</h3><p>When I questioned whether a doctl command was correct, Claude verified it against the official DigitalOcean documentation. No more Stack Overflow archaeology.</p><h3>2. Iterative Debugging</h3><p>Each failed workflow run, Claude would:</p><ol><li>Read the logs via gh run view</li><li>Identify the root cause</li><li>Propose a fix with explanation</li><li>Update the workflow</li></ol><p>This tight feedback loop is faster than any human could reasonably debug.</p><h3>3. Cross-Domain Knowledge</h3><p>The migration touched:</p><ul><li>GitHub Actions YAML</li><li>Bash scripting</li><li>PostgreSQL administration</li><li>nginx configuration</li><li>Cloudflare API</li><li>Docker Compose</li><li>Vite/React builds</li><li>Spring Boot environment variables</li></ul><p>Claude handled all of these without context switching or documentation lookups.</p><h3>4. Catching Subtle Bugs</h3><p>The frontend was calling localhost:8080 instead of the production API. Why? The workflow was setting VITE_API_URL but the codebase used VITE_API_BASE. A one-word difference that would have taken hours to debug manually.</p><h3>The AWS Moat is Shrinking</h3><p>AWS has historically maintained its dominance through:</p><ol><li><strong>Complexity as a moat</strong> — Hard to leave once you’re deeply integrated</li><li><strong>Tribal knowledge</strong> — Years of experience with AWS-specific patterns</li><li><strong>Documentation depth</strong> — Knowing where to find the right docs</li><li><strong>Migration fear</strong> — “What if something breaks?”</li></ol><p>AI changes all of this:</p><ul><li><strong>Complexity becomes navigable</strong> — Claude can handle multi-service architectures</li><li><strong>Tribal knowledge is democratized</strong> — The AI has read all the docs</li><li><strong>Documentation is searchable</strong> — Ask and receive</li><li><strong>Migration becomes iterative</strong> — Fix issues in real-time, not post-mortems</li></ul><h3>The Numbers</h3><h3>What I Learned</h3><ol><li><strong>Don’t fear the migration</strong> — With AI assistance, changing cloud providers is no longer a multi-week project.</li><li><strong>Verify variable names</strong> — The VITE_API_URL vs VITE_API_BASE bug cost 20 minutes. Always check that env var names match what your code expects.</li><li><strong>nginx proxy_pass is tricky</strong> — If your proxy_pass has a URI, nginx will replace the matched location. Use rewrite for SPA fallbacks.</li><li><strong>Managed databases have different users</strong> — jo4admin (AWS) vs doadmin (DO). Always check owner references in dumps.</li><li><strong>Export env vars explicitly</strong> — Don’t rely on Vite’s mode loading. export VITE_API_BASE=... before build is bulletproof.</li></ol><h3>The Future</h3><p>AWS isn’t going anywhere, and for complex enterprise workloads, it’s still the right choice. But for startups, side projects, and cost-conscious teams?</p><p>The switching cost just dropped from “months of planning” to “a Saturday morning.”</p><p>And that changes everything.</p><p><strong>Have you done a cloud migration with AI assistance?</strong> I’d love to hear your experience in the comments!</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — a URL shortener with analytics. Now running on DigitalOcean thanks to Claude.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/how-claude-code-helped-me-migrate-from-aws-to-digitalocean-in-4-hours-with-live-traffic-hmg"><em>https://dev.to</em></a><em> on January 8, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1d50c1dc1d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Caching API Responses at the Edge with Cloudflare Cache Rules]]></title>
            <link>https://medium.com/@anand_14490/caching-api-responses-at-the-edge-with-cloudflare-cache-rules-ab9e2f5f0950?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab9e2f5f0950</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[saas]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 07:12:04 GMT</pubDate>
            <atom:updated>2026-01-05T07:12:25.308Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*gkzsQG8HrQKsLXdP.png" /></figure><p>Your API is getting hammered. Same endpoints, same responses, thousands of requests. Your origin server is sweating. Here’s how I used Cloudflare Cache Rules to serve API responses from the edge-no code changes required.</p><h3>The Problem</h3><p>I run a URL shortener. The redirect API (/api/v1/public/a/{shortUrl}) returns JSON with the destination URL, and the frontend handles the redirect. Popular links get hit thousands of times a day.</p><p>The thing is-the response rarely changes. A short URL pointing to https://example.com will point there for days, weeks, months. Why hit the origin every single time?</p><h3>Why Not Just Use Cache-Control Headers?</h3><p>You could add Cache-Control: public, max-age=3600 in your backend code. But:</p><ol><li><strong>Code changes</strong> = deployments, testing, potential bugs</li><li><strong>Cloudflare doesn’t cache API responses by default</strong> (even with headers)</li><li><strong>Less flexibility</strong>-TTLs are baked into code</li></ol><p>Cache Rules let you handle this entirely at the infrastructure layer.</p><h3>The Setup</h3><p><strong>Cloudflare Dashboard → Caching → Cache Rules → Create Rule</strong></p><h3>The Expression</h3><pre>(http.request.uri.path contains &quot;/api/v1/public/a/&quot; and not any(http.request.headers[&quot;jo4_url_pwd&quot;][*] ne &quot;&quot;))</pre><p>This matches:</p><ul><li>Requests to the short URL API</li><li>AND excludes requests with a password header (for protected URLs)</li></ul><p>Why exclude password-protected URLs? If you cache them, anyone hitting that URL gets the cached response-including the destination. Security hole.</p><h3>The Cache Settings</h3><h3>Why Staggered TTLs?</h3><p>The 1hr browser + 2hr edge combo is intentional:</p><ul><li><strong>0–1hr</strong>: Browser serves from local cache (instant, zero network)</li><li><strong>1–2hr</strong>: Browser cache expired, but Cloudflare edge still has it (fast, no origin)</li><li><strong>2hr+</strong>: Both expired, request hits origin (fresh data)</li></ul><p>This maximizes cache hits while keeping staleness reasonable.</p><h3>What About Analytics?</h3><p>Here’s the tradeoff: if Cloudflare serves a cached response, your origin never sees the request. No analytics recorded.</p><p>For my use case, this is fine. I care about unique visitors, not repeat hits from the same client. The first request hits origin (analytics recorded), subsequent requests get cached.</p><p>If you need accurate hit counts:</p><ol><li>Use a shorter TTL (15–30 minutes)</li><li>Implement client-side analytics beacons</li><li>Or just don’t cache-sometimes origin load is acceptable</li></ol><h3>The Visual Builder</h3><p>If you prefer clicking over typing expressions:</p><p><strong>When incoming requests match…</strong></p><p>Actually, for “header not present”, the expression editor is easier. The visual builder’s equals empty works but the expression not any(http.request.headers[&quot;header&quot;][*] ne &quot;&quot;) is cleaner.</p><h3>Cache Invalidation</h3><p>What if a URL changes? Two options:</p><pre>curl -X POST &quot;https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache&quot; \ -H &quot;Authorization: Bearer {api_token}&quot; \ -H &quot;Content-Type: application/json&quot; \ --data &#39;{&quot;files&quot;:[&quot;https://yourdomain.com/api/v1/public/a/abc123&quot;]}&#39;</pre><p>For most use cases, just pick a TTL you can live with and skip the invalidation complexity.</p><h3>Bonus: Serve Stale While Revalidating</h3><p>Enable <strong>“Serve stale content while revalidating”</strong> in your cache rule. When cache expires:</p><ol><li>Cloudflare immediately serves the stale cached response</li><li>Simultaneously fetches fresh content from origin</li><li>Next request gets the fresh version</li></ol><p>Users never wait for origin. Cache stays warm.</p><h3>Results</h3><p>Before: Every request hit origin. Popular URLs caused load spikes.</p><p>After: ~90% of repeat requests served from edge. Origin load dropped significantly. Response times for cached requests: &lt;50ms globally (served from nearest Cloudflare POP).</p><h3>Lessons Learned</h3><ol><li><strong>Cloudflare doesn’t cache API responses by default</strong>-you need Cache Rules to enable it</li><li><strong>Exclude sensitive requests</strong>-use expressions to skip password-protected or authenticated endpoints</li><li><strong>Stagger your TTLs</strong>-browser TTL &lt; edge TTL gives you layered caching</li><li><strong>Accept the analytics tradeoff</strong>-or implement client-side tracking</li><li><strong>Skip invalidation if you can</strong>-pick a TTL you can live with, it’s simpler</li><li><strong>Zero code changes</strong>-this is purely infrastructure config</li></ol><p><strong>Have questions about edge caching?</strong> Drop a comment below.</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — URL shortener with analytics, bio pages, and team workspaces.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/caching-api-responses-at-the-edge-with-cloudflare-cache-rules-fk2"><em>https://dev.to</em></a><em> on January 5, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab9e2f5f0950" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Per-Seat Team Billing with Stripe]]></title>
            <link>https://medium.com/@anand_14490/implementing-per-seat-team-billing-with-stripe-7af55422a1b1?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/7af55422a1b1</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[billing]]></category>
            <category><![CDATA[stripe]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 06:29:01 GMT</pubDate>
            <atom:updated>2026-01-05T06:30:27.156Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*NO3Nsqypl3b_zo-s.png" /></figure><p>Adding team plans to a SaaS is tricky. You need per-seat pricing, plan upgrades/downgrades, webhook handling, and graceful degradation when payments fail. Here’s how I built it.</p><h3>The Pricing Model</h3><p>We offer both individual and team plans:</p><pre>Free: $0/month - 30 URLs, 2 bio links, basic analytics <br>Pro: $16/month - 500 URLs, 10 bio links, custom domains <br>Pro Plus: $48/month - Unlimited everything, white-label, SSO</pre><pre>Team Pro: $10/seat/month - 1,000 URLs/seat, 10 team members max <br>Team Business: $20/seat/month - 2,000 URLs/seat, 50 team members, priority support</pre><p>Annual billing gets 2 months free (pay for 10, get 12). For example:</p><ul><li>Team Pro annual: $100/seat/year (saves $20/seat)</li><li>Team Business annual: $200/seat/year (saves $40/seat)</li></ul><h3>Stripe Product Setup</h3><p>In Stripe Dashboard, create products with monthly and yearly prices:</p><p>Store the price IDs in your config:</p><h3>Creating Checkout Sessions</h3><h3>The Seat Count Problem</h3><p>Users will try to downgrade seats below their member count:</p><p>If they have 5 team members but try to buy 3 seats, we auto-correct to 5. The UI should warn them first and prompt to remove members before downgrading.</p><h3>Handling Webhooks</h3><p>Stripe webhooks are the source of truth. Never trust client-side success callbacks.</p><h3>Checkout Completed</h3><h3>Payment Failed — Pause, Don’t Delete</h3><p>Why pause instead of downgrade immediately? Give users time to fix payment. Nobody wants to lose features because their card expired.</p><h3>Subscription Cancelled — Downgrade Gracefully</h3><h3>URL Limits Based on Seats</h3><p>Team URL limits scale with seat count:</p><p>When seats change via Stripe portal, the webhook updates the limit:</p><h3>Billing Portal Access</h3><p>Let users manage their subscription in Stripe’s portal:</p><h3>Email Notifications</h3><p>Payment failures need immediate user notification:</p><h3>Testing Webhooks Locally</h3><p>Use Stripe CLI:</p><pre>stripe listen --forward-to localhost:8080/api/v1/public/webhooks/stripe</pre><p>It gives you a webhook signing secret for local testing. Add it to your config:</p><h3>Lessons Learned</h3><ol><li><strong>Webhooks are truth</strong> — Don’t trust client-side success callbacks. Always verify state via webhooks.</li><li><strong>Pause, don’t punish</strong> — Give users time to fix payment issues before downgrading.</li><li><strong>Minimum seats = current members</strong> — Prevent invalid states where seats &lt; active members.</li><li><strong>Email on failures</strong> — Users need to know immediately when payment fails.</li><li><strong>Metadata is your friend</strong> — Store teamId and tier in Stripe subscription metadata for easy lookup.</li><li><strong>Test the cancellation flow</strong> — It’s the path most likely to have bugs. Test monthly/yearly, mid-cycle, end-of-cycle.</li><li><strong>Handle quantity changes</strong> — Users can change seat count in Stripe portal. Your webhook must handle it.</li></ol><p><strong>Building team billing?</strong> What edge cases have bitten you? Drop a comment below.</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — URL shortener with analytics, bio pages, and team workspaces.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/implementing-per-seat-team-billing-with-stripe-5fp5"><em>https://dev.to</em></a><em> on January 5, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7af55422a1b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Your @Async Method Ignores @Transactional (And Leaks Internal Errors)]]></title>
            <link>https://medium.com/@anand_14490/why-your-async-method-ignores-transactional-and-leaks-internal-errors-581f601418a4?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/581f601418a4</guid>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[transactional]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 08:13:19 GMT</pubDate>
            <atom:updated>2026-01-04T08:16:57.020Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*uKk9f5WH9fEB6pUm.png" /></figure><p>Production bug report: “Why does the webhook error say ‘Executing an update/delete query’?”</p><p>That’s a JPA internal error. It should never reach users. But there it was, stored in the database and visible in the admin panel. Here’s how an innocent-looking @Async method broke everything.</p><h3>The Code That Looked Fine</h3><p>The repository method:</p><p>Looks reasonable, right? @Async for background processing, @Transactional for database consistency, @Modifying for atomic updates.</p><h3>The Error</h3><pre>javax.persistence.TransactionRequiredException: Executing an update/delete query</pre><p>This was getting stored in the lastError field of webhook events. Users could see it. Security and UX nightmare.</p><h3>The Root Cause: Self-Invocation Bypasses Proxies</h3><p>Spring’s @Transactional works through proxies. When you call a @Transactional method, you&#39;re actually calling a proxy that:</p><ol><li>Starts a transaction</li><li>Calls your actual method</li><li>Commits or rolls back</li></ol><p>But here’s the catch: <strong>self-invocation bypasses the proxy</strong>.</p><p>When fireEvent() calls deliverWebhook(), it&#39;s calling this.deliverWebhook() - the actual method on the instance, not the Spring proxy. The @Transactional annotation is invisible.</p><p>The @Modifying query requires an active transaction. No transaction = exception.</p><h3>The Fix: TransactionTemplate</h3><p>When you can’t rely on @Transactional, use programmatic transaction management:</p><p>TransactionTemplate doesn&#39;t rely on proxies. It explicitly starts and commits transactions. Works everywhere, including:</p><ul><li>Self-invoked methods</li><li>@Async methods</li><li>Lambda callbacks</li><li>Anywhere proxy magic fails</li></ul><h3>Bonus: Sanitize Your Error Messages</h3><p>Even after fixing the transaction issue, you should never leak internal errors to users. Add a sanitizer:</p><p>Now even if something slips through, users see “Internal server error” instead of stack traces.</p><h3>Testing TransactionTemplate</h3><p>When mocking, configure the template to execute the lambda:</p><h3>Alternative Approaches</h3><h3>1. Inject Self Reference</h3><p>Works, but feels hacky.</p><h3>2. Separate Into Two Services</h3><p>Cleaner separation, but more classes.</p><h3>3. TransactionTemplate (My Choice)</h3><p>Explicit, works everywhere, no magic, easy to test. This is what I went with.</p><h3>The Rules</h3><ol><li><strong>@Transactional doesn’t work on self-invocation</strong> — Calling this.method() bypasses the proxy</li><li><a href="https://dev.to/async"><strong>@async</strong></a><strong> runs in a new thread</strong> — No inherited transaction context</li><li><strong>@Modifying needs a transaction</strong> — Always, no exceptions</li><li><strong>Never leak internal errors</strong> — Sanitize before storing/displaying</li><li><strong>TransactionTemplate is your friend</strong> — When proxy magic fails, go explicit</li></ol><h3>The Debugging Checklist</h3><p>When you see TransactionRequiredException:</p><ol><li>Is the method called from the same class? (self-invocation)</li><li>Is the caller @Async? (new thread, no transaction)</li><li>Is the method private? (proxies can’t intercept)</li><li>Is the class final? (no proxy possible)</li></ol><p>Any of these = @Transactional won&#39;t work. Use TransactionTemplate.</p><p><strong>Ever been bitten by Spring proxy magic?</strong> What’s your go-to solution for transaction issues in async code?</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — a URL shortener that actually handles webhooks reliably.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/why-your-async-method-ignores-transactional-and-leaks-internal-errors-hnc"><em>https://dev.to</em></a><em> on January 4, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=581f601418a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Auth0 email_verified Was Missing from My Access Token (And How to Fix It)]]></title>
            <link>https://medium.com/@anand_14490/why-auth0-email-verified-was-missing-from-my-access-token-and-how-to-fix-it-946ebb289353?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/946ebb289353</guid>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[auth0]]></category>
            <category><![CDATA[spring-security]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Sat, 03 Jan 2026 07:22:21 GMT</pubDate>
            <atom:updated>2026-01-03T07:25:03.918Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*_AWfsgY-X0eznxl3.png" /></figure><p>Spent an hour debugging why verified users were getting blocked. The culprit? Auth0 doesn’t include email_verified in access tokens by default.</p><h3>The Problem</h3><p>My Spring Boot filter checks if users have verified their email:</p><p>Users who had verified their email in Auth0 Dashboard (showing “VERIFIED” badge) were still getting blocked. The logs showed:</p><pre>User email not verified: sub=auth0|67c6a695657d0f4f7ac8736f</pre><p>But… they ARE verified. What gives?</p><h3>The Root Cause</h3><p>Auth0 includes email_verified in the <strong>ID token</strong> but NOT in the <strong>access token</strong> by default.</p><p>When you decode your access token, you might see:</p><p>No email_verified. Even though you requested the email scope.</p><h3>The Fix: Auth0 Action</h3><p>Create a Post-Login Action to add the claim to your access token:</p><p><strong>Auth0 Dashboard → Actions → Flows → Login → Add Action</strong></p><p>Deploy it, drag it into your Login flow.</p><p>Now your access token includes:</p><h3>Why Auth0 Does This</h3><p>ID tokens are for the <strong>client</strong> (your frontend) to know who the user is.</p><p>Access tokens are for the <strong>API</strong> (your backend) to authorize requests.</p><p>Auth0’s philosophy: access tokens should contain authorization info, not identity info. But in practice, your API often needs both.</p><h3>Alternative: Fetch from Userinfo Endpoint</h3><p>If you can’t modify Auth0 Actions (or want a fallback), fetch from the userinfo endpoint:</p><p>But this adds latency to every request. The Action approach is better.</p><h3>OAuth Users Don’t Need This Check</h3><p>Plot twist: if you’re using social login (Google, GitHub), the provider already verified the email. Auth0 sets email_verified: true automatically for OAuth users.</p><p>You could skip the check for non-database connections:</p><p>But I prefer keeping it simple — just add the claim via Action and check for everyone. KISS.</p><h3>The Complete Action</h3><p>Here’s my full Action that also handles resending verification emails:</p><h3>Lessons Learned</h3><ol><li><strong>ID token ≠ Access token</strong> — They serve different purposes and contain different claims</li><li><strong>Test with actual tokens</strong> — Decode your JWT at jwt.io to see what’s really there</li><li><strong>Actions are powerful</strong> — You can add any claim you need to the access token</li><li><strong>Check Auth0 Dashboard carefully</strong> — Just because it shows “VERIFIED” doesn’t mean the token has the claim</li></ol><p><strong>Ever been burned by missing JWT claims?</strong> What other claims do you add via Actions?</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — a URL shortener with analytics, bio pages, and white-labeling.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/why-auth0-emailverified-was-missing-from-my-access-token-and-how-to-fix-it-e94"><em>https://dev.to</em></a><em> on January 3, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=946ebb289353" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Follow-up: Cloudflare Bot Fight Mode Breaks Zapier OAuth (And How to Fix It)]]></title>
            <link>https://medium.com/@anand_14490/follow-up-cloudflare-bot-fight-mode-breaks-zapier-oauth-and-how-to-fix-it-0304cc30db0d?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/0304cc30db0d</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[zapier]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 07:18:38 GMT</pubDate>
            <atom:updated>2026-01-01T07:21:11.691Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*QeTqkfyrZ_37ZN4R.png" /></figure><p><em>This is a follow-up to my previous article on </em><a href="https://medium.com/me/stats/post/f3cd0dafa2a9"><em>5 Hard Lessons from Implementing Zapier OAuth in Spring Boot</em></a><em>. After solving all the code issues, I hit one more wall.</em></p><p>You’ve implemented OAuth 2.0 with PKCE. Your E2E tests pass. You deploy to production. Zapier shows:</p><pre>Oh, foo. Zapier could not connect to your account. Try connecting again. Or go to your Zaps and try re-enabling them.</pre><p>The Cloudflare “Just a moment…” page strikes again.</p><h3>The Symptom</h3><p>Zapier’s OAuth callback hits your /oauth/token endpoint and gets a 403 with an HTML page instead of JSON:</p><p>Your logs show nothing. Because the request never reaches your application.</p><h3>The Root Cause: Bot Fight Mode</h3><p>If you have <strong>Bot Fight Mode</strong> enabled in Cloudflare (Security &gt; Settings &gt; Bot traffic), it’s challenging Zapier’s automated requests. Even though Zapier is in Cloudflare’s verified bots list.</p><p>“Easy fix,” I thought. “I’ll create a WAF rule to skip Bot Fight Mode for /oauth/* paths.&quot;</p><p><strong>Wrong.</strong></p><h3>The Documented Limitation You Won’t Find Easily</h3><p>From <a href="https://developers.cloudflare.com/bots/get-started/bot-fight-mode/">Cloudflare’s official docs</a>:</p><blockquote><em>“You cannot bypass or skip Bot Fight Mode using the Skip action in WAF custom rules or using Page Rules.”</em></blockquote><p>And the explanation:</p><blockquote><em>“Skip, Bypass, and Allow actions apply to rules or rulesets running on the Ruleset Engine. While Super Bot Fight Mode rules are implemented in the Ruleset Engine, </em><strong><em>Bot Fight Mode checks are not.</em></strong><em>”</em></blockquote><p>Translation: Bot Fight Mode (Free plan) runs outside the normal rule engine. No WAF rule, Page Rule, or IP Access Rule can bypass it for specific paths. It’s all-or-nothing.</p><h3>The Solutions</h3><h3>Option 1: Disable Bot Fight Mode Entirely (Free Plan)</h3><p>If you’re on Cloudflare Free:</p><p>Your OAuth works. But you lose bot protection everywhere.</p><h3>Option 2: Upgrade to Pro ($20/month) and Use Super Bot Fight Mode</h3><p>Super Bot Fight Mode <em>does</em> run in the Ruleset Engine. You can skip it for specific paths.</p><p><strong>Step 1: Enable Super Bot Fight Mode</strong></p><ol><li>Upgrade to Cloudflare Pro</li><li>Go to <strong>Security &gt; Settings &gt; Bot traffic</strong></li><li>Configure <strong>Super Bot Fight Mode</strong>:</li></ol><ul><li>Definitely automated traffic: <strong>Block</strong> or <strong>Managed Challenge</strong></li><li>Verified bots: <strong>Allow</strong></li></ul><p><strong>Step 2: Create Skip Rule for OAuth</strong></p><ol><li>Go to <strong>Security &gt; Security rules</strong></li><li>Click <strong>Create rule</strong></li><li>Configure:</li></ol><ul><li>(starts_with(http.request.uri.path, &quot;/oauth/token&quot;)) or (starts_with(http.request.uri.path, &quot;/oauth/authorize&quot;)) or (starts_with(http.request.uri.path, &quot;/oauth/userinfo&quot;))</li></ul><p><strong>Step 3: Test Zapier</strong></p><p>Retry the OAuth connection. Should work now.</p><h3>Why This Matters</h3><p>If you’re building integrations with Zapier, Make.com, n8n, or any other automation platform, you need the ability to exempt your OAuth endpoints from bot challenges. That requires Pro.</p><h3>The Cost-Benefit</h3><p>$20/month for Cloudflare Pro gives you:</p><ul><li>Super Bot Fight Mode with path-based exceptions</li><li>Better analytics</li><li>Polish Rules (5 vs 0)</li><li>Faster support</li></ul><p>For a production SaaS with third-party integrations, it’s worth it. The alternative is no bot protection at all.</p><h3>TL;DR</h3><ul><li><strong>Bot Fight Mode (Free):</strong> Cannot be bypassed for specific paths. All or nothing.</li><li><strong>Super Bot Fight Mode (Pro):</strong> Can be skipped using WAF custom rules.</li><li><strong>The fix:</strong> Upgrade to Pro, enable SBFM, create Skip rule for /oauth/* paths.</li></ul><p>OAuth integration isn’t done until Cloudflare lets the requests through.</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — URL shortener with Zapier, Make.com, and n8n integrations.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/follow-up-cloudflare-bot-fight-mode-breaks-zapier-oauth-and-how-to-fix-it-3p6m"><em>https://dev.to</em></a><em> on January 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0304cc30db0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Hard Lessons from Implementing Zapier OAuth in Spring Boot]]></title>
            <link>https://medium.com/@anand_14490/5-hard-lessons-from-implementing-zapier-oauth-in-spring-boot-f3cd0dafa2a9?source=rss-fb36181dc394------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3cd0dafa2a9</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[zapier]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[oauth]]></category>
            <dc:creator><![CDATA[Anand]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 04:46:06 GMT</pubDate>
            <atom:updated>2026-01-01T04:46:59.596Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Yix0IlLRp_JGKsfl.png" /></figure><p>Three days. That’s how long it took to get a “simple” OAuth integration working with Zapier. The docs made it look easy. Reality had other plans.</p><p>Here’s what I learned building OAuth 2.0 with PKCE for <a href="https://jo4.io/">jo4.io</a> — a URL shortener that now integrates with Zapier, Make.com, and n8n.</p><h3>Lesson 1: Your OAuth Tokens Fight Your JWT Tokens</h3><p>Spring Security’s filter chain doesn’t know the difference between your OAuth access tokens and Auth0’s JWTs. Both arrive as Authorization: Bearer &lt;token&gt;. Chaos ensues.</p><h3>The Problem</h3><pre>OAuth token authentication successful: userId=2, clientId=zapier ... BearerTokenAuthenticationFilter: Failed to authenticate: Invalid JWT</pre><p>Wait, what? We just authenticated successfully. Why is it failing?</p><p>The JWT filter runs after our OAuth filter and tries to re-validate the same token as a JWT. It fails (obviously — it’s not a JWT), and returns 401.</p><h3>The Fix</h3><p>Strip the Authorization header after successful OAuth authentication:</p><p><strong>Key insight:</strong> Filter chain order matters. Your OAuth filter runs, authenticates, then passes to the next filter. If that next filter sees a Bearer token, it’ll try to process it again.</p><h3>Lesson 2: Concurrent Token Refresh = Race Condition Hell</h3><p>Zapier’s backend makes parallel requests. When a token expires, multiple workers hit your refresh endpoint simultaneously.</p><h3>The Problem</h3><pre>Thread-1: Refresh token, create new access token A Thread-1: Revoke old access token (standard practice, right?) Thread-2: Refresh token, create new access token B Thread-2: Revoke old access token... wait, that&#39;s token A that Thread-1 just created</pre><p>User sees: “This account is expired. Please reconnect it.”</p><h3>The (Counter-Intuitive) Fix</h3><p><strong>Don’t revoke access tokens on refresh.</strong> Let them expire naturally.</p><p>This is standard OAuth 2.0 practice. Access tokens are short-lived by design. Revoking them on refresh is “clever” but breaks under concurrency.</p><h3>Lesson 3: PKCE Validation Must Be Explicit</h3><p>@NotBlank on your DTO doesn&#39;t always trigger. Bean validation has quirks.</p><h3>The Problem</h3><p>Our request DTO:</p><p>But requests without codeChallenge were getting through. The security bug: attackers could bypass PKCE entirely.</p><h3>The Fix</h3><p>Defense in depth — validate explicitly:</p><p><strong>Rule:</strong> Security validations should be explicit in code, not just annotations. Annotations can be bypassed, misconfigured, or simply not triggered.</p><h3>Lesson 4: Zapier Has Specific Token Response Requirements</h3><p>The OAuth spec is flexible. Zapier is not.</p><h3>Requirements I Discovered the Hard Way</h3><p>Correct response format:</p><h3>Lesson 5: E2E Tests Are Worth the Investment</h3><p>After two days of “try it and see” debugging, I wrote comprehensive E2E tests. Found three bugs in 10 minutes.</p><h3>The Test Structure</h3><h3>The Concurrent Refresh Test That Found the Race Condition</h3><p>This test would have caught the race condition immediately instead of after two days of production debugging.</p><h3>The Complete Filter Chain Order</h3><p>For reference, here’s what finally worked:</p><pre>Request ↓ OAuthTokenEndpointFilter (strips Bearer from /oauth/token, /oauth/revoke) ↓ OAuthTokenAuthenticationFilter (validates opaque OAuth tokens) ↓ BearerTokenAuthenticationFilter (validates JWTs - skipped if already authed) ↓ Your Controllers</pre><p>With @Order annotations:</p><h3>TL;DR</h3><ol><li><strong>Strip Authorization header</strong> after OAuth auth succeeds — prevents JWT filter conflicts</li><li><strong>Don’t revoke tokens on refresh</strong> — causes race conditions under concurrent requests</li><li><strong>Validate PKCE explicitly</strong> — don’t trust annotations alone for security</li><li><strong>Match Zapier’s exact format</strong> — tokens at top level, scope included</li><li><strong>Write E2E tests first</strong> — 10 minutes of tests beats 2 days of production debugging</li></ol><p>OAuth looks simple in diagrams. The edge cases will humble you.</p><p><strong>What OAuth integration horror stories do you have?</strong> I’d love to hear I’m not alone.</p><p><em>Building </em><a href="https://jo4.io/"><em>jo4.io</em></a><em> — URL shortener with Zapier, Make.com, and n8n integrations.</em></p><p><em>Originally published at </em><a href="https://dev.to/anand_rathnas_d5b608cc3de/5-hard-lessons-from-implementing-zapier-oauth-in-spring-boot-443a"><em>https://dev.to</em></a><em> on January 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3cd0dafa2a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>