<?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: Mark Holton</title>
    <description>The latest articles on DEV Community by Mark Holton (@mark_holton).</description>
    <link>https://dev.to/mark_holton</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2497703%2Fae4c4c7f-9d4b-44d3-9f7f-e68746f8251f.png</url>
      <title>DEV Community: Mark Holton</title>
      <link>https://dev.to/mark_holton</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mark_holton"/>
    <language>en</language>
    <item>
      <title>The Foreman Carries No Tools: Sub-Agents and Separation of Concerns</title>
      <dc:creator>Mark Holton</dc:creator>
      <pubDate>Fri, 27 Nov 2026 18:17:54 +0000</pubDate>
      <link>https://dev.to/mark_holton/the-foreman-carries-no-tools-sub-agents-and-separation-of-concerns-2m5</link>
      <guid>https://dev.to/mark_holton/the-foreman-carries-no-tools-sub-agents-and-separation-of-concerns-2m5</guid>
      <description>&lt;p&gt;Why split one agent that can do everything into five narrower ones? Because the one that does everything is the hardest to evaluate. I want my agents to do more on their own, with each making decisions within a clearly defined scope of responsibility.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F79wxa4a02aj4watw42d4.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F79wxa4a02aj4watw42d4.jpg" alt="A robot foreman in a yellow hard hat hands out a task card while specialist robots study books, write, and check documents at separate workbenches. A human reviews the results at a desk marked &amp;quot;Final Approval.&amp;quot;" width="799" height="519"&gt;&lt;/a&gt;&lt;/p&gt;
The foreman delegates. The specialists do the work. A person approves the result or guides the next iteration.



&lt;p&gt;That means separating who does the work from who chooses what happens next. Automate what can be checked. Let the model decide when the criteria are clear. Hand it to a person when they aren't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The idea I'll keep coming back to: the foreman carries no tools.&lt;/strong&gt; The coordinator only decides who works next. Each crew member holds only the tools for their own job, and a person signs off at the end.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjivgu2nngrg7yw5jfb4a.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjivgu2nngrg7yw5jfb4a.png" alt="A large builder with no tools hands one orange task card to a smaller crew member, while two other crew members work at their own benches, one with a magnifying glass and one with a pencil." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
The foreman hands out the work. The crew holds the tools.



&lt;h2&gt;
  
  
  Why not one big agent?
&lt;/h2&gt;

&lt;p&gt;You could give one agent web search, file access, writing and review, and tell it to get on with it. Claude Code supports both doing that work in the main session and delegating to sub-agents. For the systems I’m describing here, I wanted to make the division of responsibilities explicit: the coordinator chooses who works next, and each specialist gets the tools its job requires. That’s a workflow choice you can implement in Claude Code too.&lt;/p&gt;

&lt;p&gt;But when one agent researches, writes the notes and judges its own work, those responsibilities are harder to evaluate independently. When something is wrong, it takes more effort to trace where it went wrong. Splitting the work gives each job a defined input, an output and criteria you can test. Those measurements help you decide how much autonomy to give it.&lt;sup id="fnref1"&gt;1&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;I have been building and architecting agents for the last few years, at my day job and in personal projects. Before that I was an Architect at Salesforce, where I &lt;a href="https://engineering.salesforce.com/building-a-scalable-event-pipeline-with-heroku-and-salesforce-2549cb20ce06/" rel="noopener noreferrer"&gt;architected and built&lt;/a&gt; &lt;a href="https://engineering.salesforce.com/building-a-fault-tolerant-data-pipeline-for-chatbots-47d74bc31f5b/" rel="noopener noreferrer"&gt;data pipelines&lt;/a&gt; for Desk.com, Einstein Bots and Agentforce. Agentic workflows are a natural progression of that work, and I love the learning that extends my background in distributed systems. What I enjoy is the detail: what works, what doesn't, and where the line sits between the system's decisions and mine.&lt;/p&gt;

&lt;p&gt;This post comes from two perspectives. The reference system, the one I built for my Improving Stage 5 AI Certification, is built with Pydantic AI. And the agents that produced this blog post run from "FactoryHolton", a &lt;a href="https://v2.tauri.app/" rel="noopener noreferrer"&gt;Tauri&lt;/a&gt; app I built that starts Claude Code agents from a plugin I wrote. From those perspectives I'll share what I have learned, and anchor it in Anthropic's Claude Academy courses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three stages moved the control flow from my code to a model
&lt;/h2&gt;

&lt;p&gt;Improving, where I work these days, has &lt;a href="https://lnkd.in/p/e3N9UzC9" rel="noopener noreferrer"&gt;internal stages&lt;/a&gt; for evaluating a person's capability in building and architecting AI systems. Three matter for this post, and the last two are two answers to the question: &lt;em&gt;who decides what runs next?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 3 is prompt evaluations.&lt;/strong&gt; You measure a prompt with evals. That matters because LLM outputs are probabilistic, and evals are how you make them more confined and predictable, for an acceptable percentage of the time, with the models being used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 4 is a sequential workflow on the rails.&lt;/strong&gt; Stages run in a fixed order, with something like Temporal between them and data passed from one stage to the next. You can still have human-in-the-loop punch-outs, but the path is basically sequential. I built something like this for a startup in the past.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 5 is a coordinator (orchestrator) over sub-agents.&lt;/strong&gt; The coordinator does not have the tools the sub-agents have. Each sub-agent has a role, a confined set of tools, a goal and a data interchange format. The coordinator reads what comes back and "decides" where to go next. There is no preconfigured path, only a means to an end that the coordinator judges.&lt;/p&gt;

&lt;p&gt;The shift from 4 to 5 is who owns the control flow. In Stage 4 my code does. In Stage 5 a model does, inside limits my code enforces. Stage 5 isn't simply the better one. It earns its place when the next step depends on what came back, and the rails earn theirs when it doesn't.&lt;sup id="fnref2"&gt;2&lt;/sup&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A sub-agent is a crew member with one job and one toolbox
&lt;/h2&gt;

&lt;p&gt;Four things define a sub-agent in my design. It has a &lt;strong&gt;role&lt;/strong&gt;, which is one job: researching, drafting, or "adversarial review". It has a &lt;strong&gt;scoped set of tools&lt;/strong&gt;, only what that job needs.&lt;sup id="fnref3"&gt;3&lt;/sup&gt; It has a &lt;strong&gt;goal&lt;/strong&gt;, which says what done looks like. And it has a &lt;strong&gt;data interchange format&lt;/strong&gt;, a typed output, so whoever runs it next receives something checkable instead of free text.&lt;/p&gt;

&lt;p&gt;The crew is the same whether it is &lt;em&gt;on the sequential rails&lt;/em&gt; or directed under a foreman. What changes is who reads the output. On the rails, code passes it to the next stage. Under a foreman, a coordinator defined by what it lacks reads it: it can launch sub-agents and nothing else. It can't search the web, read files or sign anything off.&lt;/p&gt;

&lt;h2&gt;
  
  
  The study-pack system puts a foreman, a rulebook, a crew and a person in one loop
&lt;/h2&gt;

&lt;p&gt;For my Improving Stage 5 submission I built a system that produces study material for the Claude Certified Architect – Foundations exam (CCAR-F): grounded notes and original practice questions for each exam objective. The framing is building a set of materials to learn a topic, and anchoring it in a source of truth; in this case the Claude Certified Architect – Foundations objectives are the source of truth. A person reviews and signs off on the material.&lt;/p&gt;

&lt;p&gt;This one needs a foreman, because the next step really does depend on what comes back: a review that raises a critical challenge sends work back for revision, and a clean one lets it move on.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fivqfjjq6wwlkfubaxr12.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fivqfjjq6wwlkfubaxr12.png" alt="Diagram 1" width="800" height="1064"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The coordinator governs and does no work.&lt;/strong&gt; Its only tools are five &lt;code&gt;launch_*&lt;/code&gt; functions. It reads each result and picks the next dispatch. When the reviewer raises a critical challenge, it revises the challenged artifact and has it reviewed again. A test checks that the coordinator's bound tools are exactly the &lt;code&gt;launch_*&lt;/code&gt; set, and that a manifest declaring a work tool is refused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The harness is plain code, with no model in it.&lt;/strong&gt; It sits between the coordinator and every sub-agent. Each sub-agent returns a typed output (a Pydantic model), and the harness validates it before the coordinator sees anything. It also writes the files itself, refuses out-of-order or stale work, and records every step with tokens, cost and the session's correlation ID. The coordinator gets either a validated result or a structured error, and never unchecked prose.&lt;sup id="fnref4"&gt;4&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Each sub-agent holds only its own tools.&lt;/strong&gt; Each agent is built from a manifest in &lt;code&gt;agents/&lt;/code&gt; with only the tools it declares.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sub-agent&lt;/th&gt;
&lt;th&gt;Tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Researcher&lt;/td&gt;
&lt;td&gt;&lt;code&gt;web_search&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Notes writer&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Question writer&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adversarial reviewer&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;read_file&lt;/code&gt;, in its own context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Final review writer&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Table 1: Tools given to each sub-agent.&lt;/em&gt; The writers have no tools at all, not even one to save their work. Each returns a typed result, and the harness, plain code with no model, validates it and writes the file. A sub-agent can't put anything on disk that hasn't passed its schema.&lt;/p&gt;

