<?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: Vivek Sharma</title>
    <description>The latest articles on DEV Community by Vivek Sharma (@vivek_sharma_cb3c863dec26).</description>
    <link>https://dev.to/vivek_sharma_cb3c863dec26</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%2F3471861%2F4c01a70d-4d71-4c2d-b0e6-ab9d6edda1f6.png</url>
      <title>DEV Community: Vivek Sharma</title>
      <link>https://dev.to/vivek_sharma_cb3c863dec26</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vivek_sharma_cb3c863dec26"/>
    <language>en</language>
    <item>
      <title>Stop Wasting Hours on "Project Setup": How I Automated Production-Ready Go APIs</title>
      <dc:creator>Vivek Sharma</dc:creator>
      <pubDate>Wed, 15 Apr 2026 18:30:52 +0000</pubDate>
      <link>https://dev.to/vivek_sharma_cb3c863dec26/stop-wasting-hours-on-project-setup-how-i-automated-production-ready-go-apis-3l45</link>
      <guid>https://dev.to/vivek_sharma_cb3c863dec26/stop-wasting-hours-on-project-setup-how-i-automated-production-ready-go-apis-3l45</guid>
      <description>&lt;h3&gt;
  
  
  Why I built a CLI to bridge the gap between "Hello World" and a production-ready microservice in 60 seconds.
&lt;/h3&gt;




&lt;h2&gt;
  
  
  The "Boilerplate Tax"
&lt;/h2&gt;

&lt;p&gt;As a backend engineer, I noticed a recurring pattern. Every time I started a new service, I spent the first few hours doing manual labor that had nothing to do with business logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setting up &lt;strong&gt;Structured Logging&lt;/strong&gt; (Zap) with request correlation IDs.&lt;/li&gt;
&lt;li&gt;Configuring &lt;strong&gt;Prometheus Metrics&lt;/strong&gt; and health-check probes.&lt;/li&gt;
&lt;li&gt;Hardening &lt;strong&gt;Security Headers&lt;/strong&gt; (HSTS, CSP, XSS protection).&lt;/li&gt;
&lt;li&gt;Writing &lt;strong&gt;Dockerfiles&lt;/strong&gt; with multi-stage builds and non-root users.&lt;/li&gt;
&lt;li&gt;Setting up &lt;strong&gt;Database Migration&lt;/strong&gt; runners.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is what I call the "Boilerplate Tax." It kills momentum and, worse, it leads to inconsistencies across teams. I wanted a tool that didn't just give me folders, but a &lt;strong&gt;production-ready foundation.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Introducing Goforge 🚀
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Goforge&lt;/strong&gt; is a CLI tool built for Gophers who value speed without compromising on engineering standards. It scaffolds a complete API based on &lt;strong&gt;Clean Architecture&lt;/strong&gt; principles.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎯 Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework Choice:&lt;/strong&gt; Toggle between &lt;strong&gt;Fiber&lt;/strong&gt; (for high performance) and &lt;strong&gt;Gin&lt;/strong&gt; (for a massive ecosystem) using simple flags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security First:&lt;/strong&gt; Integrated middleware for security headers and non-root Docker builds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability:&lt;/strong&gt; Built-in Prometheus &lt;code&gt;/metrics&lt;/code&gt; and Zap JSON logging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ops Ready:&lt;/strong&gt; Pre-configured PostgreSQL, Redis, and &lt;code&gt;golang-migrate&lt;/code&gt; support.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Goforge? (The Architectural Perspective)
&lt;/h2&gt;

&lt;p&gt;In the Go community, there is a constant debate between "Standard Library" purists and "Framework" users. While the standard library is powerful, modern cloud-native development requires significant "plumbing."&lt;/p&gt;

&lt;p&gt;I designed Goforge to be &lt;strong&gt;opinionated where it matters&lt;/strong&gt; (Security and Observability) but &lt;strong&gt;flexible where you need it&lt;/strong&gt; (Business Logic).&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Observability is Not Optional
&lt;/h3&gt;

&lt;p&gt;In a distributed system, you can’t manage what you can’t measure. Goforge includes Kubernetes-ready &lt;code&gt;/health/live&lt;/code&gt; and &lt;code&gt;/health/ready&lt;/code&gt; endpoints out of the box.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Multi-Framework Paradox
&lt;/h3&gt;

&lt;p&gt;One of the hardest decisions is picking a framework. Goforge allows you to choose your engine while keeping the internal structure (Handlers -&amp;gt; Services -&amp;gt; Repositories) identical.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Developer Experience (DX)
&lt;/h3&gt;

&lt;p&gt;I’ve included a comprehensive &lt;code&gt;Makefile&lt;/code&gt; to ensure a "zero-config" local development experience:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make up  &lt;span class="c"&gt;# Spins up API, PostgreSQL, and Redis in Docker&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How to Get Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Option 1: Go Install (Recommended)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/viveksharma/goforge@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Option 2: Download Binary
&lt;/h3&gt;

&lt;p&gt;Download pre-built binaries from the &lt;a href="https://github.com/viveksharma/goforge/releases" rel="noopener noreferrer"&gt;Releases&lt;/a&gt; page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 3: Install from Latest Main
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/vviveksharma/Goforge-CLI.git
&lt;span class="nb"&gt;cd &lt;/span&gt;goforge
make &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs the latest development version to &lt;code&gt;$GOPATH/bin&lt;/code&gt; (usually &lt;code&gt;~/go/bin&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 4: Build from Source
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/vviveksharma/Goforge-CLI.git
&lt;span class="nb"&gt;cd &lt;/span&gt;goforge
go build &lt;span class="nt"&gt;-o&lt;/span&gt; goforge ./cmd/goforge
&lt;span class="nb"&gt;sudo mv &lt;/span&gt;goforge /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, forge your first production service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a Fiber-based API&lt;/span&gt;
goforge create payment-service &lt;span class="nt"&gt;--server&lt;/span&gt; fiber

&lt;span class="nb"&gt;cd &lt;/span&gt;payment-service
make up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Goforge is open-source and MIT licensed. I’d love for you to try it out, break it, and help me build the ultimate starting point for Go developers.&lt;/p&gt;

&lt;p&gt;Check out the repo and give it a star! ⭐&lt;br&gt;
👉 &lt;a href="https://github.com/vviveksharma/Goforge-CLI" rel="noopener noreferrer"&gt;https://github.com/vviveksharma/Goforge-CLI&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
