<?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: Kaneki</title>
    <description>The latest articles on DEV Community by Kaneki (@thenvhd).</description>
    <link>https://dev.to/thenvhd</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3840248%2Fe4416bef-ad22-458b-8bea-e3c916a6cb07.png</url>
      <title>DEV Community: Kaneki</title>
      <link>https://dev.to/thenvhd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thenvhd"/>
    <language>en</language>
    <item>
      <title>I Built a File Paywall Platform for Freelancers</title>
      <dc:creator>Kaneki</dc:creator>
      <pubDate>Mon, 23 Mar 2026 14:09:08 +0000</pubDate>
      <link>https://dev.to/thenvhd/i-built-a-file-paywall-platform-for-freelancers-5647</link>
      <guid>https://dev.to/thenvhd/i-built-a-file-paywall-platform-for-freelancers-5647</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I got tired of chasing clients for payments before delivering files, so I built &lt;a href="https://getpaygate.com" rel="noopener noreferrer"&gt;PayGate&lt;/a&gt; — a platform where freelancers create payment links, clients pay, and only then get access to download the files. No more "I'll pay you next week." Here's the full technical breakdown.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;If you've ever freelanced, you know the dance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You finish the work&lt;/li&gt;
&lt;li&gt;Client asks to "just see the final version first"&lt;/li&gt;
&lt;li&gt;You send it over&lt;/li&gt;
&lt;li&gt;Invoice goes unpaid for 3 weeks&lt;/li&gt;
&lt;li&gt;Awkward follow-up emails&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The power dynamic shifts the moment you hand over the files. I wanted to flip that.&lt;/p&gt;

&lt;p&gt;Existing solutions? Sure — Gumroad takes 10% and doesn't use your own Stripe. Payhip and SendOwl charge 5% on free plans. Stripe Payment Links work but have zero file protection — once redirected, the client can share the download link with anyone.&lt;/p&gt;

&lt;p&gt;None of them handled invoicing for my local tax regulations either. So I built my own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Meet PayGate
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The concept is dead simple:&lt;/strong&gt; Upload a file → set a price → send the link to your client → they pay → they download. That's it.&lt;/p&gt;

&lt;p&gt;No storefront. No shopping cart. No "build your creator brand" fluff. Just: &lt;strong&gt;get paid before you deliver files.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://getpaygate.com" rel="noopener noreferrer"&gt;getpaygate.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;For the dev crowd — here's what's under the hood:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Tech&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Next.js 16&lt;/strong&gt; (App Router)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt; (strict mode, obviously)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Tailwind CSS v4&lt;/strong&gt; + &lt;strong&gt;shadcn/ui&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Supabase&lt;/strong&gt; (Postgres + Auth + RLS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ORM&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Drizzle ORM&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payments&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Stripe Connect Express&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File Storage&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Vercel Blob&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Email&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Resend&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hosting&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Vercel&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;~5,800 lines of TypeScript across ~45 commits. Solo dev, from zero to launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture Decisions Worth Sharing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why Stripe Connect Express (not just Stripe Checkout)
&lt;/h3&gt;

&lt;p&gt;This was the biggest architectural decision. Regular Stripe integration means &lt;strong&gt;I&lt;/strong&gt; collect the money and then pay out the freelancer. That's a regulatory nightmare — you become a payment facilitator.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Stripe Connect Express&lt;/strong&gt;, each freelancer onboards their own Stripe account. Money flows directly from client → freelancer. PayGate never touches the funds. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No money transmission license needed&lt;/li&gt;
&lt;li&gt;Freelancers get paid instantly (well, on Stripe's schedule)&lt;/li&gt;
&lt;li&gt;I just collect the platform fee via Stripe's &lt;code&gt;application_fee_amount&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sessions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;payment_intent_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;application_fee_amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;calculateFee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;userPlan&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;transfer_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;freelancerStripeAccountId&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;// ... rest of checkout config&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  File Security with Vercel Blob
&lt;/h3&gt;

&lt;p&gt;Files are stored in Vercel Blob with &lt;strong&gt;no public URLs&lt;/strong&gt;. When a client completes payment, the app generates a short-lived signed URL. The download page checks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Payment status (via Stripe webhook confirmation)&lt;/li&gt;
&lt;li&gt;Download token validity&lt;/li&gt;
&lt;li&gt;Expiration time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No payment, no download. Simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supabase RLS for Multi-Tenancy
&lt;/h3&gt;

&lt;p&gt;Every table has Row Level Security policies. A freelancer can only see their own deliverables, their own transactions, their own analytics. This isn't just "filter by user_id in the query" — it's enforced at the database level.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Users can only view own deliverables"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;deliverables&lt;/span&gt; &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Drizzle ORM Over Prisma
&lt;/h3&gt;

&lt;p&gt;I went with Drizzle because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's closer to SQL (if you know Postgres, you know Drizzle)&lt;/li&gt;
&lt;li&gt;Type inference is incredible — no &lt;code&gt;prisma generate&lt;/code&gt; step&lt;/li&gt;
&lt;li&gt;Lighter bundle size on the edge&lt;/li&gt;
&lt;li&gt;Migrations are just SQL files&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pricing Model
&lt;/h2&gt;

&lt;p&gt;I tried to make it freelancer-friendly:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Free&lt;/th&gt;
&lt;th&gt;Pro ($19/mo)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Deliverables&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max price per file&lt;/td&gt;
&lt;td&gt;$500&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platform fee&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The math works out: if you're doing more than ~$380/month in transactions, Pro pays for itself versus any 5% competitor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Stripe Connect Onboarding is Complex
&lt;/h3&gt;

&lt;p&gt;The Express onboarding flow is well-documented but has edge cases. Different countries have different KYC requirements. Testing in development mode ≠ production behavior. Budget extra time here.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Webhook Reliability is Everything
&lt;/h3&gt;

&lt;p&gt;Your payment flow is only as good as your webhook handling. I implemented idempotency keys and a retry mechanism from day one. If the webhook fails, the client shouldn't lose access to their download.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Start With Fewer Features
&lt;/h3&gt;

&lt;p&gt;My V1 had no analytics, no custom branding, no fancy dashboard. Just: upload, price, share, get paid. That constraint forced me to nail the core flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next (V2 Roadmap)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custom branding&lt;/strong&gt; — Let freelancers add their logo, colors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics dashboard&lt;/strong&gt; — Views, conversion rates, revenue tracking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google OAuth&lt;/strong&gt; — Faster onboarding&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DAC7 tax reporting&lt;/strong&gt; — EU compliance for platform sellers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API access&lt;/strong&gt; — For devs who want to integrate PayGate into their own tools&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;If you're a freelancer who's ever had a client ghost after receiving the files — &lt;a href="https://getpaygate.com" rel="noopener noreferrer"&gt;give PayGate a try&lt;/a&gt;. Free plan, no credit card required.&lt;/p&gt;

&lt;p&gt;And if you're a dev — I'd love your feedback on the architecture. Roast my stack, suggest improvements, or tell me what I'm doing wrong. That's what dev.to is for. 🤙&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>stripe</category>
      <category>freelance</category>
    </item>
  </channel>
</rss>
