<?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: Akash Ghosh</title>
    <description>The latest articles on DEV Community by Akash Ghosh (@akashleo).</description>
    <link>https://dev.to/akashleo</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%2F3297792%2F5800102f-133b-4e84-80a5-29d468ae70a8.jpeg</url>
      <title>DEV Community: Akash Ghosh</title>
      <link>https://dev.to/akashleo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akashleo"/>
    <language>en</language>
    <item>
      <title>How I put clouds in my portfolio and why?</title>
      <dc:creator>Akash Ghosh</dc:creator>
      <pubDate>Mon, 01 Sep 2025 09:00:24 +0000</pubDate>
      <link>https://dev.to/akashleo/how-i-put-clouds-in-my-portfolio-and-why-b9m</link>
      <guid>https://dev.to/akashleo/how-i-put-clouds-in-my-portfolio-and-why-b9m</guid>
      <description>&lt;p&gt;Well, I made my portfolio and there is one feature I am proud of. &lt;/p&gt;

&lt;p&gt;I did not plan on it initially, but there arose the reason. I thought of putting something novel that is unique to my portfolio. I pondered over the thought and then it struck, I could put my name in my portfolio and then when clicked, I could show it's meaning and that's when it hit me that I could put a cloud animation. &lt;/p&gt;

&lt;p&gt;I chalked out the basic plan, I needed few transparent cloud images to begin with, looked up the internet, found the best ones in &lt;a href="https://pngtree.com/so/cloud" rel="noopener noreferrer"&gt;https://pngtree.com/so/cloud&lt;/a&gt;. Got 5 cloud images from there. &lt;/p&gt;

&lt;p&gt;Now let's discuss the system, what I needed was when clicked on the CTA, I need the clouds to appear from either side and keep on moving horizontally. And I needed the full window to be used for this animation, and the clouds will appear over the existing content. &lt;/p&gt;

&lt;p&gt;So three requirements: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clouds should move from either direction.&lt;/li&gt;
&lt;li&gt;Clouds should move from either side of the screen. &lt;/li&gt;
&lt;li&gt;The viewport should the the window for the clouds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This was the viewport stack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Z-Index Structure:
   - Original background: z-index 0 (default)
   - Sky background: z-index 10
   - Component tiles: z-index 20
   - Clouds: z-index 30
   - Navbar: z-index 40 (to stay on top)
*/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Starting with the container this was the container styles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.cloud-container {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  width: 100%;
  white-space: nowrap;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the clouds animations, or how it will appear on the screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Continuous marquee animations for clouds */
@keyframes marqueeLeftToRight {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100vw); }
}

@keyframes marqueeRightToLeft {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes marqueeLeftToRight {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100vw); }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But as it was working it was time to add a few more features. &lt;br&gt;
I had dark/light mode for my website I wanted the clouds background to change with the theme as well, and also add a daytime feature on it. So from dark/light it now has dark/midday/light themes. &lt;/p&gt;

&lt;p&gt;The styles for the clouds are as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Cloud positions and animations - continuous marquee effect */
.cloud1 {
  top: 0%;
  animation: marqueeRightToLeft 40s linear infinite;
}

.cloud2 {
  top: 15%;
  transform: scale(0.6);
  opacity: 0.9;
  animation: marqueeLeftToRight 45s linear infinite;
}

.cloud3 {
  top: 2%;
  transform: scale(0.8);
  opacity: 0.8;
  animation: marqueeRightToLeft 50s linear infinite;
}

.cloud4 {
  top: 18%;
  transform: scale(0.75);
  opacity: 0.75;
  animation: marqueeLeftToRight 55s linear infinite;
}

.cloud5 {
  top: 20%;
  transform: scale(0.7);
  opacity: 0.8;
  animation: marqueeRightToLeft 60s linear infinite;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the themes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.cloud-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
}

/* Light theme cloud styles */
.light .cloud-img {
  filter: brightness(1.1);
  opacity: 0.7;
}

/* Dark theme cloud styles */
.dark .cloud-img {
  filter: brightness(0.9) hue-rotate(240deg);
  opacity: 0.6;
}