&lt;p&gt;The reviewer runs in a fresh context each time, with no shared history. It reads the session's files and checks claims against their sources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;People decide at the checkpoints.&lt;/strong&gt; The coordinator chooses who works next, but it can't approve anything. The substance decision and the sign-off are a person's commands, recorded with their identity. Every session elevates to a person by design. At that point the person eliminates the ambiguity and provides direction, much like an attentive supervisor would.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs8a02i185j2zg8pirhh4.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs8a02i185j2zg8pirhh4.png" alt="The foreman holds up one orange card to a person, who settles what the system couldn't and gives it direction, like an attentive supervisor." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
At the punch-out, the foreman asks. A person removes the ambiguity and points the way, like an attentive supervisor.



&lt;h2&gt;
  
  
  Evaluations measure the output of agent skills and the final result
&lt;/h2&gt;

&lt;p&gt;Evaluations measure each sub-agent's output against criteria in the goal, the coordinator's decisions against scripted results, the reviewer's catch rate on planted defects, and whether the whole system completes a session end to end (3 of 3 live Domain 1 sessions). They also measure LLM cost for a given model used.&lt;/p&gt;

&lt;p&gt;These figures come from my own evals and sessions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All 3 live sessions reached the human checkpoint with every task statement complete and a reviewed final review, with no manual correction.&lt;/li&gt;
&lt;li&gt;One full session made 63 dispatches, with 13 coordinator-directed revisions, and cost $0.32.&lt;/li&gt;
&lt;li&gt;The coordinator eval scored 24/24 against scripted sub-agent results.&lt;sup id="fnref5"&gt;5&lt;/sup&gt;
&lt;/li&gt;
&lt;li&gt;The adversarial reviewer caught planted defects 178/180 times, with clean twins to check it doesn't raise false alarms.&lt;/li&gt;
&lt;li&gt;Prompt caching cut the coordinator eval's cost from $0.169 to $0.053 with the same 24/24.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The comparison case: Claude subagents as the "crew" behind reviewing my blog posts
&lt;/h2&gt;

&lt;p&gt;To compare my Pydantic-based agents to Claude subagents, I built some Claude subagents for adversarial reviews for my blog posts. The agents that helped produced this post are invoked from an app I built for my own use, which I call FactoryHolton. It has a Mac app and an Android app where I can assemble my raw notes and start to craft a draft of a post.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo1ecj1rya7xl3mfik6m2.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo1ecj1rya7xl3mfik6m2.png" alt="Tauri app I built which I call “Factory H” which combines the interfaces I like with agents I evolve to improve productivity" width="799" height="349"&gt;&lt;/a&gt;&lt;/p&gt;
My sub-agents keeping me on task with the goals after adversarial review. "ASK MARK" questions review for accuracy, clarity, and other factors



&lt;p&gt;The Tauri app reaches Claude through Claude Code itself, not the API. Every stage goes through a small Python script, &lt;code&gt;run-stage&lt;/code&gt;, which starts &lt;a href="https://code.claude.com/docs/en/headless" rel="noopener noreferrer"&gt;Claude Code headless&lt;/a&gt; (&lt;code&gt;claude -p&lt;/code&gt;) once per stage, as a named agent from a plugin I wrote: &lt;code&gt;factory-h:writer&lt;/code&gt;, &lt;code&gt;factory-h:critic&lt;/code&gt;, &lt;code&gt;factory-h:editor&lt;/code&gt;. Each run can only read and write inside that piece's work folder, and the script, not the agent, records what each stage produced. The Android app never calls Claude: it captures links and notes and syncs them to the Mac, which runs the "writer", "critic", "editor" agents.&lt;/p&gt;

&lt;p&gt;The app copies my plugin into the writing workspace.&lt;sup id="fnref6"&gt;6&lt;/sup&gt; A small Python script, &lt;code&gt;run-stage&lt;/code&gt;, then launches each specialist as a separate headless Claude Code session using &lt;code&gt;claude -p --plugin-dir … --agent factory-h:&amp;lt;role&amp;gt;&lt;/code&gt;. These are supported CLI options: the plugin loads for that run without a separate installation step. Either my app or an orchestrator session decides the sequence; Claude Code runs each specialist. The plugin itself looks like this:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;factory-h/
├── .claude-plugin/plugin.json   name "factory-h", version 1.0.0
├── agents/                      the crew: one Markdown file each
│   ├── writer.md   critic.md   editor.md
│   ├── angles.md                proposes angles for a piece
│   └── categorizer.md           sorts captures into projects
└── skills/                      shared know-how the agents load
    ├── marks-voice/             my 12 voice rules
    ├── evidence-and-attribution/
    ├── hugo-format/             front matter, figures, Mermaid, tables
    ├── geometric-builder/       the figure style and its reference sheet
    ├── editorial-review/        the critic's criteria
    └── project-matching/        for the categorizer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;The &lt;code&gt;factory-h&lt;/code&gt; plugin: the agents are the crew, and the skills are the know-how they share.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Each file in &lt;code&gt;agents/&lt;/code&gt; is a sub-agent definition, and its frontmatter is where the tools go into the crew member's hands. Here is the editor's, for example:&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;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;editor&lt;/span&gt;
&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Read, Write, Glob&lt;/span&gt;
&lt;span class="na"&gt;skills&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;marks-voice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;evidence-and-attribution&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;hugo-format&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;geometric-builder&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;editor-5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The editor can read, write and find files, and that is all: no shell and no web search. It loads four of the shared skills, so it edits in my voice, keeps claims tied to their sources, and writes valid Hugo. The critic loads &lt;code&gt;editorial-review&lt;/code&gt; and &lt;code&gt;evidence-and-attribution&lt;/code&gt; but not my voice rules, so the one judging the draft works from review criteria, not from the instructions the editor writes by.&lt;/p&gt;

&lt;p&gt;Who decides which stage runs next depends on how I start it. When I run &lt;code&gt;/draft&lt;/code&gt; in Claude Code, an orchestrator session decides: it runs the writer, reads the critic's verdict, and chooses whether the editor runs again, at most two rounds, stopping early if the critic raises a question only I can answer. That's the Stage 5 shape, a foreman with no tools deciding from what comes back. When I press a "Revise" button in my Tauri app, nothing decides: the app runs a fixed sequence (open a cycle, run the editor with my comments, offer the new draft for review), which is Stage 4 and what I want there, because my comments already say what should happen. Either way, every run ends at review, and only I approve and publish.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foeb9ixx5nod60azjzfeb.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foeb9ixx5nod60azjzfeb.png" alt="Diagram 2" width="800" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Running it has taught me four things about delegating to Claude agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The foreman's empty hands are a setting, not a request.&lt;/strong&gt; The orchestrator's permissions deny Write and Edit, and the only command it may run is the stage script. That's the foreman with no tools, enforced by configuration rather than by asking nicely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stamp every agent with a version.&lt;/strong&gt; Each stage records its agent's version and a hash of its skills. When a revision came back in the old style, the manifest showed at a glance that editor-2 had run instead of editor-4: the app I was running still carried the old skills.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The editor does exactly what it's told, and no more.&lt;/strong&gt; It's instructed to keep what works, so comments on single passages got single-passage fixes. To restyle the whole piece, I had to say so in one general note.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check what comes back before it counts.&lt;/strong&gt; A stage only counts once its output exists and is hashed into the manifest, and a figure has to pass an allowlist (no scripts or links in the SVG), or the stage fails outright. That is FactoryHolton's rulebook on the handback, the one Claude Code leaves to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing my Pydantic AI agents with Claude Code sub-agents
&lt;/h2&gt;

&lt;p&gt;How does the crew I built with Pydantic AI compare with Claude Code’s sub-agents? Start with where they work: each Claude Code sub-agent gets its own context window and reports back to the parent with a summary.&lt;/p&gt;

&lt;p&gt;Anthropic's subagents start from a different focus than responsibility: context. Every tool call, file read and search result in a Claude Code chat lands in the main context window, which is finite, and once it fills up Claude starts losing track of earlier parts of the conversation.&lt;/p&gt;

