<?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: kttherealest</title>
    <description>The latest articles on DEV Community by kttherealest (@kttttttherealest).</description>
    <link>https://dev.to/kttttttherealest</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%2F4112644%2F25b0a910-61e1-4b92-82c8-4448f8471792.png</url>
      <title>DEV Community: kttherealest</title>
      <link>https://dev.to/kttttttherealest</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kttttttherealest"/>
    <language>en</language>
    <item>
      <title>3 Weeks Solo-Building Toolstack: 15 Products Shipped</title>
      <dc:creator>kttherealest</dc:creator>
      <pubDate>Mon, 28 Sep 2026 18:10:53 +0000</pubDate>
      <link>https://dev.to/kttttttherealest/3-weeks-solo-building-toolstack-15-products-shipped-3i6b</link>
      <guid>https://dev.to/kttttttherealest/3-weeks-solo-building-toolstack-15-products-shipped-3i6b</guid>
      <description>&lt;p&gt;3 weeks into building Toolstack solo — here's where things stand.&lt;/p&gt;

&lt;p&gt;Launched on Product Hunt, and since then I've been heads-down shipping: 15 products so far, ranging from one-click browser extensions to fully tested Next.js SaaS starters with real auth, Stripe billing, and working code.&lt;/p&gt;

&lt;p&gt;Everything ships tested — real checkouts, real webhook deliveries, real API calls — before it goes out. I'd rather ship something small and working than something big and half-finished.&lt;/p&gt;

&lt;p&gt;Still early days. Still building in public. If you're a developer looking for a starting point instead of building auth/billing/DB from scratch again, take a look: &lt;a href="https://whop.com/table-export-tools/products" rel="noopener noreferrer"&gt;https://whop.com/table-export-tools/products&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would genuinely appreciate feedback, even the harsh kind.&lt;br&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%2Fsb2vnuczsyxfwlzbc380.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%2Fsb2vnuczsyxfwlzbc380.png" alt=" " width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>saas</category>
      <category>nextjs</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>How to Actually Set Up Stripe's Billing Meters in 2026 (Most Tutorials Are Wrong)</title>
      <dc:creator>kttherealest</dc:creator>
      <pubDate>Sun, 13 Sep 2026 19:49:53 +0000</pubDate>
      <link>https://dev.to/kttttttherealest/how-to-actually-set-up-stripes-billing-meters-in-2026-most-tutorials-are-wrong-3knn</link>
      <guid>https://dev.to/kttttttherealest/how-to-actually-set-up-stripes-billing-meters-in-2026-most-tutorials-are-wrong-3knn</guid>
      <description>&lt;p&gt;If you've searched for "Stripe usage-based billing" or "Stripe metered pricing" recently, there's a good chance you found a tutorial referencing &lt;code&gt;stripe.subscriptionItems.createUsageRecord()&lt;/code&gt;. That approach is dead. Stripe fully deprecated it in 2025, and you can no longer even create a new metered price the old way in the Dashboard.&lt;/p&gt;

&lt;p&gt;I found this out mid-build, while working on a usage-based billing starter kit. Here's the current, correct way to do it.&lt;/p&gt;

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

&lt;p&gt;The old model: attach a metered price directly to a subscription item, then report usage against that specific item's ID.&lt;/p&gt;

&lt;p&gt;The new model: create a &lt;strong&gt;Meter&lt;/strong&gt; object first (a named, reusable event definition), attach a price to that meter, and report usage against the &lt;strong&gt;customer&lt;/strong&gt;, not a subscription item.&lt;/p&gt;

&lt;p&gt;This is a meaningful simplification once you know it — you no longer need to track a subscription item ID in your database at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create the Meter
&lt;/h2&gt;

&lt;p&gt;In the Stripe Dashboard: &lt;strong&gt;Billing → Meters → Create meter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You'll set:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;display name&lt;/strong&gt; (for your own reference)&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;event name&lt;/strong&gt; — a string you choose, e.g. &lt;code&gt;api_requests&lt;/code&gt;. This is the identifier your code will use to report usage, so pick something meaningful and stable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggregation&lt;/strong&gt;: usually "Sum" (adds up every reported value over the billing period).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Create a metered Price attached to that Meter
&lt;/h2&gt;