/* Dusk theme cloud styles */
.dusk .cloud-img {
  filter: brightness(0.7) hue-rotate(320deg);
  opacity: 0.6;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I get it the complexity increases, but it looks so cool. &lt;br&gt;
The color scheme for the backgrounds are as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**Light Theme:**
- Default: Cream (`#fdf5e0`)
- Clouds: Sky Blue (`#87CEEB`)

**Dark Theme:**
- Default: Black (`#000000`)
- Clouds: Dark Navy (`#141852`)

**Dusk Theme:**
- Default: Dark Blue (`#4E5481`)
- Clouds: Light Purple (`#d2c4f4`)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the features were&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
#### Individual Cloud Behaviors
- **Cloud 1**: Right-to-left, 40s duration, top position (0%)
- **Cloud 2**: Left-to-right, 45s duration, scaled to 60%, position (15%)
- **Cloud 3**: Right-to-left, 50s duration, scaled to 80%, position (2%)
- **Cloud 4**: Left-to-right, 55s duration, scaled to 75%, position (18%)
- **Cloud 5**: Right-to-left, 60s duration, scaled to 70%, position (20%)

#### Animation Characteristics
- **Continuous Loop**: Clouds move from completely off-screen to completely off-screen
- **No Interruption**: Animation runs perpetually without stopping
- **Varied Timing**: Different speeds create natural, organic movement
- **Layered Depth**: Different scales and positions create 3D depth illusion

&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%2F4juwbircm9tp419o7af8.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%2F4juwbircm9tp419o7af8.png" alt=" " width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here it was, everything was working perfectly. &lt;br&gt;
Then it struck me, if I found it so cool, why not publish it as a public npm package. &lt;/p&gt;

&lt;p&gt;Another planning phase now, I need to identify the files and styles that are important for the cloud animation feature. My initial plan was to display the clouds when the text আকাশ (akash) is clicked, but I cannot export it like that. I needed a cloud on/off button. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This feature adds an interactive sky background with animated clouds to your portfolio. When the user clicks on the Bengali text "আকাশ" (which means "sky"), the background transforms into a beautiful themed sky with clouds floating across the screen in continuous marquee-style movement. The animation is theme-aware and provides visual feedback to guide user interaction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Made a extraction plan for all the files and keep it as a separate folder inside the project. The directory structure being.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;react-cloud-animation/
├── src/
│   ├── components/
│   │   ├── CloudAnimation.tsx
│   │   └── ThemeToggle.tsx
│   ├── context/
│   │   └── ThemeContext.tsx
│   ├── styles/
│   │   └── animations.css
│   ├── assets/
│   │   ├── cloud1.png
│   │   ├── cloud2.png
│   │   ├── cloud3.png
│   │   ├── cloud4.png
│   │   └── cloud5.png
│   ├── types/
│   │   └── index.ts
│   └── index.ts
├── dist/ (build output)
├── package.json
├── tsconfig.json
├── vite.config.ts
├── README.md
└── CHANGELOG.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then the extraction ritual.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
#### CloudAnimation.tsx
- **Source**: `src/components/CloudAnimation.tsx`
- **Modifications needed**:
  - Remove portfolio-specific imports
  - Make cloud image paths configurable via props
  - Add prop interface for customization
  - Export component with proper TypeScript types

#### ThemeContext.tsx
- **Source**: `src/context/ThemeContext.tsx`
- **Modifications needed**:
  - Keep core theme logic (time-based, manual override)
  - Remove any portfolio-specific dependencies
  - Ensure localStorage keys are configurable
  - Add proper TypeScript exports

#### ThemeToggle.tsx
- **Source**: `src/components/ThemeToggle.tsx`
- **Modifications needed**:
  - Ensure lucide-react dependency is properly declared
  - Add customizable styling props
  - Remove portfolio-specific styling classes

#### animations.css
- **Source**: Extract from `src/index.css` (lines 71-343)
- **Include**:
  - Cloud container styles (`.cloud-container`, `.cloud-img`)
  - Marquee animations (`@keyframes marqueeLeftToRight`, `@keyframes marqueeRightToLeft`)
  - Cloud positioning classes (`.x1`, `.x2`, `.x3`, `.x4`, `.x5`)
  - Theme-specific cloud filters (`.light .cloud-img`, `.dark .cloud-img`, `.dusk .cloud-img`)
  - Glow animations (`@keyframes subtleGlow`, `@keyframes prominentGlow`)
  - Click indicator animations (`.click-indicator`)
  - Fade animations (`@keyframes fadeIn`, `@keyframes fadeOut`)
  - Z-index structure comments and rules
&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%2Fa63ue12vub9dww360463.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%2Fa63ue12vub9dww360463.png" alt=" " width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now here it was, a new project with the cloud animation ready to be published as a npm package. It was time to test it out and create a preview application for this.&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%2F6jk58v20iej7uagtn6p4.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%2F6jk58v20iej7uagtn6p4.png" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Typed out a few prompts on windsurf and voila, it's up. Another challenge arose, I had two sections on the preview page for the cloud animation and as they were using the same context provider, the theme and cloud animation will all be syncing. &lt;/p&gt;

&lt;p&gt;I did not want that, and created a separate provider and controls for the demo section. And now it was perfect.&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%2Fu0zbiztp21cdklb2evjf.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%2Fu0zbiztp21cdklb2evjf.png" alt=" " width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ans that's it, that's the story of how I put clouds in my portfolio, it fun throughout the process. I published and put it up everywhere for a little bit promotion and I'm done. I'll keep on contributing to the repo and if anyone has a idea of how to make it better, reach out to me on &lt;a href="https://x.com/akashleo_tw" rel="noopener noreferrer"&gt;X&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Checkout the project at &lt;a href="https://cloudanimation.akashghosh.xyz/" rel="noopener noreferrer"&gt;cloudanimation&lt;/a&gt;, &lt;br&gt;
&lt;a href="https://www.npmjs.com/package/react-cloud-animation" rel="noopener noreferrer"&gt;npm package&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading this far and see you again in the next story.&lt;/p&gt;

</description>
      <category>react</category>
      <category>animation</category>
      <category>css</category>
      <category>npm</category>
    </item>
    <item>
      <title>that time when I had to create a npm package that didn't exist.</title>
      <dc:creator>Akash Ghosh</dc:creator>
      <pubDate>Thu, 03 Jul 2025 11:22:16 +0000</pubDate>
      <link>https://dev.to/akashleo/that-time-when-i-had-to-create-a-npm-package-that-didnt-exist-jd8</link>
      <guid>https://dev.to/akashleo/that-time-when-i-had-to-create-a-npm-package-that-didnt-exist-jd8</guid>
      <description>&lt;p&gt;While working at PhonePe, the first team I was with was the QA team. The backend devs worked from the Pune office and I was from the Bangalore office. They had built a IssueTracker bot on slack, where the QA team would report issues that they found anywhere with the developed features in staging, production and other environments. It was also for user raised issues in the live application. &lt;/p&gt;

&lt;p&gt;I had to build the frontend which was to add an entire module called Slack Oncall. The idea was that from the application we could address the resolution to the issue raised and also see stats of how the issues are being raised, how it is being resolved and in which category there would be more issues. There was extensive data visualization in the application which i would address through recharts mostly. &lt;/p&gt;

&lt;p&gt;One time they needed a feature for a situation, where one issue is raised for the wrong team and they could pass the issue to a team they seemed fit. With this another problem arose, we needed to keep track of the teams who have looked into this issue. And there were issues which have been passed down to 10+ teams. We needed a way to visualise this and that's how  hoplist was conceptualized. &lt;/p&gt;

&lt;p&gt;Initially we called it a "hopping list" that would be there with the issue detail, to display which teams had worked on the issue. Hopping as in the issue had hopped from one team to another. I analysed the feature request and figured a horizontal timeline will fit our requirement. &lt;/p&gt;

&lt;p&gt;I looked up for horizontal timelines on the npm library, but there was none that fit my requirement, there were mostly vertical timelines with a lot more customization and a lot heavier than necessary. And for the UI I was working with a horizontal timeline would be the best.&lt;br&gt;
I tried a few other npm libraries but everything would break in the UI and there was far more parameters than i needed. &lt;/p&gt;

&lt;p&gt;Then I thought to myself, how hard could it be if I made a horizontal timeline component. I gave it a shot, sat down for 4 hours and made one ith minimal customization, it looked rustic, but it did fit my requirement. &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%2Ff5zrzgyo2ewzdz5spt8x.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%2Ff5zrzgyo2ewzdz5spt8x.png" alt="Image description" width="800" height="633"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then I decided to publish it as a npm package, well that didn't happen right away, I slacked off for a few months but I published it and within the first week of publishing it, it had 300+ downloads. That metric really made me happy. &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%2Fy8g8ywys86ih2e6srow1.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%2Fy8g8ywys86ih2e6srow1.png" alt="Image description" width="800" height="758"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I got some feedback for the line breaking issue and decided to push an update, and now the component only returns a horizontally scrollable timeline. &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%2Fh0c83tbyj26su62nj9wo.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%2Fh0c83tbyj26su62nj9wo.png" alt="Image description" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So yeah my first npm package is live now and it has 128 weekly downloads as of today. Good stuff to make a dev happy. &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%2Ff2cpabuff5yorxsysncf.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%2Ff2cpabuff5yorxsysncf.png" alt="Image description" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try out the package from &lt;a href="https://www.npmjs.com/package/hoplist" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/hoplist&lt;/a&gt;&lt;br&gt;
Check out the demo at &lt;a href="https://hoplist.akashghosh.xyz/" rel="noopener noreferrer"&gt;https://hoplist.akashghosh.xyz/&lt;/a&gt;&lt;br&gt;
Play around in &lt;a href="https://codesandbox.io/p/sandbox/mkr354" rel="noopener noreferrer"&gt;https://codesandbox.io/p/sandbox/mkr354&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also check out the code from &lt;a href="https://github.com/akashleo/hoplist" rel="noopener noreferrer"&gt;https://github.com/akashleo/hoplist&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;And that's a wrap, see you in another blog.&lt;/p&gt;

</description>
      <category>npm</category>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