&lt;p&gt;A sub-agent gets its own context window. It starts with two things: a custom system prompt from its configuration file, which defines its role and behaviour, and a task description written by the parent agent. It then works on its own, reading files, running searches or editing code, and when it's done only a summary comes back to the main conversation. Claude Code keeps the rest in a separate transcript file.&lt;/p&gt;

&lt;p&gt;Anthropic's &lt;a href="https://academy.claude.com/courses/introduction-to-subagents" rel="noopener noreferrer"&gt;Introduction to subagents course&lt;/a&gt; uses an example: finding which service handles refunds in an unfamiliar codebase. Without a sub-agent, Claude might read 15 files and run several searches, all of it filling your context when you needed one fact. With the built-in Explore sub-agent, your main context records only the question and the summary.&lt;/p&gt;

&lt;p&gt;Claude Code ships with built-in sub-agents (General purpose, for multi-step tasks that need exploration and action; Explore, for fast codebase search; and Plan, used in plan mode), and you can write custom ones with their own system prompts and tool access: a code reviewer, a test writer, a documentation generator.&lt;sup id="fnref7"&gt;7&lt;/sup&gt; If you'd rather watch than read, Anthropic's official video &lt;a href="https://www.youtube.com/embed/jKErNxuxPXg" rel="noopener noreferrer"&gt;What are subagents?&lt;/a&gt; introduces them.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Claude Code "crew" member is one Markdown file
&lt;/h2&gt;

&lt;p&gt;A Claude Code sub-agent is a Markdown file with YAML frontmatter, and the body of the file is the sub-agent's system prompt. Where you put the file decides who gets that crew member:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;th&gt;Where the definition lives&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Managed (organization)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.claude/agents/&lt;/code&gt; in the managed settings directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CLI flag&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--agents '&amp;lt;json&amp;gt;'&lt;/code&gt; at launch, not saved to disk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.claude/agents/&lt;/code&gt;, searched from the working directory up to the repo root; the nearest wins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/.claude/agents/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plugin&lt;/td&gt;
&lt;td&gt;the plugin's &lt;code&gt;agents/&lt;/code&gt; directory; names become &lt;code&gt;plugin-name:agent&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That is close to my &lt;code&gt;agents/&lt;/code&gt; manifests: one file per crew member, with its prompt and its tools. The difference shows up at the foreman, at the dispatch and at the handback.&lt;/p&gt;

&lt;p&gt;Here is the same comparison, one dimension at a time.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;My Stage 5 build&lt;/th&gt;
&lt;th&gt;Claude Code sub-agents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Role&lt;/td&gt;
&lt;td&gt;a manifest per agent, with a skill as its prompt&lt;/td&gt;
&lt;td&gt;a Markdown file with YAML frontmatter; the body is the system prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool scoping&lt;/td&gt;
&lt;td&gt;built with only its declared tools&lt;/td&gt;
&lt;td&gt;custom sub-agents are configured with their own tool access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coordinator without work tools&lt;/td&gt;
&lt;td&gt;enforced by a test; manifests that declare work tools are refused&lt;/td&gt;
&lt;td&gt;possible by configuration (&lt;code&gt;tools&lt;/code&gt; limited to &lt;code&gt;Agent(...)&lt;/code&gt;, or &lt;code&gt;--tools Agent&lt;/code&gt;); nothing tests it for you&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who delegates&lt;/td&gt;
&lt;td&gt;the coordinator decides; the harness gates every dispatch&lt;/td&gt;
&lt;td&gt;the parent decides, prompted by each sub-agent's description (much as a Skill's description routes a prompt to it), or a person asks for one by name; the parent writes the task prompt; nothing gates it by default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context isolation&lt;/td&gt;
&lt;td&gt;the reviewer runs fresh, no shared history&lt;/td&gt;
&lt;td&gt;a separate context window, seeded with its system prompt and the parent's task description&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What comes back&lt;/td&gt;
&lt;td&gt;a Pydantic model, validated by the harness&lt;/td&gt;
&lt;td&gt;a free-text summary; the full run goes to a separate transcript; nothing validates it by default&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two designs share the first of the course's benefits, breaking work into focused pieces. Where they differ is what each one is protecting. Claude Code's sub-agents protect the main context: you get the answer "without all the noise of the journey it took to find it". My harness protects the decision: the coordinator sees only checked, typed output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Claude's sub-agents differ from my build
&lt;/h2&gt;

&lt;p&gt;Can the main Claude Code agent be a foreman with no tools? Yes, by configuration. You run the main thread as an agent definition whose &lt;code&gt;tools&lt;/code&gt; is only &lt;code&gt;Agent(...)&lt;/code&gt;, with &lt;code&gt;claude --agent coordinator&lt;/code&gt;, or you start with &lt;code&gt;--tools Agent&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Two things work differently from my build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude's sub-agents themselves can delegate too.&lt;/strong&gt; By default a sub-agent gets the same &lt;code&gt;Agent&lt;/code&gt; tool the main session uses to hand out work, so it can start sub-agents of its own, up to three levels deep. In foreman terms, a crew member can hire their own crew. That's useful when a task really does split further, but it means the foreman no longer sees every hand-off. If you want a flat crew, take the tool away: leave &lt;code&gt;Agent&lt;/code&gt; out of each sub-agent's &lt;code&gt;tools&lt;/code&gt; list (or add it to &lt;code&gt;disallowedTools&lt;/code&gt;), or turn nesting off everywhere by setting &lt;code&gt;CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH&lt;/code&gt; to 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test the foreman's boundaries.&lt;/strong&gt; In my Stage 5 build, a test fails if the coordinator holds anything but its &lt;code&gt;launch_*&lt;/code&gt; tools. Claude Code enforces tool and permission restrictions, but you still need to check that your configuration matches your intended design. Assert the allowed tools in a configuration test, then verify in a scratch run that delegation works and direct work is blocked.&lt;sup id="fnref8"&gt;8&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The dispatch works the same way. In Claude Code the parent decides when to delegate, prompted by each sub-agent's description (similar to how a description in a Skill's front matter routes a prompt to it), or a person asks for a sub-agent by name, and either way the parent writes the task prompt. Nothing stands between that decision and the sub-agent by default. If you want a gate like my harness's refusals of out-of-order or stale work, a &lt;code&gt;PreToolUse&lt;/code&gt; &lt;a href="https://code.claude.com/docs/en/hooks" rel="noopener noreferrer"&gt;hook&lt;/a&gt; on &lt;code&gt;Agent&lt;/code&gt; is where it goes.&lt;/p&gt;

&lt;p&gt;The handback is the same story. The course names the tradeoff plainly: your main conversation "doesn't see how the subagent reached its conclusions." What comes back is a summary as free text, and nothing validates it by default. I think that is exactly where the foreman needs a rulebook, and you have three places to put one: a schema check in a &lt;code&gt;SubagentStop&lt;/code&gt; or &lt;code&gt;PostToolUse&lt;/code&gt; hook, a file the sub-agent writes that you then validate, or an evaluation of the saved transcripts afterwards. My Stage 5 harness does the first of these for every typed output, and my reviewer checks claims against their sources. FactoryHolton, the app behind this post, leans on the second, as its section above shows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the crew on a subscription
&lt;/h2&gt;

&lt;p&gt;A side benefit of how I structured FactoryHolton, and not an accidental one, is that it runs on my Claude subscription (Pro or Max). The Tauri app never calls the API: it drives Claude Code, signed in with my Claude account. Whichever way a stage starts, it goes through &lt;code&gt;run-stage&lt;/code&gt;, which first checks that Claude Code is signed in with a subscription and removes any &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; from the environment, so nothing falls back to API billing. It's Claude Code's own headless mode, plugins and agents, run on my machine as me.&lt;/p&gt;

&lt;p&gt;Claude Code still estimates each run at API prices, which makes a useful yardstick. When I measured it, this post's history (the writer, the critic and six editor rounds) came to about $3 API-equivalent, and an Opus round cost about twice a Sonnet one.&lt;/p&gt;

&lt;p&gt;If a run hits my plan's usage limit, it stops with an error and I run it again later.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to take from the foreman
&lt;/h2&gt;

