<?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>Forem: Alireza Azizi</title>
    <description>The latest articles on Forem by Alireza Azizi (@zizialireza).</description>
    <link>https://forem.com/zizialireza</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%2F2537419%2F73d19e8d-4673-447b-8bb2-a3e6099f13b7.jpg</url>
      <title>Forem: Alireza Azizi</title>
      <link>https://forem.com/zizialireza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/zizialireza"/>
    <language>en</language>
    <item>
      <title>From Inspiration to NPM: How I Built a React Library with "Vibe Coding"</title>
      <dc:creator>Alireza Azizi</dc:creator>
      <pubDate>Mon, 16 Jun 2025 14:10:19 +0000</pubDate>
      <link>https://forem.com/zizialireza/from-inspiration-to-npm-how-i-built-a-react-library-with-vibe-coding-2do3</link>
      <guid>https://forem.com/zizialireza/from-inspiration-to-npm-how-i-built-a-react-library-with-vibe-coding-2do3</guid>
      <description>&lt;p&gt;It all started with a spark of inspiration. I was Browse through Awwwards and stumbled upon a stunningly fluid, infinite gallery: &lt;a href="https://300.yourmajesty.co/" rel="noopener noreferrer"&gt;300.yourmajesty.co&lt;/a&gt;. I was captivated by the seamless, multi-directional drag experience. It felt like exploring a vast, endless world of images.&lt;/p&gt;

&lt;p&gt;The immediate developer thought kicked in: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How would I build this?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But then, a more interesting challenge emerged: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How quickly could I build this by using AI as my primary tool, guiding it instead of writing every line of code myself?&lt;br&gt;
 This set me on a fascinating journey to see how far I could push AI-assisted development, a process I like to call &lt;strong&gt;"Vibe Coding."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1: The AI Prototype in Canva
&lt;/h2&gt;

&lt;p&gt;Why start with a tool like Canva instead of jumping straight into a code editor? For highly visual, self-contained components, I've found that visual AI generators can create a strong baseline much faster. To give the AI the best chance of success, I crafted a single, comprehensive prompt that detailed everything I wanted, from the core mechanics to the interaction details.&lt;/p&gt;

&lt;p&gt;This was my starting prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Please create a highly performant, infinite image gallery inspired by the website 300.yourmajesty.co.

Core Mechanics:

The gallery should be an infinite grid of images that can be freely explored by dragging in any direction (horizontal and vertical), with smooth, inertia-based movement.
It must be truly infinite, wrapping around seamlessly in all directions. If a user scrolls continuously, they should eventually return to the start, like navigating a 2D torus.
Layout &amp;amp; Visuals:

Use a collection of 60 unique images in a clean, structured grid with generous spacing between them.
The images should be fixed in their grid positions, with no fade-in or move-in animations on load or scroll. They should feel like part of a pre-existing world.
Interaction:

The drag interaction should be natural: dragging right should move the content to the left, and dragging up should move the content down.
Remove all hover effects.
When an image is clicked, it should smoothly animate to a fullscreen lightbox. The lightbox must be closable by clicking outside the image or pressing the Escape key.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After providing this detailed prompt and iterating with the AI through a few versions to refine the output, I had a strong code base to work with. While Canva doesn't have a direct 'export code' feature, there's a simple workaround: if you inspect the live preview, you'll find the complete code for the project rendered cleanly inside an &lt;code&gt;iframe&lt;/code&gt;, ready to be saved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: From Raw Code to a React Component with Vibe Coding
&lt;/h2&gt;

&lt;p&gt;Now I had a working prototype, but it was just a collection of static files. My goal was to turn it into a reusable React component.&lt;/p&gt;

&lt;p&gt;I brought the code into Cursor, an AI-first code editor. This is where "Vibe Coding" really shined. Instead of manually rewriting everything, I began a back-and-forth conversation with the AI. I guided it to refactor the entire codebase into a proper React component. When bugs inevitably appeared during the conversion, like the grid alignment breaking on window resize, I described the unwanted behavior and worked with the AI through prompts to fix it. It was a process of wrangling and refining the logic, all done conversationally, without me manually typing the implementation code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: The Final Product, Published and Ready to Use! ✨
&lt;/h2&gt;

&lt;p&gt;After a few final tweaks with the AI, the component was ready. Of course, this is a more foundational version of the incredibly polished Awwwards site, but it captures the core infinite-scrolling mechanic and serves as a great starting point for more complex projects.&lt;/p&gt;

