<?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>Forem: Marine Danielyan</title>
    <description>The latest articles on Forem by Marine Danielyan (@mardan).</description>
    <link>https://forem.com/mardan</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%2F3772349%2Ffa97af6d-49a9-4cc6-b644-263e1dcbf8f8.jpg</url>
      <title>Forem: Marine Danielyan</title>
      <link>https://forem.com/mardan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mardan"/>
    <language>en</language>
    <item>
      <title>I tried Clerk in a real Next.js build (notes from actually shipping something)</title>
      <dc:creator>Marine Danielyan</dc:creator>
      <pubDate>Sun, 15 Feb 2026 08:02:10 +0000</pubDate>
      <link>https://forem.com/mardan/i-tried-clerk-in-a-real-nextjs-build-notes-from-actually-shipping-something-1k21</link>
      <guid>https://forem.com/mardan/i-tried-clerk-in-a-real-nextjs-build-notes-from-actually-shipping-something-1k21</guid>
      <description>&lt;p&gt;I wanted to test Clerk in a way that felt real, so I used it in a small app I was already building (Next.js App Router + Supabase + Prisma), instead of doing a toy “login page” demo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; auth setup was fast, most pain came from DB plumbing, not Clerk.&lt;/p&gt;

&lt;p&gt;I followed the Next.js quickstart pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;install &lt;code&gt;@clerk/nextjs&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;add &lt;code&gt;clerkMiddleware()&lt;/code&gt; in &lt;code&gt;proxy.ts&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;wrap layout with &lt;code&gt;ClerkProvider&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;SignedIn/SignedOut&lt;/code&gt; + &lt;code&gt;UserButton&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="c1"&gt;// src/proxy.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;clerkMiddleware&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@clerk/nextjs/server&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;clerkMiddleware&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;matcher&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/((?!_next).*)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/(api|trpc)(.*)&lt;/span&gt;&lt;span class="dl"&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;p&gt;That part took minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What felt good
&lt;/h2&gt;

&lt;p&gt;1) &lt;strong&gt;Keyless mode is actually useful&lt;/strong&gt;&lt;br&gt;
I could just start building. No key-copying upfront, no dashboard detour before writing product code.&lt;/p&gt;

&lt;p&gt;For prototypes, this is huge. Normally auth setup breaks flow early.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Going from keyless to real keys was easy&lt;/strong&gt;&lt;br&gt;
After core features were done, I added:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=...
CLERK_SECRET_KEY=...

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

&lt;/div&gt;



&lt;p&gt;Restarted app and moved on. No drama.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke
&lt;/h2&gt;

&lt;p&gt;1) &lt;strong&gt;Middleware matcher got me once&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hit this runtime error during setup:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;auth() was called but Clerk can't detect usage of clerkMiddleware()&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Fix was matcher coverage. Once fixed, auth was stable.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;My bigger issues were Supabase/Prisma&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hit &lt;code&gt;P1001&lt;/code&gt; and schema engine headaches.&lt;br&gt;
That was a DB/network config issue, not an auth issue.&lt;/p&gt;

&lt;p&gt;Honestly this was useful signal: Clerk wasn’t the bottleneck in the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  Net take
&lt;/h2&gt;

&lt;p&gt;If you’re on Next.js and want to move quickly, Clerk is solid.&lt;/p&gt;

&lt;p&gt;The biggest value for me wasn’t “fancy auth features,” it was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fast time-to-first-working-auth&lt;/li&gt;
&lt;li&gt;low setup friction&lt;/li&gt;
&lt;li&gt;easy path from prototype mode to proper config&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s what I care about in tooling.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>clerk</category>
      <category>nextjs</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