&lt;p&gt;If you build one of these, start with what the foreman can't do.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give every sub-agent's job an eval. If a sub-agent does several things, eval each one on its own: my reviewer had four lenses, and each had its own planted-defect cases. LLM outputs are probabilistic, so you can't assume a prompt works because it worked once. Name the criteria, run each case several times, and change the prompt until it passes often enough for the model you use.&lt;/li&gt;
&lt;li&gt;Give the coordinator no work tools, and test that it has none. In Claude Code, limit the main thread to &lt;code&gt;Agent(...)&lt;/code&gt;, or deny Write and Edit in its permissions, and write that test yourself, because nothing runs it for you.&lt;/li&gt;
&lt;li&gt;Ask whether the foreman has anything to decide. If the next step depends on what comes back, use a coordinator. If the instructions already say what should happen, run a fixed sequence and keep the model out of the control flow.&lt;/li&gt;
&lt;li&gt;Put a no-model harness between the coordinator and every sub-agent, and have it validate typed output before anything reaches the coordinator.&lt;/li&gt;
&lt;li&gt;Check each hand-off before it starts, not only the results after. If the coordinator asks for notes before the research is done, refuse the request instead of reviewing bad notes later. In Claude Code, a &lt;code&gt;PreToolUse&lt;/code&gt; hook on the &lt;code&gt;Agent&lt;/code&gt; tool can block a delegation before it starts; nothing gates by default.&lt;/li&gt;
&lt;li&gt;Scope each sub-agent's tools to its job, and run the reviewer in its own context. In Claude Code, if you want a flat crew, leave &lt;code&gt;Agent&lt;/code&gt; out of sub-agents' tools (or add it to &lt;code&gt;disallowedTools&lt;/code&gt;), or set &lt;code&gt;CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH&lt;/code&gt; to 1.&lt;/li&gt;
&lt;li&gt;Stamp every agent with a version and a hash of its skills, so you can tell which crew member actually ran.&lt;/li&gt;
&lt;li&gt;Decide where a person signs off, and make it a command the coordinator can't issue. Put the stop in the same place on the rails and under the foreman.&lt;/li&gt;
&lt;li&gt;As you are building and exploring, test so you can see your loop catch bad outputs. Stage a failure on purpose (a planted bad key, an invalid output), so you've seen the loop catch it.&lt;/li&gt;
&lt;li&gt;If you use Claude's sub-agents, treat the free-text summary as the boundary to check: a hook, a file you validate, or an eval over the transcripts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the opening idea in practice, whether the crew is built in Pydantic AI or runs in Claude Code. The one agent that does everything is hard to evaluate, so split the work, take the tools off the foreman, check what the crew hands back, and keep the decisions that can't be checked for a person.&lt;/p&gt;

&lt;p&gt;What I plan to work on some more is how to evaluate the foreman as well as I can evaluate the crew. Every sub-agent here has evals; the decisions between them mostly have my judgement.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to talk about next?
&lt;/h2&gt;

&lt;p&gt;Graphs. Using graph tools like pydantic-graph or LangGraph in agentic workflows, and where they can help. A foreman with no preconfigured path still works inside routes, and graphs are one way to say which routes are allowed, somewhere between the rails and a free hand. That's a post of its own.&lt;/p&gt;

&lt;p&gt;Tauri v2. FactoryHolton is one Tauri v2 codebase that builds both my Mac app and my Android app, with nothing to host: the phone syncs captures to the Mac, and the Mac runs the agents. That makes it a quick place to iterate and to explore ideas like the ones in this post. Why I chose Tauri, and what building for both platforms has been like, is outside the scope of this post, and a candidate for another.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://lnkd.in/p/e3N9UzC9" rel="noopener noreferrer"&gt;Improving mention on LinkedIn&lt;/a&gt;: Improving's internal stages.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://academy.claude.com/courses/introduction-to-subagents" rel="noopener noreferrer"&gt;Introduction to subagents (Anthropic Academy course)&lt;/a&gt;: why Claude Code sub-agents exist (context), what a sub-agent starts with and returns, the refunds example, the built-in sub-agents, custom sub-agents, and the tradeoff quote.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://engineering.salesforce.com/building-a-scalable-event-pipeline-with-heroku-and-salesforce-2549cb20ce06/" rel="noopener noreferrer"&gt;Building a scalable event pipeline with Heroku and Salesforce (Salesforce Engineering)&lt;/a&gt;: Mark's data pipeline work at Salesforce.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://engineering.salesforce.com/building-a-fault-tolerant-data-pipeline-for-chatbots-47d74bc31f5b/" rel="noopener noreferrer"&gt;Building a fault-tolerant data pipeline for chatbots (Salesforce Engineering)&lt;/a&gt;: Mark's data pipeline work at Salesforce.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/embed/jKErNxuxPXg" rel="noopener noreferrer"&gt;What are subagents? (Anthropic, official video)&lt;/a&gt;: an introduction to sub-agents.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.claude.com/docs/en/hooks" rel="noopener noreferrer"&gt;Hooks (Claude Code docs)&lt;/a&gt;: &lt;code&gt;PreToolUse&lt;/code&gt; on &lt;code&gt;Agent&lt;/code&gt; as a place to gate a dispatch, and &lt;code&gt;SubagentStop&lt;/code&gt; and &lt;code&gt;PostToolUse&lt;/code&gt; hooks as a place to validate what a sub-agent returns.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.claude.com/docs/en/headless" rel="noopener noreferrer"&gt;Headless mode (Claude Code docs)&lt;/a&gt;: running Claude Code non-interactively with &lt;code&gt;claude -p&lt;/code&gt;, which FactoryHolton uses for each stage.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://holtonma.github.io/posts/claude-sub-agents/" rel="noopener noreferrer"&gt;https://holtonma.github.io/posts/claude-sub-agents/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;Separate agents don’t guarantee better results. The benefit is clearer responsibilities and independently testable outputs. Each specialist still makes decisions within its role; the coordinator decides who works next.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;A small celebration 🎉: I was the 4th person at Improving, out of 2000+, to earn the Stage 5 certification, and the first in the Improving Atlanta enterprise. I'm grateful to work where we positively challenge each other, and where the culture makes room to practice and learn.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;"Only what that job needs" can mean nothing. In my build, the notes writer, question writer and final review writer have no tools, not even one to save their work. They return a typed result, and plain code checks it and writes the file. A writer that can't touch the disk can't put an unchecked file there.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;Building this with the Pydantic AI framework helped me understand the mechanics of delegation, validation and tool boundaries firsthand. Later in this post, I compare those choices with some of what Claude Code provides through its agent configuration, CLI and hooks.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn5"&gt;
&lt;p&gt;The sub-agents in this eval are scripted stand-ins that make no model calls, so the right response is known in advance and only the coordinator, a live model, is under test. It covers eight scenarios, run three times each: a clean run, minor challenges only, a critical challenge, a challenged final review, a major challenge that survives one revision, invalid output, an infrastructure error, and a human checkpoint. To pass, it has to revise only what was challenged and send it back for review, retry invalid output once, stop on infrastructure errors and at the checkpoint, and leave minor challenges alone.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn6"&gt;
&lt;p&gt;The Tauri app never hands the plugin to Claude Code directly. It puts the files where Claude Code can find them, and the script tells Claude Code where to look.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn7"&gt;
&lt;p&gt;In Claude Code, configuration controls delegation. A deny rule such as &lt;code&gt;Agent(Explore)&lt;/code&gt; blocks that sub-agent. For an agent running as the main thread, &lt;code&gt;tools: Agent(worker, researcher)&lt;/code&gt; permits only those two sub-agent types. An explicit tool list without &lt;code&gt;Agent&lt;/code&gt; prevents spawning sub-agents through that tool. In FactoryHolton, the editorial specialists run with only &lt;code&gt;Read&lt;/code&gt;, &lt;code&gt;Write&lt;/code&gt; and &lt;code&gt;Glob&lt;/code&gt;, so they cannot spawn built-in or custom sub-agents.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn8"&gt;
&lt;p&gt;For FactoryHolton that would be two checks: a test that reads the orchestrator's &lt;code&gt;.claude/settings.json&lt;/code&gt; and fails unless it may run only &lt;code&gt;./run-stage&lt;/code&gt; and &lt;code&gt;Read&lt;/code&gt;, with &lt;code&gt;Write&lt;/code&gt; and &lt;code&gt;Edit&lt;/code&gt; denied, and a scratch headless run that asks it to edit a draft directly and confirms nothing changed.&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>subagents</category>
      <category>claude</category>
    </item>
    <item>
      <title>Curiosity and Craft: What Drives Me to Build</title>
      <dc:creator>Mark Holton</dc:creator>
      <pubDate>Sat, 16 Aug 2025 18:19:42 +0000</pubDate>
      <link>https://dev.to/mark_holton/curiosity-and-craft-what-drives-me-to-build-3814</link>
      <guid>https://dev.to/mark_holton/curiosity-and-craft-what-drives-me-to-build-3814</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://holtonma.github.io/posts/curiosity-and-craft/" rel="noopener noreferrer"&gt;holtonma.github.io&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Curiosity and Craft
