<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Mitchell Cohen</title><link>https://blog.mitch-cohen.com/</link><description>Recent content on Mitchell Cohen</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 08 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.mitch-cohen.com/index.xml" rel="self" type="application/rss+xml"/><item><title>How Claude Code Saved My Application from a Catastrophic Deletion</title><link>https://blog.mitch-cohen.com/posts/ideochrom-disaster-recovery-with-claude-code/</link><pubDate>Mon, 08 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.mitch-cohen.com/posts/ideochrom-disaster-recovery-with-claude-code/</guid><description>How I used Claude Code to recover a DigitalOcean droplet after accidentally deleting critical system files — and why documentation became the most important part of the rebuild.</description><content:encoded><![CDATA[<p><a href="https://ideochrom.com">Ideochrom</a> is a free web tool I built for generating publication-ready chromosome karyotype ideograms. I don&rsquo;t make money from it — if anything, I lose money. It pales in comparison to my surf fishing hobby, where lures, terminal tackle, and other gear I buy to &ldquo;assure&rdquo; I&rsquo;ll catch something add up by the end of the season. But it&rsquo;s a hobby project that genuinely helps my colleague and his lab, so I keep it running.</p>
<p>Part of keeping it running means occasional maintenance. In an ambitious cleanup effort, one of my goals was removing old, unneeded deployment backups that GitHub Actions had accumulated. With the help of my less-than-great Linux command knowledge, I somehow <strong>deleted files that left my DigitalOcean droplet unable to run or restart</strong>. The repository had all the source code — but I had never signed up for DigitalOcean&rsquo;s weekly backups. Not ideal.</p>
<p><img alt="Server racks in a data center" loading="lazy" src="/images/blog-disaster-server-room.jpg"></p>
<h2 id="what-needed-to-be-rebuilt">What needed to be rebuilt</h2>
<p>If this were an enterprise application, I&rsquo;d have been in serious trouble. But I had a good friend: Claude. I knew how the application worked at a high level, had the GitHub Actions YAML, and just needed to map out what a full restore would require. Here&rsquo;s what I outlined:</p>
<ul>
<li><code>nginx</code> configurations for <code>dev.ideochrom.com</code> and <code>ideochrom.com</code></li>
<li>SSL setup for HTTPS via <a href="https://letsencrypt.org/">Let&rsquo;s Encrypt</a></li>
<li>A <code>cron</code> job to handle monthly SSL certificate renewal</li>
<li>A background service that fetches band files from the NCBI cytogenetic data repository, with another <code>cron</code> job that fires monthly to check for and add any missing files</li>
<li>SSH key setup and updating the corresponding secret in GitHub&rsquo;s <strong>Settings &gt; Secrets &gt; Actions</strong></li>
</ul>
<h2 id="the-recovery-process">The recovery process</h2>
<p><img alt="Code on a screen reflected in eyeglasses" loading="lazy" src="/images/blog-disaster-recovery-code.jpg"></p>
<p>I spun up a new DigitalOcean droplet using the same Ubuntu server image as before, opened Claude Code inside Ideochrom&rsquo;s source repo, and got to work. Claude handled most of the changes inside the GitHub Actions YAML. The rebuild actually came out slightly better than what was there before — for example, deployment directories were isolated rather than reused, which reduced the risk of the same cleanup mistake happening again.</p>
<p>A few things I handled manually throughout the process:</p>
<ul>
<li>Copied and pasted logs from failed GitHub Actions workflow runs so Claude could diagnose errors</li>
<li>Scoped all deployments during the restore to <code>dev.ideochrom.com</code>, so my colleague could test on his end before anything went to production</li>
<li>Created a new <code>infrastructure/</code> folder with <code>services/</code> and <code>nginx/</code> subfolders to organize all service files, <code>cron</code> jobs, and nginx configurations in one place — rather than scattered across the repo as before</li>
</ul>
<p>One constraint worth noting: I don&rsquo;t give Claude access to the GitHub CLI to trigger workflows or SSH into the droplet directly. Everything infrastructure-side had to go through me.</p>
<h2 id="the-most-important-thing-we-did">The most important thing we did</h2>
<p><img alt="Hands writing notes in a notebook" loading="lazy" src="/images/blog-disaster-readme-notes.jpg"></p>
<p>I had Claude generate a <code>README</code> documenting every step required to bring the application back online from a bare droplet. <strong>This was the most valuable output of the entire recovery.</strong> Whether the next incident is another catastrophic mistake, a planned migration to a new droplet, or a move to AKS, that document means we&rsquo;re not starting from scratch — we&rsquo;re handing a known playbook to Claude or any other tool and getting straight to work.</p>
<h2 id="results">Results</h2>
<p>The process took about <strong>4 hours</strong> to get the application back online. Without Claude, this would have taken weeks — tasks like SSL renewal with a <code>cron</code> job are not in my Linux administration wheelhouse. In the end, my colleague was back to using the application, and we came out of it with better infrastructure organization and documentation than we had going in.</p>
<p>The lesson: keep your source code in version control, document your infrastructure as if you&rsquo;ll need to rebuild it from scratch (because someday you will), and don&rsquo;t run cleanup commands you&rsquo;re not confident in on a production server.</p>
]]></content:encoded></item><item><title>Redesigning Ideochrom's UI with Claude Code</title><link>https://blog.mitch-cohen.com/posts/ideochrom-redesign-with-claude-code/</link><pubDate>Thu, 04 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.mitch-cohen.com/posts/ideochrom-redesign-with-claude-code/</guid><description>How I used Claude Code to transform a developer&amp;#39;s first-pass UI into a polished app — what worked, what surprised me, and what the tool actually changed.</description><content:encoded><![CDATA[<p><a href="https://ideochrom.com">Ideochrom</a> is a free web tool I built for generating publication-ready chromosome karyotype ideograms. Genomics researchers use it to visualize copy-number events, gene locations, and structural rearrangements on human (and other) chromosomes — without installing anything.</p>
<p>The science backend was solid. The UI was not.</p>
<h2 id="what-v16-looked-like">What v1.6 looked like</h2>
<p><img alt="Ideochrom v1.6 — before" loading="lazy" src="/images/ideochrom-v1.6.png"></p>
<p>Version 1.6 was a developer&rsquo;s first pass. Giant serif header filling half the screen. Browser-default <code>&lt;input type=&quot;file&quot;&gt;</code> elements. A blank gray rectangle where the preview would eventually appear. It worked, but it communicated &ldquo;unfinished side project&rdquo; more than &ldquo;tool you&rsquo;d trust with research figures.&rdquo;</p>
<p>I knew what needed to change — drag-and-drop uploads, a proper empty state, better layout hierarchy — but the React component tree had grown organically across a lot of files and I didn&rsquo;t want to spend a weekend untangling CSS.</p>
<h2 id="bringing-in-claude-code">Bringing in Claude Code</h2>
<p>I opened Claude Code and described what I wanted: a polished app-style layout, drag-and-drop file zones, a step-by-step empty state, and a compact header that didn&rsquo;t dominate the screen.</p>
<p>What happened next wasn&rsquo;t what I expected from an AI coding tool.</p>
<p>It didn&rsquo;t just generate CSS and hand it back. It read the component structure — <code>SidePanelLeft</code>, <code>BandsFileUpload</code>, <code>ImagePreview</code>, <code>TopInfo</code> — understood what each piece was doing, and made changes that were <em>consistent across the whole tree</em>, not just isolated patches. When it touched the file upload components it also updated the parent panel layout and the empty state in the preview area to match. The changes fit together.</p>
<p>The things that would have taken me the most time — figuring out which CSS variables affected which components, tracing how the sidebar accordion sections interacted with the main preview — it handled without needing me to explain the wiring.</p>
<h2 id="what-actually-changed">What actually changed</h2>
<ul>
<li><strong>Header</strong>: replaced the giant title with a compact branded bar (<code>ideochrom</code> in a smaller serif, <code>Last Updated</code> timestamp, Contact/Donate/Help buttons top-right)</li>
<li><strong>File uploads</strong>: replaced <code>&lt;input type=&quot;file&quot;&gt;</code> with styled drag-and-drop zones, separate tabs for &ldquo;Choose existing&rdquo; and &ldquo;Upload&rdquo; on the cytoband selector</li>
<li><strong>Empty state</strong>: instead of a blank gray box, the preview area shows a faint chromosome illustration and a three-step guide</li>
<li><strong>Layout toggles</strong>: Linear / Circular now rendered as proper button group instead of a dropdown</li>
<li><strong>Accordion sections</strong>: Files, Options, File Format, Abnormality Colors — all collapsible with clear Required/Optional badges</li>
<li><strong>Overall feel</strong>: warm off-white background, tighter spacing, everything felt intentional</li>
</ul>
<h2 id="what-surprised-me">What surprised me</h2>
<p>The speed was expected. What I didn&rsquo;t expect was the <em>coherence</em>. Normally when I work on UI incrementally — fix the header, then the sidebar, then the preview — things drift. Colors are slightly off, spacing isn&rsquo;t quite consistent, the components feel like they were written at different times (because they were).</p>
<p>Claude Code kept a consistent visual language across every change. I didn&rsquo;t have to go back and fix anything for consistency.</p>
<p>The other thing: it left comments only where genuinely needed. The output looked like code I would have written if I&rsquo;d planned it better up front.</p>
<h2 id="the-result">The result</h2>
<p><img alt="Ideochrom current — after" loading="lazy" src="/images/ideochrom-current.png"></p>
<p>The before and after are pretty stark. The tool is still free at <a href="https://ideochrom.com">ideochrom.com</a> — no account, no install. If you work in genomics or know someone building karyotype figures, it might save them a few hours.</p>
]]></content:encoded></item></channel></rss>