<?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: Metro Wantsummore</title>
    <description>The latest articles on DEV Community by Metro Wantsummore (@metro_wantsummore_f2fa24c).</description>
    <link>https://dev.to/metro_wantsummore_f2fa24c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3128959%2F812c5c85-641f-43fd-b373-023c22559797.jpg</url>
      <title>DEV Community: Metro Wantsummore</title>
      <link>https://dev.to/metro_wantsummore_f2fa24c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/metro_wantsummore_f2fa24c"/>
    <language>en</language>
    <item>
      <title>Built a Simple Box Breathing PWA to Help You Relax</title>
      <dc:creator>Metro Wantsummore</dc:creator>
      <pubDate>Tue, 23 Dec 2025 12:08:14 +0000</pubDate>
      <link>https://dev.to/metro_wantsummore_f2fa24c/built-a-simple-box-breathing-pwa-to-help-you-relax-1kf</link>
      <guid>https://dev.to/metro_wantsummore_f2fa24c/built-a-simple-box-breathing-pwa-to-help-you-relax-1kf</guid>
      <description>&lt;p&gt;In today's fast-paced world, taking a moment to just &lt;em&gt;breathe&lt;/em&gt; can make a huge difference. I wanted a simple, frictionless way to practice breathing exercises without downloading heavy apps or dealing with ads. So, I built one!&lt;/p&gt;

&lt;p&gt;Meet &lt;strong&gt;Box Breathing&lt;/strong&gt;, a lightweight Progressive Web App (PWA) designed to help you focus and de-stress.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Live Demo:&lt;/strong&gt;  &lt;a href="https://box-breathing.org" rel="noopener noreferrer"&gt;Box breathing&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ What Problem Does It Solve?
&lt;/h2&gt;

&lt;p&gt;Sometimes you just need 2 minutes to reset. Native apps often come with sign-ups, paywalls, or slow load times. This web app is instant, works offline, and gets straight to the point.&lt;/p&gt;

&lt;p&gt;It guides you through a rhythmic breathing cycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Inhale&lt;/strong&gt;: The circle contracts.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Exhale&lt;/strong&gt;: The circle expands.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🛠️ Key Features
&lt;/h2&gt;

&lt;p&gt;I kept the feature set focused on the core experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Customizable Duration&lt;/strong&gt;: Choose presets like 8s, 10s, 12s, or set your own custom loop (4s-60s).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Visual &amp;amp; Audio Cues&lt;/strong&gt;: A smooth visual animation accompanied by a gentle beep (Web Audio API) to keep you on rhythm without looking at the screen.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Haptic Feedback&lt;/strong&gt;: Uses the Vibration API (on supported Android devices) for a tactile experience.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Always On&lt;/strong&gt;: Implements the &lt;strong&gt;Screen Wake Lock API&lt;/strong&gt; so your phone doesn't sleep in the middle of a session.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;PWA Support&lt;/strong&gt;: Installable on your home screen and fully functional offline via Service Workers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💻 Tech Stack: Back to Basics
&lt;/h2&gt;

&lt;p&gt;I decided to skip the heavy frameworks (no React, no Vue) to keep the bundle size tiny and the performance buttery smooth.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Core&lt;/strong&gt;: Semantic HTML5 &amp;amp; Vanilla JavaScript.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Styling&lt;/strong&gt;: Pure CSS3 for the layout and the 60fps animations.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;PWA&lt;/strong&gt;: A hand-written &lt;code&gt;service-worker.js&lt;/code&gt; for caching strategy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Snippet: The Wake Lock
&lt;/h3&gt;

&lt;p&gt;One of the coolest web APIs I used was the Screen Wake Lock API to prevent the display from turning off.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;wakeLock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;requestWakeLock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;wakeLock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wakeLock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;screen&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Screen Wake Lock active&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&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;h2&gt;
  
  
  🚀 Try It Using It
&lt;/h2&gt;

&lt;p&gt;I built this for myself, but I hope it helps you find a moment of calm in your day too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Give it a try here:&lt;/strong&gt; &lt;a href="https://box-breathing.org" rel="noopener noreferrer"&gt;https://box-breathing.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More Apps Here:&lt;/strong&gt;&lt;br&gt;
&lt;a href="http://humandesignchart.org/" rel="noopener noreferrer"&gt;humandesignchart.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blinklyai.com/" rel="noopener noreferrer"&gt;https://blinklyai.com/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://sailorpiece.pro" rel="noopener noreferrer"&gt;https://sailorpiece.pro&lt;/a&gt;&lt;br&gt;
Let me know what you think in the comments! 👇&lt;/p&gt;

</description>
      <category>pwa</category>
      <category>cloudflarechallenge</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