&lt;/h2&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%2Fhls693ozcepoz2xg6j44.jpg" 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%2Fhls693ozcepoz2xg6j44.jpg" alt="Whimsical illustration of a home AI laboratory with servers, containers, and neural networks" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Exercising those muscles of grit and resiliency that are essential to improving at our craft&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I've been thinking about what drives me to build things. It is curiosity and craftsmanship. Those two things have been consistent throughout my career and life - from LabView as a Physics undergrad, to many different languages and technologies, to Rails web applications, to data pipelines to now LLM-based architectures.  Even &lt;a href="https://www.ihsa.org/data/gob/records/ybych1.htm" rel="noopener noreferrer"&gt;golf on the driving range as a kid&lt;/a&gt;, tinkering with clubs, swing changes. Trying to constantly improve and understand the fundamentals, and then put them to test.&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%2F73zra89m726o5axxdv3h.jpg" 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%2F73zra89m726o5axxdv3h.jpg" alt="Junior golf days - competing for a State Championship" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Early days, decades ago, putting self to the test in tournaments - after work and tinkering with fundamentals and constantly trying to improve&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  "Home AI Pipeline Lab" Setup
&lt;/h2&gt;

&lt;p&gt;I am setting up this AI lab wired into my home network. I just finished configuring a small machine with 96GB RAM and running Proxmox with LXC containers. I am in the process on the weekends of a list of items like setting up an Nginx container, another container with the &lt;a href="https://holtonma.github.io/posts/self-hosting-rails-cloudflare-tunnels/" rel="noopener noreferrer"&gt;Cloudflare tunnel&lt;/a&gt;, and all the necessary DNS, etc.  &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%2Fzyocogzkgr84arg6wd4b.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%2Fzyocogzkgr84arg6wd4b.png" alt="ASRock machine setup for home AI lab" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Clean ASRock setup with 96GB RAM ready for Proxmox containers and local AI models&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Then add a dedicated DB and Redis containers, an &lt;a href="https://ollama.com/search" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; container or two for serving local models, and have Nginx proxy to my web apps that use them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Web App and RAG Home Infrastructure
├── nginx-proxy (reverse proxy, SSL)
├── PostgreSQL + Redis (data layer)  
├── FastAPI backend (app API)
├── Ollama 70B (free tier recommendations)
└── Claude API integration (premium tier)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;General architecture for applications running on my home lab infrastructure&lt;/em&gt;&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%2F8d9h7cqflxhkda0o17zt.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%2F8d9h7cqflxhkda0o17zt.png" alt="Ollama downloading models for local inference" width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ollama pulling down language models for local experimentation&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once the models are downloaded, I can start testing them with simple API calls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST http://192.168.50.101:11434/api/generate \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "model": "llama3.1:70b-instruct-q4_0",
    "prompt": "One TV show like Succession:",
    "stream": true
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Testing the local Llama 3.1 70B model with a simple recommendation query&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And here's the response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"llama3.1:70b-instruct-q4_0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"created_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2025-08-16T00:48:18.073237286Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"response"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Great taste! Based on your interest in the complex family dynamics of Succession and the fast-paced, character-driven storytelling of The Bear, I'd like to recommend another TV show that you might enjoy:\n\nBillions\n\nHere's why:\n\n1. Complex characters: Like Succession, Billions features a cast of complex, multi-dimensional characters with rich backstories. You'll find yourself drawn into their world and invested in their struggles.\n2. High-stakes power struggles: The show revolves around the cat-and-mouse game between hedge fund manager Bobby \"Axe\" Axelrod (Damian Lewis) and ruthless U.S. Attorney Chuck Rhoades (Paul Giamatti). This ongoing battle for power and supremacy will remind you of the Roy family's machinations in Succession.\n3. Character-driven storytelling: Like The Bear, Billions focuses on character development and nuanced relationships. You'll witness the intricate web of alliances, rivalries, and personal demons that drive the characters' actions.\n4. Fast-paced, witty dialogue: The show's writing is sharp, clever, and engaging, with a tone that's both humorous and intense. You'll appreciate the quick-witted banter and clever plot twists.\n\nGive Billions a try if you enjoy:\n\n* Character-driven drama\n* Complex power struggles\n* Witty, fast-paced storytelling\n* Morally ambiguous characters\n\nI think you'll find Billions to be an engaging and addictive watch!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"done"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"done_reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"stop"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"total_duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;250847368597&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"load_duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22127677&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"prompt_eval_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"prompt_eval_duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;82051803&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;128006&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;882&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;128007&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"... (truncated for brevity)"&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;&lt;em&gt;Local model response demonstrating the LLM inference on home model + hardware&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;With this setup, I can dive into architecting web applications, RAG pipelines, and exploring the tools and patterns that make AI systems work. Active experimentation beats passive learning - turning ideas into running code rather than keeping them dormant in my head.&lt;/p&gt;

&lt;p&gt;The practical reasons are: no API costs, no hosting costs, can experiment freely. But the bigger motivating reason is simpler - I enjoy rolling up my sleeves, getting my hands dirty and making these things work, and also understanding deeply how these systems actually work.  I enjoy that process.  Specifically, here in 2025, I want to master the fundamentals of designing and building LLM-powered systems, so I can make them operate and perform in ways that scale and solve business problems. In my experiences, the best way to do that is to dive in.  &lt;/p&gt;

&lt;p&gt;AI pipelines, while different from &lt;a href="https://engineering.salesforce.com/building-a-fault-tolerant-data-pipeline-for-chatbots-47d74bc31f5b/" rel="noopener noreferrer"&gt;some of the pipelines I have built over the years&lt;/a&gt;, share the fundamentals of good architecture. You still need to think about data flow, error handling, monitoring, scalability and resiliency. Some of the differences I am thinking through now, in general terms: managing context windows for larger RAG applications, routing between different model actions, and dealing with probabilistic outputs instead of deterministic ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Learning Today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vector databases&lt;/strong&gt; - exploring &lt;a href="https://qdrant.tech/documentation/overview/" rel="noopener noreferrer"&gt;Qdrant&lt;/a&gt; for efficient similarity search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rerankers&lt;/strong&gt; - relevance sorters and intent matchers that are quite new to me. A colleague suggested investigating hosted services like &lt;a href="https://www.voyageai.com/" rel="noopener noreferrer"&gt;Voyage.ai&lt;/a&gt; and &lt;a href="https://cohere.com/" rel="noopener noreferrer"&gt;Cohere&lt;/a&gt; for practical reranking in RAG pipelines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embedding strategies&lt;/strong&gt; - techniques for converting text to meaningful vector representations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAG architectures&lt;/strong&gt; - patterns for retrieval-augmented generation systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python frameworks&lt;/strong&gt; - PydanticAI and LangChain that connect the dots between components
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's a lot to dig into and learn.  Each piece has nuances you only discover by implementing them yourself.  It's an interactive and iterative process for me. The same way I was curious about a linear algebra problem or a calculus problem decades ago, but you you get also use a screwdriver, a keyboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/proxmox_ui.png" class="article-body-image-wrapper"&gt;&lt;img src="/images/proxmox_ui.png" alt="Proxmox VE interface showing ollama-inference container"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Proxmox container management - monitoring the Ollama inference container with CPU and memory usage&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I'm building a couple of Pydantic-AI apps now on the side as a testing ground - one is a recommendation system that uses local models like Llama 70B. Not because the world needs another recommendation engine, but because it gives me a concrete problem to solve with these tools, and I am curious about how I would solve this problem.  I also understand already this &lt;a href="https://ollama.com/library/llama3.3" rel="noopener noreferrer"&gt;70B model&lt;/a&gt; is too much for my ASRock machine, but that's part of the experience (it works, and gives good results, it's just slowww).  &lt;/p&gt;

&lt;p&gt;Each project teaches me something specific about AI architecture patterns in practical terms (E.g. &lt;a href="https://holtonma.github.io/posts/mcp_blog_post/" rel="noopener noreferrer"&gt;Building Conversational Apps with MCP&lt;/a&gt;). In that process pushing to solve problems you will get hit with many snags, blockers and hurdles, and the light bulb goes on related to a fundamental you missed in what you were reading, understanding. I encourage you to "just go for it", and see what you learn — it's not about the end result or "making a million dollars", praise and admiration or some external feedback "cookie".  The most sustainable feedback over time, and the stuff that breeds confidence, is in the process of striving for something and overcoming the obstacles to get there. You exercise those muscles of grit and resiliency that are essential to anything we do, but especially software engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Am Curious About RAG Architectures
&lt;/h2&gt;

&lt;p&gt;After decades engaged building and architecting web applications and data pipelines, it feels like a new set of primitives for solving problems. How can I use language models in a way to solve automation problems at scale — these mathematical reasoning engines can understand context very well and generate structured relevant outputs. &lt;/p&gt;

