<?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: Baaqar Naqi</title>
    <description>The latest articles on DEV Community by Baaqar Naqi (@baaqar_naqi_d8b55ec7077d0).</description>
    <link>https://dev.to/baaqar_naqi_d8b55ec7077d0</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%2F3998669%2F0ea70401-b7d0-4221-94c4-74ddaca4ae93.jpg</url>
      <title>DEV Community: Baaqar Naqi</title>
      <link>https://dev.to/baaqar_naqi_d8b55ec7077d0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/baaqar_naqi_d8b55ec7077d0"/>
    <language>en</language>
    <item>
      <title>From Chat to Home Screen: Convert Claude Artifacts to PWAs with Zero Config</title>
      <dc:creator>Baaqar Naqi</dc:creator>
      <pubDate>Tue, 23 Jun 2026 11:58:23 +0000</pubDate>
      <link>https://dev.to/baaqar_naqi_d8b55ec7077d0/from-chat-to-home-screen-convert-claude-artifacts-to-pwas-with-zero-config-1in0</link>
      <guid>https://dev.to/baaqar_naqi_d8b55ec7077d0/from-chat-to-home-screen-convert-claude-artifacts-to-pwas-with-zero-config-1in0</guid>
      <description>&lt;h2&gt;
  
  
  The Problem: Claude Artifacts are Stuck in the Chat
&lt;/h2&gt;

&lt;p&gt;We've all been there. You prompt Claude to build a neat little todo list, a habit tracker, or a dashboard. It spits out a beautiful React/HTML artifact. You play with it, think &lt;em&gt;"This is actually useful"&lt;/em&gt;, and then... you close the tab.&lt;/p&gt;

&lt;p&gt;It's gone.&lt;/p&gt;

&lt;p&gt;If you &lt;em&gt;do&lt;/em&gt; save the HTML, turning it into a proper installable mobile app is a nightmare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wrestle with Webpack/Vite configs just to get a &lt;code&gt;manifest.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Write a Service Worker from scratch.&lt;/li&gt;
&lt;li&gt;Pray your &lt;code&gt;localStorage&lt;/code&gt; doesn't get randomly wiped by the OS when the PWA updates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://www.npmjs.com/package/@baaqar/artifact-to-pwa" rel="noopener noreferrer"&gt;&lt;code&gt;@baaqar/artifact-to-pwa&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; to fix all of that in &lt;strong&gt;one command&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: &lt;code&gt;npx artifact-to-pwa&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;No build step. No Android Studio. No Xcode. Just point it at your file or URL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# From a local React/HTML file&lt;/span&gt;
npx artifact-to-pwa ./my-app.jsx

&lt;span class="c"&gt;# From a published Claude artifact URL&lt;/span&gt;
npx artifact-to-pwa https://claude.site/artifacts/abc123

&lt;span class="c"&gt;# Customize it&lt;/span&gt;
npx artifact-to-pwa ./app.html &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"My Tool"&lt;/span&gt; &lt;span class="nt"&gt;--color&lt;/span&gt; &lt;span class="s2"&gt;"#ff6b6b"&lt;/span&gt; &lt;span class="nt"&gt;--out&lt;/span&gt; ./dist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. It generates a fully production-ready PWA folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-app-pwa/
├── index.html    ← Your app, PWA-ready
├── manifest.json ← Icons, colors, display mode
├── sw.js         ← Service worker (offline support)
├── icon.svg      ← Auto-generated icon
└── README.md     ← One-click deploy instructions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Killer Feature: Persistent Storage (localStorage → IndexedDB)
&lt;/h2&gt;

&lt;p&gt;Here is where this package &lt;strong&gt;actually shines&lt;/strong&gt; and differs from every other "PWA wrapper" out there.&lt;/p&gt;

&lt;p&gt;If your artifact uses &lt;code&gt;localStorage&lt;/code&gt; (think: todo lists, streak trackers, user settings, heatmaps), the browser will eventually delete that data. Worse, when a user updates the PWA, the cache clears, and &lt;strong&gt;poof&lt;/strong&gt;—their entire history is gone.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;artifact-to-pwa&lt;/code&gt; automatically detects &lt;code&gt;localStorage&lt;/code&gt; usage and injects a transparent &lt;strong&gt;IndexedDB shim&lt;/strong&gt; behind the scenes. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your artifact keeps using the exact same &lt;code&gt;localStorage&lt;/code&gt; API (no code changes needed).&lt;/li&gt;
&lt;li&gt;All data is actually stored in IndexedDB, which &lt;strong&gt;survives PWA updates and OS cleanups&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It pre-populates an in-memory cache on load so reads stay lightning-fast.&lt;/li&gt;
&lt;li&gt;It briefly hides the page on startup until saved data is ready—preventing that ugly "empty state" flash.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You'll see this magic happen in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⚡ localStorage detected → auto-migrating to IndexedDB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to Install It on Your Phone
&lt;/h2&gt;

&lt;p&gt;Once you run the command, deploying it is drag-and-drop simple:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Host&lt;/th&gt;
&lt;th&gt;Command / Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Netlify&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Drag the folder to &lt;a href="https://netlify.com/drop" rel="noopener noreferrer"&gt;netlify.com/drop&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vercel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npx vercel my-app-pwa&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Push folder contents, enable Pages in settings&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Desktop / Android&lt;/strong&gt;: &lt;code&gt;npx serve my-app-pwa&lt;/code&gt; → Open URL → Click the &lt;strong&gt;Install&lt;/strong&gt; icon in the address bar.&lt;br&gt;
&lt;strong&gt;iPhone / iPad&lt;/strong&gt;: Deploy anywhere → Open in Safari → &lt;strong&gt;Share&lt;/strong&gt; → &lt;strong&gt;Add to Home Screen&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Bother with a PWA instead of an APK?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cross-platform&lt;/strong&gt;: Installs on Android, iOS, Windows, macOS, and Linux simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always up-to-date&lt;/strong&gt;: Users get the latest version automatically—no app store review delays.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline-first&lt;/strong&gt;: The built-in Service Worker caches all assets.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Supported Formats
&lt;/h2&gt;

&lt;p&gt;This tool is smart enough to detect exactly what you throw at it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full HTML&lt;/strong&gt; documents (&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTML fragments&lt;/strong&gt; (partial markup)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React / JSX&lt;/strong&gt; (uses Babel standalone + CDN React—no bundler needed!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public URLs&lt;/strong&gt; (embeds them as a full-screen iframe)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Give it a Spin
&lt;/h2&gt;

&lt;p&gt;If you build with Claude, or if you just hate configuring Webpack manifests, give this a try:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/Baaqar-007/artifact-to-pwa" rel="noopener noreferrer"&gt;Check it out on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://www.npmjs.com/package/@baaqar/artifact-to-pwa" rel="noopener noreferrer"&gt;Install from NPM&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Drop a star ⭐ if it saves you time, and let me know what you build with it!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Made with ❤️ to keep Claude artifacts alive outside the chat.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>pwa</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
