<?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: Ron (teRON) Bullock</title>
    <description>The latest articles on DEV Community by Ron (teRON) Bullock (@teronbullock).</description>
    <link>https://dev.to/teronbullock</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%2F878842%2F7035189c-9601-4eac-b3a6-c7867dc5b31b.jpg</url>
      <title>DEV Community: Ron (teRON) Bullock</title>
      <link>https://dev.to/teronbullock</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/teronbullock"/>
    <language>en</language>
    <item>
      <title>Why I Deleted My Custom "Crew" Logic Mid-Build</title>
      <dc:creator>Ron (teRON) Bullock</dc:creator>
      <pubDate>Thu, 26 Mar 2026 23:34:31 +0000</pubDate>
      <link>https://dev.to/teronbullock/why-i-deleted-my-custom-crew-logic-mid-build-2mp5</link>
      <guid>https://dev.to/teronbullock/why-i-deleted-my-custom-crew-logic-mid-build-2mp5</guid>
      <description>&lt;p&gt;I was deep into building a custom "Crew" management system for my Next.js SaaS, a job and invoice tracker for small businesses. Everything was all set. My hooks were in place state was wired up and my UI components were all working.&lt;/p&gt;

&lt;p&gt;I looked closer at my auth layer and realized my provider &lt;code&gt;better-auth&lt;/code&gt;'s native &lt;code&gt;organization&lt;/code&gt; plugin already handled multi-tenant access control. This was the exact problem I was solving from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mid-Build Pivot
&lt;/h2&gt;

&lt;p&gt;At that point I had two choices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep the custom implementation and own it long-term&lt;/li&gt;
&lt;li&gt;Adopt better-auth's native organization plugin and retire my abstraction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The trade-off was obvious. My custom "Crew" layer duplicated what &lt;code&gt;better-auth&lt;/code&gt; was already handling; the member schema, tenant context, permission propagation.&lt;/p&gt;

&lt;p&gt;Keeping it meant owning edge cases, permission logic, and future schema drift. The Pivot meant letting the library handle what it was built for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Native Approach Won
&lt;/h2&gt;

&lt;p&gt;I wasn’t evaluating a dozen alternatives. I was already on better-auth for auth and session management. The organization plugin just extended that to tenant context. &lt;/p&gt;

&lt;p&gt;The pivot wins were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Eliminating a redundant abstraction instead of maintaining parallel systems&lt;/li&gt;
&lt;li&gt;Staying aligned with better-auth's data model instead of fighting it&lt;/li&gt;
&lt;li&gt;Reducing long-term maintenance across auth, sessions, and permissions in one move&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Improved
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Simplified State Management&lt;/strong&gt;&lt;br&gt;
Removing the custom Crew layer cut unnecessary renders and tightened component isolation across authorized views. Less state to thread through, cleaner boundaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stronger Authorization Boundaries&lt;/strong&gt;&lt;br&gt;
I already had Zod validation at the API boundary in my custom solution; carrying it forward here just meant it now worked in concert with better-auth's permission model rather than around it. &lt;/p&gt;

&lt;p&gt;That gave me cleaner, more reliable schema enforcement for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Member invitations&lt;/li&gt;
&lt;li&gt;Role assignments&lt;/li&gt;
&lt;li&gt;Member asset edits (passwords, profile info)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tradeoffs
&lt;/h2&gt;

&lt;p&gt;The main tradeoff was reduced flexibility for highly custom role logic. But in exchange, I gained consistency, less code to maintain, and tighter integration with the rest of the auth system.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Takeaway
&lt;/h2&gt;

&lt;p&gt;It’s easy to get attached to a solution after you’ve put hours into it. But knowing when to pivot is key. Sometimes the better solution is the code you never have to write.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>javascript</category>
      <category>buildinpublic</category>
      <category>react</category>
    </item>
  </channel>
</rss>