&lt;p&gt;The home lab lets me explore this at my own pace. Without cloud bills, API limits, no external dependencies. Just the freedom to try explore and learn.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Going to try and "document" what I learn as I build:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Giving Proxmox containers a try&lt;/li&gt;
&lt;li&gt;The containers I build and their function&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ai.pydantic.dev/" rel="noopener noreferrer"&gt;Pydantic AI framework&lt;/a&gt; for building agents&lt;/li&gt;
&lt;li&gt;Temporal for workflows, and lessons learned&lt;/li&gt;
&lt;li&gt;Performance characteristics of different models on this hardware vs the "big boys" like GPT-5 and Claude Opus 4.1&lt;/li&gt;
&lt;li&gt;Architecture decisions for the apps I am building&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Build something, you learn from it, you build the next thing better. Keep going and enjoy 🍺&lt;/p&gt;




</description>
      <category>ai</category>
      <category>homelab</category>
      <category>rag</category>
      <category>pydanticai</category>
    </item>
    <item>
      <title>Self-Hosting Rails Apps with Cloudflare Tunnels - Why I chose to self host hobby apps on my Mac Mini</title>
      <dc:creator>Mark Holton</dc:creator>
      <pubDate>Sun, 10 Aug 2025 22:55:54 +0000</pubDate>
      <link>https://dev.to/mark_holton/self-hosting-rails-apps-with-cloudflare-tunnels-why-i-ditched-17month-cloud-hosting-for-a-599-4epo</link>
      <guid>https://dev.to/mark_holton/self-hosting-rails-apps-with-cloudflare-tunnels-why-i-ditched-17month-cloud-hosting-for-a-599-4epo</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://holtonma.github.io/posts/self-hosting-rails-cloudflare-tunnels/" rel="noopener noreferrer"&gt;holtonma.github.io&lt;/a&gt;&lt;/em&gt;&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%2Fc169cp47b3hnpay4x86c.jpg" 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%2Fc169cp47b3hnpay4x86c.jpg" alt="Markbot Robot on Steampunk Rocket" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Be adventurous and free - start hosting this stuff yourself with no barriers to your exploration!&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The $17/Month Death by a Thousand Cuts
&lt;/h2&gt;

&lt;p&gt;I love building side projects. I tend to use them to explore technologies in a fun way - Fantasy golf leagues, personal dashboards - the kind of apps that scratch a specific itch but don't need to scale to millions of users. But every time I'd spin up a new Rails app, I'd hit the same wall: &lt;strong&gt;hosting costs that kill exploration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's what a typical "simple" Rails app costs on popular platforms:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Basic Plan&lt;/th&gt;
&lt;th&gt;What You Get&lt;/th&gt;
&lt;th&gt;The Reality&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Heroku&lt;/td&gt;
&lt;td&gt;$7/dyno + $9/postgres&lt;/td&gt;
&lt;td&gt;512MB RAM, shared CPU&lt;/td&gt;
&lt;td&gt;Need 2+ dynos for real traffic = $23+/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Railway&lt;/td&gt;
&lt;td&gt;$5/service&lt;/td&gt;
&lt;td&gt;512MB RAM, 1GB storage&lt;/td&gt;
&lt;td&gt;Add database, background jobs = $15+/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Render&lt;/td&gt;
&lt;td&gt;$7/service&lt;/td&gt;
&lt;td&gt;512MB RAM&lt;/td&gt;
&lt;td&gt;Plus $7 for PostgreSQL = $14+/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DigitalOcean App Platform&lt;/td&gt;
&lt;td&gt;$12/month&lt;/td&gt;
&lt;td&gt;512MB RAM, 1GB disk&lt;/td&gt;
&lt;td&gt;Minimal for any real app&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The real killer isn't the base price&lt;/strong&gt; - it's what happens when you want to do more &lt;strong&gt;exploration&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need web scraping? Extra $10/month for higher CPU limits&lt;/li&gt;
&lt;li&gt;Want to add vector search? $25/month for a vector database &lt;/li&gt;
&lt;li&gt;File uploads growing? $15/month for more storage&lt;/li&gt;
&lt;li&gt;Background job processing? Another $7/month for workers&lt;/li&gt;
&lt;li&gt;Redis for caching? $15/month for managed Redis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Suddenly your hobby project costs $50-100/month.&lt;/strong&gt; At that point, you start making technical compromises not because they're better, but because you don't want to pay for exploration.&lt;/p&gt;
&lt;h2&gt;
  
  
  Enter the Mac Mini: $2/Month for 20x the Performance
&lt;/h2&gt;

&lt;p&gt;Last year, I bought a Mac Mini M2 for $599. Here's what I'm running on it right now:&lt;/p&gt;
&lt;h3&gt;
  
  
  EyeOnMajors.com: A Real-World Example
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://eyeonmajors.com" rel="noopener noreferrer"&gt;EyeOnMajors.com&lt;/a&gt; is my Rails 8 app that allows family and friends to compete in fantasy golf with real-time updates. On cloud hosting, this would easily cost $30+/month because it needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database storage&lt;/strong&gt; (historical tournament data)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time data processing&lt;/strong&gt; (background jobs)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image processing&lt;/strong&gt; (tournament photos, player headshots)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web scraping&lt;/strong&gt; (CPU intensive, banned on basic plans)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File storage&lt;/strong&gt; (images, cached data)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;My actual monthly cost: $2.25&lt;/strong&gt; (domain + electricity)&lt;/p&gt;
&lt;h3&gt;
  
  
  Performance Comparison: Cloud vs Mac Mini
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLOUD HOSTING ($17/month):
- 512MB RAM (shared with other apps)
- 0.5 CPU cores (shared, throttled)
- 1GB storage (pay for more)
- Limited network I/O
- No root access
- No custom software installs

MAC MINI M2 ($599 one-time):
- 16GB unified memory
- 8-core ARM CPU (dedicated)
- 256GB SSD (upgrade to 1TB+ easily)
- Gigabit Ethernet
- Full root access
- Install anything you want
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;It's not even close.&lt;/strong&gt; The Mac Mini has roughly &lt;strong&gt;20-50x the resources&lt;/strong&gt; for a fraction of the ongoing cost.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Security Problem (Solved by Cloudflare Tunnels)
&lt;/h2&gt;

&lt;p&gt;The traditional blocker for self-hosting was security. Opening ports on your home network? Dealing with dynamic IPs? Managing SSL certificates? &lt;strong&gt;No thanks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But &lt;strong&gt;Cloudflare Tunnels changed everything&lt;/strong&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cloudflare Tunnel (originally called "Argo Tunnel") was launched around 2018-2019&lt;/li&gt;
&lt;li&gt;It became free for all users in 2021 (previously required paid plans)&lt;/li&gt;
&lt;li&gt;The rebranding from "Argo Tunnel" to "Cloudflare Tunnel" happened around 2021-2022&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  What Cloudflare Tunnels Do
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.cloudflare.com/products/tunnel/" rel="noopener noreferrer"&gt;Cloudflare Tunnels&lt;/a&gt; create a secure, outbound-only connection from your home server to Cloudflare's edge network. Here's the magic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traditional Self-Hosting (Scary):
Internet → Your Router (ports 80/443 open) → Your Server
❌ Exposed IP address
❌ Open ports = attack surface  
❌ DDoS risk
❌ SSL certificate management

Cloudflare Tunnels (Secure):
Internet → Cloudflare Edge → Encrypted Tunnel → Your Server
✅ No exposed IP or open ports
✅ Enterprise DDoS protection
✅ Automatic SSL/TLS
✅ Zero router configuration needed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fbxai5ydp6b768vmqjomh.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%2Fbxai5ydp6b768vmqjomh.png" alt="Cloudflare Tunnel Traffic Flow Diagram" width="799" height="265"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Encrypted tunnels - no exposed ports, no router configuration needed&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting Up EyeOnMajors.com with Cloudflare Tunnels
&lt;/h3&gt;

&lt;p&gt;The setup took me about 30 minutes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Transfer DNS to Cloudflare&lt;/strong&gt; (free)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install cloudflared on Mac Mini&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   brew install cloudflare/cloudflare/cloudflared
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create and configure tunnel&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   cloudflared tunnel login
   cloudflared tunnel create eyeonmajors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Point tunnel to Rails app&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;   &lt;span class="c1"&gt;# ~/.cloudflared/config.yml
&lt;/span&gt;   &lt;span class="na"&gt;tunnel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eyeonmajors&lt;/span&gt;
   &lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eyeonmajors.com&lt;/span&gt;
       &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://localhost:3000&lt;/span&gt;
     &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http_status:404&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Update DNS in Cloudflare dashboard&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Type: CNAME&lt;/li&gt;
&lt;li&gt;Name: &lt;code&gt;eyeonmajors.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Content: &lt;code&gt;[tunnel-id].cfargotunnel.com&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;That's it.&lt;/strong&gt; No port forwarding, no SSL certificates, no dynamic DNS. Just works.&lt;/p&gt;
&lt;h3&gt;
  
  
  What You Get with Cloudflare's Free Tier