&lt;p&gt;It was clean, functional, and ready to be shared. I published it to both GitHub and NPM, making it available for anyone to use.&lt;/p&gt;

&lt;p&gt;Here is the result of this AI-powered journey:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🎨 Live Demo: See it in action on &lt;a href="https://codesandbox.io/p/sandbox/djftlv" rel="noopener noreferrer"&gt;CodeSandBox&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📦 NPM Package: Install it in your project with &lt;code&gt;npm i react-infinite-gallery&lt;/code&gt; - &lt;a href="https://www.npmjs.com/package/react-infinite-gallery" rel="noopener noreferrer"&gt;View on npmjs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;👨‍💻 Source Code: Fork it, star it, or contribute on &lt;a href="https://github.com/AlirezaAzizi145/react-infinite-gallery" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion: Your New AI Pair Programmer
&lt;/h2&gt;

&lt;p&gt;This experiment was a powerful reminder that the role of a developer is evolving. It's becoming less about the syntax we type and more about our ability to clearly articulate a vision and guide intelligent tools to realize it.&lt;/p&gt;

&lt;p&gt;This process of "Vibe Coding," or conversational development, didn't replace me. It augmented me. It handled the tedious work of boilerplate, refactoring, and debugging, which freed me up to focus on the creative and architectural decisions. It turned a weekend-long project into an afternoon's work.&lt;/p&gt;

&lt;p&gt;What will you build with your new AI partner?&lt;/p&gt;

</description>
      <category>react</category>
      <category>vibecoding</category>
      <category>ai</category>
      <category>npm</category>
    </item>
    <item>
      <title>Vibe Coding: When Building a 3D React Component Felt Easier Than Making Coffee</title>
      <dc:creator>Alireza Azizi</dc:creator>
      <pubDate>Wed, 04 Jun 2025 17:59:35 +0000</pubDate>
      <link>https://forem.com/zizialireza/vibe-coding-when-building-a-3d-react-component-felt-easier-than-making-coffee-49d6</link>
      <guid>https://forem.com/zizialireza/vibe-coding-when-building-a-3d-react-component-felt-easier-than-making-coffee-49d6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Creating an interactive 3D component with drag controls, smooth animation, and React compatibility typically involves hours of development. But what if the process could be driven by conversation instead of code?&lt;/p&gt;

&lt;p&gt;This article documents how I used AI tools to build a complete 3D cube component, publish it as an npm package, and support both React and vanilla JavaScript environments—all without manually writing a single line of code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting with a Single Prompt
&lt;/h2&gt;

&lt;p&gt;The process began with a prompt in Canva Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a smooth and interactive 3D rotating cube where
each of the six faces displays a different image.
The cube should rotate continuously around both the X and Y axes using GSAP.
Users must be able to click and drag to manually rotate the cube in any direction.
While the user is interacting with the cube, the automatic rotation should pause
and resume shortly after interaction stops 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Canva generated the initial HTML, CSS, and JavaScript in seconds. The output wasn’t just functional—it was surprisingly refined for a first version.&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%2F05dvok0hksocspcj4fdt.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%2F05dvok0hksocspcj4fdt.png" alt="Image description" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Canva Performed So Well
&lt;/h2&gt;

&lt;p&gt;One likely reason Canva produced such a solid starting point is its training on a vast visual design and UI database. Its model seems particularly adept at UI generation, possibly because it has learned design heuristics and layout logic from countless web-based interfaces. While it may not be ideal for backend logic, it excels when the task involves layout, animation, or user interaction patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expanding with Cursor and Claude
&lt;/h2&gt;

&lt;p&gt;After generating the base version in Canva, I imported the project into Cursor IDE and began refining it with Claude Sonnet. Through a series of short conversations, I introduced several enhancements:&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Interactivity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Asked for drag rotation with inertia&lt;/li&gt;
&lt;li&gt;Claude provided a natural-feeling drag-and-rotate mechanic&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Supporting Multiple Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Requested a variation for videos, and another for dashboard previews&lt;/li&gt;
&lt;li&gt;AI split the codebase into reusable templates&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  React Conversion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Asked to port the vanilla version into a React component&lt;/li&gt;
&lt;li&gt;Code was restructured with prop support and a reusable API&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Mobile Compatibility
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Requested mobile touch controls and responsive design&lt;/li&gt;
&lt;li&gt;AI adapted the interactions to work across devices&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Final Component
&lt;/h2&gt;

