<?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: Dean Ward</title>
    <description>The latest articles on DEV Community by Dean Ward (@deanward).</description>
    <link>https://dev.to/deanward</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%2F468583%2F13572122-0b79-4e94-b3ab-bce209a68b1e.jpeg</url>
      <title>DEV Community: Dean Ward</title>
      <link>https://dev.to/deanward</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deanward"/>
    <language>en</language>
    <item>
      <title>I Built a CaddyFile Generator Tool in Just 8 Hours – Here’s How It Went</title>
      <dc:creator>Dean Ward</dc:creator>
      <pubDate>Wed, 08 Jan 2025 11:19:14 +0000</pubDate>
      <link>https://dev.to/deanward/i-built-a-caddyfile-generator-tool-in-just-8-hours-heres-how-it-went-50o3</link>
      <guid>https://dev.to/deanward/i-built-a-caddyfile-generator-tool-in-just-8-hours-heres-how-it-went-50o3</guid>
      <description>&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%2Ft2micb1iv67byp12eog2.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%2Ft2micb1iv67byp12eog2.png" alt="CaddyGen UI" width="800" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've been using &lt;strong&gt;Caddy&lt;/strong&gt; more and more recently for my self-hosted media server and related tools, and honestly, I’ve fallen in love with it. 🧡 Its speed, simplicity, and ease of use are amazing—everything you want from a web server.&lt;/p&gt;

&lt;p&gt;But there was one thing I wasn’t a fan of: editing &lt;strong&gt;CaddyFiles&lt;/strong&gt;. Even though they’re simpler than other config formats, I’ve never been keen on messing with config files. I wanted a UI to make generating and managing CaddyFiles easier, but after searching, I couldn’t find anything modern, maintained, or ready to use.&lt;/p&gt;

&lt;p&gt;So, I decided to build it myself.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Journey of Building CaddyGen
&lt;/h2&gt;

&lt;p&gt;Since I didn’t want to spend weeks on this project, I decided to use &lt;strong&gt;bolt.new&lt;/strong&gt;, an AI code generator I’d heard good things about. I thought, why not let AI take the wheel and see what it can do?&lt;/p&gt;

&lt;p&gt;Right from the start, bolt amazed me. I gave it an outline of what I wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;Vue-based UI&lt;/strong&gt; to manage and generate CaddyFiles.&lt;/li&gt;
&lt;li&gt;Features to &lt;strong&gt;add and remove hosts&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;config viewer&lt;/strong&gt; to preview the CaddyFile.&lt;/li&gt;
&lt;li&gt;Storage in-browser using &lt;strong&gt;localStorage&lt;/strong&gt; (so no backend required).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bolt started generating a Vue project right away and quickly added features as I prompted it. Over the course of 8 hours, I worked alongside the AI to add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Host cards&lt;/strong&gt; for managing domains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Presets&lt;/strong&gt; with badges and logos for popular configurations.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;import tool&lt;/strong&gt; for existing CaddyFiles (a feature I didn’t even think of initially).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Syntax highlighting&lt;/strong&gt; on the CaddyFile preview.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While I did have to step in occasionally to fix bugs or tweak layouts, the process was smooth and surprisingly fun. By the end, I had a working tool that did everything I wanted—and then some.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is CaddyGen?
&lt;/h2&gt;