&lt;/h3&gt;

&lt;p&gt;This blew my mind - Cloudflare's &lt;strong&gt;free tier&lt;/strong&gt; includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unlimited bandwidth&lt;/strong&gt; (seriously)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DDoS protection&lt;/strong&gt; (enterprise-grade)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global CDN&lt;/strong&gt; (your app loads fast worldwide)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSL/TLS termination&lt;/strong&gt; (automatic certificates)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS hosting&lt;/strong&gt; (fast, reliable)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Basic analytics&lt;/strong&gt; (traffic insights)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting&lt;/strong&gt; (API protection)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Free tier limits that matter for hobby projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1,000 tunnels per account (you'll use 1-3)&lt;/li&gt;
&lt;li&gt;100MB max file upload size&lt;/li&gt;
&lt;li&gt;Must serve legitimate website content (no video streaming or large file hosting)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Services that could cost $100+/month on AWS are &lt;strong&gt;completely free&lt;/strong&gt; with Cloudflare.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Rails Deployment: Simple Make Scripts (For Now)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Full disclosure:&lt;/strong&gt; This is my current personal solution for hobby projects, not enterprise best practices. For deployment, I use a simple Makefile that builds and deploys my Rails app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="c"&gt;# EyeOnMajors.com Production Makefile&lt;/span&gt;
&lt;span class="nl"&gt;.PHONY&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; deploy logs health backup status

&lt;span class="nl"&gt;deploy&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"🚀 Deploying EyeOnMajors..."&lt;/span&gt;
    git pull origin main
    docker-compose -f docker-compose.production.yml up -d --build
    @echo &lt;span class="s2"&gt;"✅ Deployment complete!"&lt;/span&gt;

&lt;span class="nl"&gt;logs&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"📋 Viewing application logs..."&lt;/span&gt;
    docker-compose -f docker-compose.production.yml logs -f web

&lt;span class="nl"&gt;health&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"🏥 Checking application health..."&lt;/span&gt;
    curl -s http://localhost:3000/health &lt;span class="o"&gt;|&lt;/span&gt; jq
    docker-compose -f docker-compose.production.yml ps

&lt;span class="nl"&gt;backup&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"💾 Creating database backup..."&lt;/span&gt;
    docker-compose -f docker-compose.production.yml &lt;span class="nb"&gt;exec&lt;/span&gt; db pg_dump -U eyeonmajors eyeonmajors_production &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; backups/db_&lt;span class="nv"&gt;$(&lt;/span&gt;shell date +%Y%m%d_%H%M%S&lt;span class="o"&gt;)&lt;/span&gt;.sql
    @echo &lt;span class="s2"&gt;"✅ Backup complete!"&lt;/span&gt;

&lt;span class="nl"&gt;status&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"📊 System status:"&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"Uptime: $(shell uptime)"&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"Disk usage: $(shell df -h / | tail -1 | awk '{print $5}')"&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"Memory usage: $(shell free -h | grep '^Mem:' | awk '{print $3 "&lt;/span&gt;/&lt;span class="s2"&gt;" $2}')"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./make deploy    &lt;span class="c"&gt;# Deploy latest code&lt;/span&gt;
./make logs      &lt;span class="c"&gt;# View application logs  &lt;/span&gt;
./make health    &lt;span class="c"&gt;# Check app status&lt;/span&gt;
./make backup    &lt;span class="c"&gt;# Create database backup&lt;/span&gt;
./make status    &lt;span class="c"&gt;# System overview&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For hobby projects, this works fine for a start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Simple to understand&lt;/strong&gt; (no complex CI/CD to debug)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Fast iteration&lt;/strong&gt; (deploy in 30 seconds)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Easy to modify&lt;/strong&gt; (just edit the Makefile)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Educational&lt;/strong&gt; (you learn the actual deployment steps)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Reliable&lt;/strong&gt; (no external dependencies or complex pipelines)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The preferred approach:&lt;/strong&gt; GitHub Actions that run &lt;code&gt;rails test&lt;/code&gt;, then SSH to your Mac Mini to kick off the Docker builds on successful tests. &lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Performance: EyeOnMajors.com
&lt;/h2&gt;

&lt;p&gt;Since moving to self-hosting, I've been able to implement features that would have been cost-prohibitive on cloud hosting:&lt;/p&gt;

&lt;h3&gt;
  
  
  Background Processing
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Multiple concurrent Sidekiq workers processing:&lt;/span&gt;
&lt;span class="c1"&gt;# - Leaderboard updates every 30 seconds&lt;/span&gt;
&lt;span class="c1"&gt;# - Image processing and optimization  &lt;/span&gt;
&lt;span class="c1"&gt;# - Push notification delivery&lt;/span&gt;
&lt;span class="c1"&gt;# - Data analysis and caching&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On cloud hosting:&lt;/strong&gt; $15+/month for worker dynos&lt;br&gt;&lt;br&gt;
&lt;strong&gt;On Mac Mini:&lt;/strong&gt; 8 CPU cores, run as many workers as you want&lt;/p&gt;

&lt;h3&gt;
  
  
  Database and Storage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# PostgreSQL with full-text search, JSON queries, large datasets&lt;/span&gt;
&lt;span class="c1"&gt;# Image storage with automatic optimization&lt;/span&gt;
&lt;span class="c1"&gt;# Historical data going back years&lt;/span&gt;
&lt;span class="c1"&gt;# No artificial storage limits&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On cloud hosting:&lt;/strong&gt; $15-50/month depending on usage&lt;br&gt;&lt;br&gt;
&lt;strong&gt;On Mac Mini:&lt;/strong&gt; 256GB-1TB local storage, backup to external drive&lt;/p&gt;

&lt;h2&gt;
  
  
  The Honest Downsides
&lt;/h2&gt;

&lt;p&gt;Self-hosting isn't perfect. Here are the real tradeoffs:&lt;/p&gt;

&lt;h3&gt;
  
  
  0. Application Security is Still Your Responsibility
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Cloudflare Tunnels secure your &lt;em&gt;infrastructure&lt;/em&gt;, not your &lt;em&gt;application&lt;/em&gt;. You still need to follow secure coding practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input validation&lt;/strong&gt; - Sanitize all user inputs to prevent SQL injection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XSS protection&lt;/strong&gt; - Use Rails' built-in CSRF protection and sanitize outputs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication/authorization&lt;/strong&gt; - Implement proper user access controls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency management&lt;/strong&gt; - Keep Rails and gems updated (&lt;code&gt;bundle audit&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment variables&lt;/strong&gt; - Never commit secrets to your repository&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database security&lt;/strong&gt; - Use parameterized queries, limit database permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cloud hosting doesn't magically make your code secure either, but don't let the infrastructure security improvements give you a false sense of application security. The same security best practices apply regardless of where you host.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Single Point of Failure
&lt;/h3&gt;