&lt;p&gt;The end result is a configurable, flexible, and well-structured React component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Cube3D
  faces={[
    { type: 'image', content: '/path/to/image1.jpg' },
    { type: 'video', content: '/path/to/video.mp4' },
    { type: 'html', content: '&amp;lt;div&amp;gt;Custom HTML&amp;lt;/div&amp;gt;' },
    { type: 'image', content: '/path/to/image2.jpg' },
    { type: 'image', content: '/path/to/image3.jpg' },
    { type: 'empty' }
  ]}
  autoRotate={true}
  rotationSpeed={0.5}
  enableDrag={true}
  size={300}
  borderRadius={10}
/&amp;gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Supported Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Image, video, HTML, and empty faces&lt;/li&gt;
&lt;li&gt;Configurable auto-rotation and speed&lt;/li&gt;
&lt;li&gt;Drag interactions with momentum&lt;/li&gt;
&lt;li&gt;Mobile and touch support&lt;/li&gt;
&lt;li&gt;Responsive design&lt;/li&gt;
&lt;li&gt;Custom styles and sizing&lt;/li&gt;
&lt;li&gt;TypeScript types&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Packaging Without Manual Commands
&lt;/h2&gt;

&lt;p&gt;I didn’t manually write a &lt;code&gt;package.json&lt;/code&gt;, run a CLI, or push to npm. The AI handled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating and configuring the package&lt;/li&gt;
&lt;li&gt;Writing documentation&lt;/li&gt;
&lt;li&gt;Publishing to npm&lt;/li&gt;
&lt;li&gt;Managing folder structure for both React and vanilla versions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Folder Structure Overview
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;react-interactive-cube3d/
├── React/                 // React components
├── HTML-CSS-JS/          // Vanilla JavaScript version
├── packages/             // NPM package files
└── examples/             // Usage demos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Practical Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;This component has potential in various settings:&lt;/li&gt;
&lt;li&gt;Game inventory interfaces&lt;/li&gt;
&lt;li&gt;Corporate landing pages&lt;/li&gt;
&lt;li&gt;Personal portfolios&lt;/li&gt;
&lt;li&gt;Mobile app widgets&lt;/li&gt;
&lt;li&gt;Media gallery previews&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reflections on Vibe Coding
&lt;/h2&gt;

&lt;p&gt;Using AI tools to build this project highlighted some key insights:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. High-Level Thinking
&lt;/h2&gt;

&lt;p&gt;Instead of diving into syntax, I was able to focus on design goals, behavior, and end-user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Conversational Development
&lt;/h2&gt;

&lt;p&gt;All iterations were prompt-based. I never had to switch mental models or get lost in implementation details.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Consistent Documentation
&lt;/h2&gt;

&lt;p&gt;The AI tools created docs, examples, and comments by default, leading to a clean and approachable codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Reduced Technical Debt
&lt;/h2&gt;

&lt;p&gt;Because the AI iteratively refined the code and tested various edge cases, the component remained relatively robust without shortcuts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation and Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; import { Cube3D } from 'react-interactive-cube3d';
 import 'react-interactive-cube3d/dist/cube3d.css';

function App() {
  const faces = [
    { type: 'image', content: '/image1.jpg' },
    { type: 'image', content: '/image2.jpg' },
    { type: 'video', content: '/video.mp4' },
    { type: 'html', content: '&amp;lt;h2&amp;gt;Hello World!&amp;lt;/h2&amp;gt;' },
    { type: 'image', content: '/image3.jpg' },
    { type: 'empty' }
  ];

  return (
    &amp;lt;Cube3D
      faces={faces}
      size={300}
      autoRotate={true}
      enableDrag={true}
      rotationSpeed={0.5}
    /&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;This project was a small but meaningful glimpse into what’s possible when interface design and development are driven by intent rather than implementation. By offloading low-level tasks to AI tools, developers can focus on structure, interaction, and creativity.&lt;/p&gt;

&lt;p&gt;It’s not about avoiding code, it’s about spending your energy where it matters most.&lt;/p&gt;

&lt;p&gt;Links&lt;br&gt;
GitHub: &lt;a href="https://github.com/AlirezaAzizi145/react-interactive-cube3d" rel="noopener noreferrer"&gt;react-interactive-cube3d&lt;/a&gt;&lt;br&gt;
NPM: &lt;a href="https://www.npmjs.com/package/react-interactive-cube3d" rel="noopener noreferrer"&gt;react-interactive-cube3d&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://codesandbox.io/p/sandbox/65s9d9" rel="noopener noreferrer"&gt;CodeSandBox Demo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>vibecoding</category>
      <category>gsap</category>
      <category>react</category>
    </item>
  </channel>
</rss>