&lt;p&gt;Product catalog → Add product → when setting the price, choose &lt;strong&gt;"Usage-based"&lt;/strong&gt; (not "Standard"), and select the Meter you just created. Set your per-unit price.&lt;/p&gt;

&lt;p&gt;Copy the resulting &lt;strong&gt;Price ID&lt;/strong&gt; — you'll use it for Checkout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Create a Checkout Session (no quantity!)
&lt;/h2&gt;

&lt;p&gt;This is a small but important detail: metered prices don't take a &lt;code&gt;quantity&lt;/code&gt;. If you pass one, Stripe rejects the request.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\&lt;/code&gt;&lt;code&gt;js&lt;br&gt;
const session = await stripe.checkout.sessions.create({&lt;br&gt;
  customer: customerId,&lt;br&gt;
  mode: 'subscription',&lt;br&gt;
  line_items: [{ price: process.env.STRIPE_PRICE_ID }], // no quantity&lt;br&gt;
  success_url: '...',&lt;br&gt;
  cancel_url: '...',&lt;br&gt;
});&lt;br&gt;
\&lt;/code&gt;&lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Report usage
&lt;/h2&gt;

&lt;p&gt;This is the actual replacement for the old &lt;code&gt;createUsageRecord&lt;/code&gt; call:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\&lt;/code&gt;&lt;code&gt;js&lt;br&gt;
await stripe.billing.meterEvents.create({&lt;br&gt;
  event_name: 'api_requests', // must match what you set up in Step 1&lt;br&gt;
  payload: {&lt;br&gt;
    value: '1',&lt;br&gt;
    stripe_customer_id: customerId,&lt;br&gt;
  },&lt;br&gt;
});&lt;br&gt;
\&lt;/code&gt;&lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Note it's keyed to &lt;code&gt;stripe_customer_id&lt;/code&gt;, not a subscription item ID. Stripe aggregates these events per meter, per customer, per billing period, and calculates the invoice automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  A reliability note
&lt;/h2&gt;

&lt;p&gt;If this call fails (network blip, wrong event name, etc.), decide deliberately what happens to the user's request. In my case, I chose to still fulfill the request and just log the error — a billing-reporting failure shouldn't break the actual feature. But that does mean a failed report is usage that goes unbilled silently. For anything handling real revenue, you want a retry queue (store failed events, retry on a schedule) rather than a bare &lt;code&gt;console.error&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Test-mode and live-mode Meters are separate objects.&lt;/strong&gt; Don't assume the Meter you created in test mode carries over — you'll need to create a live one too before going to production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The event name is exact-match.&lt;/strong&gt; A typo between what you configured in the Dashboard and what your code sends means silently-uncounted usage, not an error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Webhooks still work the same way&lt;/strong&gt; for tracking subscription status (&lt;code&gt;customer.subscription.updated&lt;/code&gt;, etc.) — that part of the integration didn't change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Working example
&lt;/h2&gt;

&lt;p&gt;I built this into a full starter kit (Next.js + Prisma + NextAuth + Stripe) if you want to see it wired together end-to-end, including the free-tier gating before metered billing kicks in: &lt;a href="https://whop.com/table-export-tools/meter-usage-based-billing-saas-starter-stripe-meters/" rel="noopener noreferrer"&gt;https://whop.com/table-export-tools/meter-usage-based-billing-saas-starter-stripe-meters/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stripe</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>saas</category>
    </item>
    <item>
      <title>I Built 15 Digital Products in a Week Using Claude — Here's What Actually Broke</title>
      <dc:creator>kttherealest</dc:creator>
      <pubDate>Sun, 06 Sep 2026 17:33:34 +0000</pubDate>
      <link>https://dev.to/kttttttherealest/i-built-15-digital-products-in-a-week-using-claude-heres-what-actually-broke-4bbc</link>
      <guid>https://dev.to/kttttttherealest/i-built-15-digital-products-in-a-week-using-claude-heres-what-actually-broke-4bbc</guid>
      <description>&lt;p&gt;Over the past week I built and shipped 15 digital products — 2 Chrome extensions, a resume scanner, a UI template, and 11 SaaS starter kits with genuinely different architectures: invoicing, feature flags with percentage rollouts, outbound webhooks with HMAC signing, usage-based billing via Stripe, and one that ships a real browser extension alongside the web app.&lt;/p&gt;