&lt;p&gt;Your app goes down if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Power outage at your house&lt;/li&gt;
&lt;li&gt;Internet service provider issues&lt;/li&gt;
&lt;li&gt;Hardware failure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mitigation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UPS (Uninterruptible Power Supply) for power outages (~$100)&lt;/li&gt;
&lt;li&gt;Most ISPs have &amp;gt;99% uptime&lt;/li&gt;
&lt;li&gt;Mac Mini hardware is extremely reliable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For hobby projects, this is acceptable. For business-critical apps, you'd obviously want redundancy.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Internet Upload Speed Requirements
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;You need decent upload bandwidth.&lt;/strong&gt; I have 100 Mbps upload, which easily handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;50+ concurrent users&lt;/li&gt;
&lt;li&gt;Real-time data updates&lt;/li&gt;
&lt;li&gt;Image serving via Cloudflare CDN&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check your upload speed: most fiber connections have 100+ Mbps upload, cable varies.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. You're Responsible for Maintenance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Security updates (automated with scripts)&lt;/li&gt;
&lt;li&gt;Monitoring (simple health checks)&lt;/li&gt;
&lt;li&gt;Backups (multiple layers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For backups, I use both the pg_dump script shown earlier plus a simple cron job that rsyncs my database backups and application files to a local NAS with RAID 5 storage. I want to be careful and mindful about not losing even fantasy golf data, and while it's not off-site, it provides good peace of mind for hobby projects. It would require multiple simultaneous failures for that data to be truly lost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But honestly?&lt;/strong&gt; This is part of the fun. You learn how things actually work instead of being abstracted away from the infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Advanced Move: Distributed Self-Hosting
&lt;/h2&gt;

&lt;p&gt;Want to get fancy? &lt;strong&gt;Deploy to a Mac Mini at your parents' house in another state.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Buy second Mac Mini ($599)&lt;/li&gt;
&lt;li&gt;Ship to parents with setup instructions&lt;/li&gt;
&lt;li&gt;Configure Cloudflare tunnel there&lt;/li&gt;
&lt;li&gt;Use Cloudflare load balancing to distribute traffic&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Now you have:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geographic redundancy&lt;/li&gt;
&lt;li&gt;Multiple data centers&lt;/li&gt;
&lt;li&gt;Still cheaper than cloud hosting&lt;/li&gt;
&lt;li&gt;Fun family tech project&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cost Analysis: 3-Year Total Cost of Ownership
&lt;/h2&gt;

&lt;p&gt;Here's my actual cost breakdown for running EyeOnMajors.com:&lt;/p&gt;

&lt;h3&gt;
  
  
  3-Year Cost Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Year 1&lt;/th&gt;
&lt;th&gt;Year 2&lt;/th&gt;
&lt;th&gt;Year 3&lt;/th&gt;
&lt;th&gt;Total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Hosting&lt;/td&gt;
&lt;td&gt;$684&lt;/td&gt;
&lt;td&gt;$684&lt;/td&gt;
&lt;td&gt;$684&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$2,052&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mac Mini&lt;/td&gt;
&lt;td&gt;$611&lt;/td&gt;
&lt;td&gt;$30&lt;/td&gt;
&lt;td&gt;$30&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$671&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Savings&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;$654&lt;/td&gt;
&lt;td&gt;$654&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,381&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  One-Time Costs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Mac Mini M2: $599&lt;/li&gt;
&lt;li&gt;Domain registration: $12&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: $611&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Monthly Costs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Electricity (10W continuous): ~$1.50&lt;/li&gt;
&lt;li&gt;Domain renewal: $1/month (amortized)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: $2.50/month&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Equivalent Cloud Hosting
&lt;/h3&gt;

&lt;p&gt;For the same functionality on cloud platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App hosting: $17/month&lt;/li&gt;
&lt;li&gt;Database: $15/month
&lt;/li&gt;
&lt;li&gt;Background workers: $15/month&lt;/li&gt;
&lt;li&gt;Storage: $10/month&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: $57/month = $684/year&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Mac Mini pays for itself in 11 months.&lt;/strong&gt; After that, you're saving $650+ every year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for Innovation
&lt;/h2&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%2F0wjusp9plz54f76yv6va.jpg" 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%2F0wjusp9plz54f76yv6va.jpg" alt="Money Savings Lab Exploration" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Save money, build freely: Turn your home into a development playground&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The real benefit isn't just cost savings - &lt;strong&gt;it's removing barriers to exploration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When hosting is expensive, you make compromises:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"I won't add real-time features" (too expensive)&lt;/li&gt;
&lt;li&gt;"I'll skip image optimization" (storage costs)&lt;/li&gt;
&lt;li&gt;"I won't implement that cool AI feature with a vector DB" &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When hosting is essentially free, you build what you &lt;strong&gt;want&lt;/strong&gt; to build:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time tournament updates? Sure.&lt;/li&gt;
&lt;li&gt;Advanced image processing? Why not.&lt;/li&gt;
&lt;li&gt;Vector search for historical data? Let's try it.&lt;/li&gt;
&lt;li&gt;Web scraping integration? No problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Constraints breed creativity&lt;/strong&gt;, but &lt;strong&gt;financial constraints breed compromise&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start: 30-Minute Setup
&lt;/h2&gt;

&lt;p&gt;Ready to try this? Here's the minimal path for people who are sold:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Get Hardware
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mac Mini M2&lt;/strong&gt; ($599): My recommendation, excellent performance/watt (and can remote screenshare easily)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beelink EQR5&lt;/strong&gt; ($239): Budget option, still powerful, especially if you like Linux&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Raspberry Pi 5&lt;/strong&gt; ($80): For simple apps, surprisingly capable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Set up Cloudflare
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Transfer domain DNS to Cloudflare (free)&lt;/li&gt;
&lt;li&gt;Install cloudflared: &lt;code&gt;brew install cloudflare/cloudflare/cloudflared&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create tunnel: &lt;code&gt;cloudflared tunnel create myapp&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Deploy Rails App
&lt;/h3&gt;

&lt;p&gt;Use Docker (recommended) or direct install - whatever you're comfortable with&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Connect Tunnel
&lt;/h3&gt;

&lt;p&gt;Point to &lt;code&gt;localhost:3000&lt;/code&gt; (or your Rails port)&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Go Live
&lt;/h3&gt;

&lt;p&gt;Update DNS in Cloudflare dashboard&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Total time: ~30 minutes for basic setup&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started: Your First Self-Hosted Rails App
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Perfect First Projects
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Personal dashboard&lt;/li&gt;
&lt;li&gt;Hobby project API&lt;/li&gt;
&lt;li&gt;Learning new frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Start simple, then expand as you get comfortable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of Hobby Hosting
&lt;/h2&gt;

&lt;p&gt;I think we're seeing a shift back to self-hosting, driven by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cloud hosting getting expensive&lt;/strong&gt; (inflation + profit maximization)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home hardware getting powerful&lt;/strong&gt; (Apple Silicon, efficiency improvements)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security tools improving&lt;/strong&gt; (Cloudflare Tunnels, Tailscale, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developer tools maturing&lt;/strong&gt; (Docker, simple deployment)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Self-hosting in 2025 feels like what cloud hosting promised in 2015&lt;/strong&gt; - simple, powerful, cost-effective.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources and Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare Tunnels&lt;/strong&gt;: &lt;a href="https://www.cloudflare.com/products/tunnel/" rel="noopener noreferrer"&gt;cloudflare.com/products/tunnel&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EyeOnMajors.com&lt;/strong&gt;: &lt;a href="https://eyeonmajors.com" rel="noopener noreferrer"&gt;eyeonmajors.com&lt;/a&gt; (live example)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mac Mini&lt;/strong&gt;: &lt;a href="https://www.apple.com/mac-mini/" rel="noopener noreferrer"&gt;apple.com/mac-mini&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beelink Mini PCs&lt;/strong&gt;: &lt;a href="https://www.bee-link.com/" rel="noopener noreferrer"&gt;bee-link.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion: Rediscovering the Joy of Building
&lt;/h2&gt;

&lt;p&gt;Moving from cloud hosting to self-hosting brought back something I'd lost: &lt;strong&gt;the joy of building without constraints&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No more calculating whether a feature is "worth the hosting cost." No more architectural decisions driven by pricing tiers. No more death by a thousand $5/month cuts.&lt;/p&gt;

&lt;p&gt;Just me, a $599 Mac Mini, and the freedom to build whatever I can imagine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your hobby projects deserve better than 512MB of shared RAM.&lt;/strong&gt; Give self-hosting a try - you might be surprised how much fun infrastructure can be when it's actually yours.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;I want to hear from you:&lt;/strong&gt; Are you currently paying $20/month or more for cloud hosting on hobby projects? What's your biggest barrier to trying self-hosting - is it the security concerns, the setup complexity, or something else entirely?&lt;/p&gt;

&lt;p&gt;Drop a comment below - I'd love to help you get started or hear about your own self-hosting adventures!&lt;/p&gt;




&lt;h3&gt;
  
  
  Appendix: Technical Details
&lt;/h3&gt;

&lt;p&gt;For the technically curious, here are the detailed specs and configurations I use:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mac Mini M2 Configuration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;8-core CPU, 10-core GPU&lt;/li&gt;
&lt;li&gt;16GB unified memory&lt;/li&gt;
&lt;li&gt;256GB SSD (upgraded to 1TB external)&lt;/li&gt;
&lt;li&gt;Gigabit Ethernet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Software Stack for this side project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker Desktop&lt;/li&gt;
&lt;li&gt;Ruby 3.2 + Rails 8&lt;/li&gt;
&lt;li&gt;PostgreSQL 16&lt;/li&gt;
&lt;li&gt;Redis for caching&lt;/li&gt;
&lt;li&gt;Sidekiq for background jobs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cloudflare Configuration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free tier (no Pro features needed)&lt;/li&gt;
&lt;li&gt;SSL/TLS: Full (strict)&lt;/li&gt;
&lt;li&gt;Security level: Medium&lt;/li&gt;
&lt;li&gt;Always Use HTTPS: Enabled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Network Setup:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Static IP assigned via router DHCP reservation (192.168.1.x or whatever works for your local network)&lt;/li&gt;
&lt;li&gt;Cloudflare tunnel: outbound-only&lt;/li&gt;
&lt;li&gt;No ports forwarded on router&lt;/li&gt;
&lt;li&gt;UPS for power backup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This configuration has been rock-solid for me and enables me to host apps, with better performance, and besides the initial hardware, very low cost.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>selfhosting</category>
      <category>cloudflare</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
