<?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: RL Loz</title>
    <description>The latest articles on DEV Community by RL Loz (@xaiphyr).</description>
    <link>https://dev.to/xaiphyr</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%2F1808233%2Fd6e999a5-66ee-49cb-979b-bee7feb577e3.jpg</url>
      <title>DEV Community: RL Loz</title>
      <link>https://dev.to/xaiphyr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xaiphyr"/>
    <language>en</language>
    <item>
      <title>rdev-go-ddgen: Automating Domain Directory Boilerplate for Go Applications</title>
      <dc:creator>RL Loz</dc:creator>
      <pubDate>Wed, 27 May 2026 00:55:43 +0000</pubDate>
      <link>https://dev.to/xaiphyr/rdev-go-ddgen-automating-domain-directory-boilerplate-for-go-applications-2bg5</link>
      <guid>https://dev.to/xaiphyr/rdev-go-ddgen-automating-domain-directory-boilerplate-for-go-applications-2bg5</guid>
      <description>&lt;p&gt;When building robust backend APIs in Go, maintaining a consistent, clean architectural pattern across domain directories is essential for scalability. However, manually creating repetitive domain structures for every new resource introduces subtle human error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Why: Why Manual Boilerplate Fails&lt;/strong&gt;&lt;br&gt;
Copy-pasting existing files to scaffold a new domain (e.g., adding an orders domain next to a users domain) is a common but fragile practice. It is incredibly easy to overlook an import statement, miss a file, or forget to update a variable definition. As an API grows to dozens of domains, this manual approach becomes a major bottleneck that risks introducing compilation errors or silent bugs into your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The What: What is rdev-go-ddgen?&lt;/strong&gt;&lt;br&gt;
rdev-go-ddgen (Domain Directory Generator) is a lightweight, open-source Command Line Interface (CLI) tool designed to eliminate manual boilerplate creation for Go applications. It targets developers looking to instantly spin up predictable, structured domain directories without the risk of copy-paste mistakes.&lt;/p&gt;

&lt;p&gt;While built out of a personal need while developing high-conformance Go APIs using Gin and Bun ORM, rdev-go-ddgen is completely engine-agnostic and serves as a universal foundational bootstrapper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The How: Rapid Deployment&lt;/strong&gt;&lt;br&gt;
You can install rdev-go-ddgen globally and immediately integrate it into your development workflow with a single command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;go install github.com/XaiPhyr/rdev-go-ddgen@latest&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To Initialize folder structure&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rdev-go-ddgen init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To scaffold a completely new, structured domain directory, simply initialize the tool and use the domain flag (-d):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rdev-go-ddgen -d orders&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This single command instantly generates a pristine directory containing five core architectural layers, fully stubbed with basic functions and type declarations:&lt;/p&gt;

&lt;p&gt;handler.go – API routing and transport logic.&lt;br&gt;
service.go – Core business logic boundaries.&lt;br&gt;
repository.go – Database abstraction and data access.&lt;br&gt;
types.go – Domain-specific data models and structs.&lt;br&gt;
_test.go – Unit and integration test placeholders.&lt;/p&gt;

&lt;p&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.amazonaws.com%2Fuploads%2Farticles%2Fkmz2g1roviu34ku6l238.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.amazonaws.com%2Fuploads%2Farticles%2Fkmz2g1roviu34ku6l238.png" alt="Screenshot of commands" width="799" height="750"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. I hope this tool saves you some development time! rdev-go-ddgen is my first official contribution to the Go community, it’s a small step, but I'm incredibly excited to finally share something back with the ecosystem.&lt;/p&gt;

</description>
      <category>go</category>
      <category>api</category>
      <category>domaindrivendesign</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