&lt;p&gt;Everything was built through Claude. But the part worth writing about isn't the generation — it's what testing actually surfaced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug #1: A hash function that wasn't as random as it looked
&lt;/h2&gt;

&lt;p&gt;The feature-flag starter needed deterministic percentage rollouts — the same user should always get the same result for a given flag, computed by hashing &lt;code&gt;flagKey:distinctId&lt;/code&gt; into a 0-99 bucket.&lt;/p&gt;

&lt;p&gt;The first version used a simple polynomial rolling hash:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\&lt;/code&gt;&lt;code&gt;js&lt;br&gt;
let hash = 0;&lt;br&gt;
for (let i = 0; i &amp;lt; seed.length; i++) {&lt;br&gt;
  hash = (hash * 31 + seed.charCodeAt(i)) &amp;gt;&amp;gt;&amp;gt; 0;&lt;br&gt;
}&lt;br&gt;
\&lt;/code&gt;&lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Looked fine in isolation. But a test script checking independence between two &lt;em&gt;different&lt;/em&gt; flags for the same user turned up a problem: users "in" one flag's rollout were suspiciously likely to also be in an unrelated flag's rollout.&lt;/p&gt;

&lt;p&gt;The cause: two strings of the same length differing by one character in the same position produce hashes that differ by a &lt;em&gt;fixed&lt;/em&gt; offset with this kind of hash — not an independent, unpredictable one. &lt;code&gt;"flagA:user-0"&lt;/code&gt; and &lt;code&gt;"flagB:user-0"&lt;/code&gt; differ by a constant delta, and that delta is the same regardless of the user number.&lt;/p&gt;

&lt;p&gt;Fixed by switching to FNV-1a:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\&lt;/code&gt;&lt;code&gt;js&lt;br&gt;
let hash = 0x811c9dc5;&lt;br&gt;
for (let i = 0; i &amp;lt; seed.length; i++) {&lt;br&gt;
  hash ^= seed.charCodeAt(i);&lt;br&gt;
  hash = Math.imul(hash, 0x01000193);&lt;br&gt;
}&lt;br&gt;
hash = hash &amp;gt;&amp;gt;&amp;gt; 0;&lt;br&gt;
\&lt;/code&gt;&lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Re-ran the independence test: two unrelated flags for the same 1,000 simulated users now disagreed about 47% of the time — right where independent 50/50 decisions should land.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug #2: Building on an API that got deprecated mid-build
&lt;/h2&gt;

&lt;p&gt;The usage-based billing starter needed to report metered usage to Stripe. I started implementing it against &lt;code&gt;stripe.subscriptionItems.createUsageRecord()&lt;/code&gt; — the classic approach for metered billing.&lt;/p&gt;

&lt;p&gt;Turns out Stripe fully deprecated that approach in 2025 in favor of a new Billing Meters system. The old flow (attach a metered price directly to a subscription item, report usage against that item) doesn't exist anymore for new integrations — you now create a Meter object first, then report usage against a customer ID via &lt;code&gt;stripe.billing.meterEvents.create()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Had to redo the schema (no longer need to track a subscription item ID at all — usage reports against the customer directly) and the reporting call. A reminder that "I've seen this pattern before" isn't the same as "this pattern is still current."&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually live
&lt;/h2&gt;

&lt;p&gt;12 of the 15 are live under one storefront if you want to look at the code or the live demos: &lt;a href="https://whop.com/table-export-tools/products/" rel="noopener noreferrer"&gt;https://whop.com/table-export-tools/products/&lt;/a&gt;&lt;br&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%2Fg74dzxzmtq4p7i7v7z6l.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%2Fg74dzxzmtq4p7i7v7z6l.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to go deeper on any of the architectures — team-based billing vs. per-user billing, CORS setup for a browser extension talking to an API, HMAC signing for outbound webhooks, whatever's interesting.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>showdev</category>
      <category>sass</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