&lt;p&gt;CaddyGen is a user-friendly web interface for generating &lt;a href="https://caddyserver.com" rel="noopener noreferrer"&gt;Caddy server&lt;/a&gt; configurations. It simplifies the process of creating reverse proxy and file server setups, with support for SSL, compression, security headers, and more.&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%2F43hp76u05txb4txhto1v.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%2F43hp76u05txb4txhto1v.png" alt="Edit Host Form" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Features&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Visual configuration builder&lt;/strong&gt; for the Caddy server.&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Reverse proxy&lt;/strong&gt; and &lt;strong&gt;file server&lt;/strong&gt; setup.&lt;/li&gt;
&lt;li&gt;📦 Pre-configured &lt;strong&gt;presets&lt;/strong&gt; for popular applications.&lt;/li&gt;
&lt;li&gt;💾 &lt;strong&gt;Local storage&lt;/strong&gt; for saving configurations.&lt;/li&gt;
&lt;li&gt;📤 &lt;strong&gt;Import/Export&lt;/strong&gt; for Caddyfiles.&lt;/li&gt;
&lt;li&gt;🛡️ Advanced &lt;strong&gt;security options&lt;/strong&gt; (CSP, rate limiting, IP filtering).&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Performance optimizations&lt;/strong&gt; (compression, caching).&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;CORS configuration&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;📁 File server options (directory listing, PHP support).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it now: &lt;a href="https://caddygen.site" rel="noopener noreferrer"&gt;caddygen.site&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Deployment Options
&lt;/h2&gt;

&lt;p&gt;You can deploy CaddyGen using Docker with ease:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Run the Pre-Built Image&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Pull the latest image from Docker Hub and run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull wardy784/caddygen:latest
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--restart&lt;/span&gt; unless-stopped &lt;span class="nt"&gt;-p&lt;/span&gt; 8189:80 wardy784/caddygen:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Run with Docker Compose&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use the following &lt;code&gt;docker-compose.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.8'&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wardy784/caddygen:latest&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8189:80"&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;caddygen&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To deploy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Access the app at &lt;code&gt;http://localhost:8189&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Launch 🚀
&lt;/h2&gt;

&lt;p&gt;Once the project was done, I deployed it to &lt;strong&gt;Netlify&lt;/strong&gt; using Bolt's built-in tools, added a custom domain, and shared it with the world. The response blew me away:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Over 60 GitHub stars in less than 24 hours&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nearly 3k users on the app at &lt;a href="https://caddygen.site" rel="noopener noreferrer"&gt;caddygen.site&lt;/a&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;50+ Docker pulls&lt;/strong&gt; of the tool’s image.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;This project taught me two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Caddy is awesome&lt;/strong&gt;—but a good UI makes it even better.&lt;/li&gt;
&lt;li&gt;AI tools like &lt;strong&gt;bolt.new&lt;/strong&gt; can speed up development and help you focus on the fun parts of coding.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What I Loved:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast bootstrapping:&lt;/strong&gt; Bolt got the project up and running in minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive AI:&lt;/strong&gt; It generated code quickly and adapted well to my prompts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LocalStorage integration:&lt;/strong&gt; Handling data in-browser was seamless.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Netlify deployment:&lt;/strong&gt; With just a click, I deployed the app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What Could Be Better:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UI glitches:&lt;/strong&gt; Occasionally, the editor got stuck, leaving the code in a half-edited state that broke the build.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layout fine-tuning:&lt;/strong&gt; Small details like aligning buttons or tweaking forms required manual fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incomplete changes:&lt;/strong&gt; Sometimes the AI claimed to have made edits that weren’t reflected in the code.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;The project is far from perfect—there are some weird choices the AI made, and plenty of &lt;strong&gt;TypeScript issues&lt;/strong&gt; I need to fix. But I’m already planning new features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding more &lt;strong&gt;presets&lt;/strong&gt; and &lt;strong&gt;options&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Improving the UI to make it even more intuitive.&lt;/li&gt;
&lt;li&gt;Expanding the tool’s functionality based on user feedback.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Yourself!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Live Demo: &lt;a href="https://caddygen.site" rel="noopener noreferrer"&gt;caddygen.site&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub Repository: &lt;a href="https://github.com/DeanWard/CaddyGen" rel="noopener noreferrer"&gt;DeanWard/CaddyGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know what you think—and feel free to suggest new features or improvements! 😊&lt;/p&gt;

</description>
      <category>caddy</category>
      <category>vite</category>
      <category>vue</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
