<?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: Asim786521</title>
    <description>The latest articles on DEV Community by Asim786521 (@asim786521).</description>
    <link>https://dev.to/asim786521</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%2F806124%2Ff3585418-d089-43f5-a238-31db921da6ef.png</url>
      <title>DEV Community: Asim786521</title>
      <link>https://dev.to/asim786521</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asim786521"/>
    <language>en</language>
    <item>
      <title>The Hidden World of the DOM &amp; Virtual DOM Explained Simply</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Thu, 11 Sep 2025 07:38:24 +0000</pubDate>
      <link>https://dev.to/asim786521/the-hidden-world-of-the-dom-virtual-dom-explained-simply-12a3</link>
      <guid>https://dev.to/asim786521/the-hidden-world-of-the-dom-virtual-dom-explained-simply-12a3</guid>
      <description>&lt;h2&gt;
  
  
   Understanding the DOM Deeply
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What is DOM?
&lt;/h2&gt;

&lt;p&gt;The DOM (Document Object Model) is a tree-like structure of nodes, where each node represents a part of the document.&lt;/p&gt;

&lt;p&gt;When we open the browser console, we can see the HTML of the website we visited. In reality, the HTML is passed to the browser as a stream of text, and then the DOM is built by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parsing the HTML using the HTML parser&lt;/li&gt;
&lt;li&gt;Converting HTML tags into element nodes&lt;/li&gt;
&lt;li&gt;Converting text into text nodes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build Flow of the DOM in the Browser
&lt;/h2&gt;

&lt;p&gt;Stream of text&lt;br&gt;&lt;br&gt;
==&amp;gt; Check for &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag (if found, run script first)&lt;br&gt;&lt;br&gt;
==&amp;gt; HTML parser converts text&lt;br&gt;&lt;br&gt;
==&amp;gt; HTML tags converted into nodes&lt;br&gt;&lt;br&gt;
==&amp;gt; Build DOM tree  &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%2Ff35wutim8l1tnsu00s8k.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%2Ff35wutim8l1tnsu00s8k.png" alt="Flow diagram showing how the browser parses HTML and builds the DOM tree" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Figure 1: Flow of DOM construction in the browser&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Relation with JavaScript
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The DOM is not part of JavaScript.&lt;/li&gt;
&lt;li&gt;It is a Web API provided by browsers that allows JavaScript to interact with and manipulate websites.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Difference with Virtual DOM
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Virtual DOM is used in React.&lt;/li&gt;
&lt;li&gt;It is a lightweight representation of the real DOM tree.&lt;/li&gt;
&lt;li&gt;Essentially, it is a JavaScript object representation of the UI.&lt;/li&gt;
&lt;li&gt;When an event happens in React:

&lt;ol&gt;
&lt;li&gt;A new Virtual DOM is created&lt;/li&gt;
&lt;li&gt;It is compared with the old one using diffing&lt;/li&gt;
&lt;li&gt;Differences are found using the reconciliation algorithm, and only those parts are updated in the real DOM&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&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%2F920v32kwpf06b0rhchzf.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%2F920v32kwpf06b0rhchzf.png" alt="Diagram comparing Real DOM and Virtual DOM updates in React" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Figure 2: Real DOM vs Virtual DOM updates in React&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The DOM is the foundation of how browsers render and interact with web pages. It provides a tree-like structure that JavaScript can manipulate to make websites dynamic and interactive. However, working directly with the real DOM can be slow and inefficient for large or frequently updated applications.&lt;/p&gt;

&lt;p&gt;That’s where the Virtual DOM comes in. By keeping a lightweight copy of the real DOM in memory, React can efficiently determine what needs to change and update only those parts — resulting in faster, smoother performance.&lt;/p&gt;

&lt;p&gt;Understanding both the DOM and the Virtual DOM is essential for every modern web developer. With this knowledge, you’ll have a clearer view of how browsers work under the hood and how frameworks like React optimize UI updates.&lt;/p&gt;




&lt;p&gt;💡 What about you? Have you faced performance issues while manipulating the DOM directly? Or do you prefer working with frameworks like React that handle the Virtual DOM for you? Share your thoughts in the comments!&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Use Lazy Routing with React Suspense to Optimize Performance</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Wed, 03 Sep 2025 03:56:32 +0000</pubDate>
      <link>https://dev.to/asim786521/use-lazy-routing-with-react-suspense-to-optimize-performance-3fbh</link>
      <guid>https://dev.to/asim786521/use-lazy-routing-with-react-suspense-to-optimize-performance-3fbh</guid>
      <description>&lt;p&gt;When we handle asynchronous operations in React, &lt;strong&gt;Suspense&lt;/strong&gt; is mainly used to optimize the UI by placing a placeholder UI during rendering.  &lt;/p&gt;

&lt;p&gt;Using the &lt;code&gt;Suspense&lt;/code&gt; component, the UI can be anything from a simple placeholder to a loading spinner. The &lt;code&gt;fallback&lt;/code&gt; is a React node that serves as a lightweight view before the child component runs. Suspense will automatically switch to the fallback when its children are still loading.  &lt;/p&gt;

&lt;p&gt;👉 The ideal case is when we don’t need to load a component upfront. Instead, we render it only when needed. In most cases, Suspense is used with &lt;strong&gt;lazy-loaded components&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 What is a lazy-loaded component?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;lazy-loaded component&lt;/strong&gt; is a performance optimization technique that improves web application speed and efficiency by &lt;strong&gt;delaying non-essential resources until they are actually needed&lt;/strong&gt; by the user.  &lt;/p&gt;

&lt;p&gt;This feature was introduced in &lt;strong&gt;React 16.6&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Real Case Example
&lt;/h2&gt;

&lt;p&gt;I faced this problem when I created a &lt;strong&gt;modal component&lt;/strong&gt; that rendered conditionally based on a specific event.  &lt;/p&gt;

&lt;p&gt;Inside the modal, there was a &lt;strong&gt;child component&lt;/strong&gt; responsible for:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Converting data into a file
&lt;/li&gt;
&lt;li&gt;Uploading the file through a web service
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The challenge:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The child component’s data was &lt;strong&gt;dynamic&lt;/strong&gt; (changed each time).
&lt;/li&gt;
&lt;li&gt;I noticed a &lt;strong&gt;delay in opening the modal&lt;/strong&gt; because the child component was heavy.
&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;bundle size&lt;/strong&gt; was also too large.
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;📌 You might also like my previous post:  &lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/asim786521/how-i-built-my-saas-mvp-in-20-days-lessons-learned-4gic" class="crayons-story__hidden-navigation-link"&gt;How I Built My SaaS MVP in 20 Days (Lessons Learned)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/asim786521" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F806124%2Ff3585418-d089-43f5-a238-31db921da6ef.png" alt="asim786521 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/asim786521" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Asim786521
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Asim786521
                
              
              &lt;div id="story-author-preview-content-2810340" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/asim786521" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F806124%2Ff3585418-d089-43f5-a238-31db921da6ef.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Asim786521&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/asim786521/how-i-built-my-saas-mvp-in-20-days-lessons-learned-4gic" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 31 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/asim786521/how-i-built-my-saas-mvp-in-20-days-lessons-learned-4gic" id="article-link-2810340"&gt;
          How I Built My SaaS MVP in 20 Days (Lessons Learned)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/startup"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;startup&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/saas"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;saas&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/asim786521/how-i-built-my-saas-mvp-in-20-days-lessons-learned-4gic#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
  

&lt;p&gt;👉 In that article, I explain my 20-day journey building a SaaS MVP, including stack choices, challenges, and lessons learned.&lt;/p&gt;







&lt;h2&gt;
  
  
  🔹 Solution: Suspense + Lazy Loading
&lt;/h2&gt;

&lt;p&gt;To improve the modal’s performance, I used &lt;strong&gt;Suspense with lazy loading&lt;/strong&gt;:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Changed the child component import to &lt;code&gt;React.lazy&lt;/code&gt;, so it only loads when needed.
&lt;/li&gt;
&lt;li&gt;Wrapped it with &lt;code&gt;Suspense&lt;/code&gt; and used a &lt;strong&gt;spinner&lt;/strong&gt; as the fallback UI.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Example Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
jsx
import React, { useState, lazy, Suspense } from "react";

// Lazy load the child component
const FileUploader = lazy(() =&amp;gt; import("./FileUploader"));

function App() {
  const [isModalOpen, setIsModalOpen] = useState(false);

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;button onClick={() =&amp;gt; setIsModalOpen(true)}&amp;gt;Open Modal&amp;lt;/button&amp;gt;

      {isModalOpen &amp;amp;&amp;amp; (
        &amp;lt;Modal onClose={() =&amp;gt; setIsModalOpen(false)}&amp;gt;
          {/* Wrap lazy-loaded component with Suspense */}
          &amp;lt;Suspense fallback={&amp;lt;div&amp;gt;Loading...&amp;lt;/div&amp;gt;}&amp;gt;
            &amp;lt;FileUploader /&amp;gt;
          &amp;lt;/Suspense&amp;gt;
        &amp;lt;/Modal&amp;gt;
      )}
    &amp;lt;/div&amp;gt;
  );
}


function Modal({ children, onClose }) {
  return (
    &amp;lt;div className="modal"&amp;gt;
      &amp;lt;div className="modal-content"&amp;gt;
        &amp;lt;button onClick={onClose}&amp;gt;X&amp;lt;/button&amp;gt;
        {children}
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>react</category>
      <category>optimization</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I Built My SaaS MVP in 20 Days (Lessons Learned)</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Sun, 31 Aug 2025 04:57:00 +0000</pubDate>
      <link>https://dev.to/asim786521/how-i-built-my-saas-mvp-in-20-days-lessons-learned-4gic</link>
      <guid>https://dev.to/asim786521/how-i-built-my-saas-mvp-in-20-days-lessons-learned-4gic</guid>
      <description>&lt;p&gt;Do you know how easy it is to build something digitally and launch it publicly in less time? I built my SaaS in around 20 days with consistency and discipline.  &lt;/p&gt;

&lt;p&gt;When the thought of building a SaaS came to my mind, I had no idea how to start or how it would solve real-world problems for users. I lacked clarity about the product I wanted to build. Later, I spent time finding clarity about what I really needed to build. Questions like: &lt;em&gt;Will this make me profitable later or not?&lt;/em&gt; kept coming to mind.  &lt;/p&gt;

&lt;p&gt;Eventually, I realized the best approach was to start small in order to gain experience building a product. I decided not to overthink about profitability, but instead to focus on making the product genuinely useful for others.  &lt;/p&gt;

&lt;p&gt;So, I created a weekly plan (a sprint in Notion). I tracked all progress daily and marked tasks as: what to work on today, what was pending, and what was completed. I also planned priority tasks for the next day. This helped me dedicate fixed time blocks to building my SaaS product.  &lt;/p&gt;

&lt;p&gt;Here’s the detailed explanation of the SaaS I built:  &lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/asim786521/i-just-launched-my-first-micro-saas-1d74" class="crayons-story__hidden-navigation-link"&gt;The Start of Something Big: My First Micro SaaS&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/asim786521" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F806124%2Ff3585418-d089-43f5-a238-31db921da6ef.png" alt="asim786521 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/asim786521" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Asim786521
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Asim786521
                
              
              &lt;div id="story-author-preview-content-2772341" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/asim786521" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F806124%2Ff3585418-d089-43f5-a238-31db921da6ef.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Asim786521&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/asim786521/i-just-launched-my-first-micro-saas-1d74" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 16 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/asim786521/i-just-launched-my-first-micro-saas-1d74" id="article-link-2772341"&gt;
          The Start of Something Big: My First Micro SaaS
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/sass"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;sass&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/softwaredevelopment"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;softwaredevelopment&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/asim786521/i-just-launched-my-first-micro-saas-1d74#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


&lt;p&gt;Here’s the MVP version of my SaaS web application: &lt;a href="https://sharescribe.online/" rel="noopener noreferrer"&gt;share Scribe&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;👉 Try it out and share your feedback in the feedback panel.&lt;/p&gt;




&lt;h2&gt;
  
  
  Lessons I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I felt full of joy throughout this process.
&lt;/li&gt;
&lt;li&gt;It seemed easy for me because I’m a software developer.
&lt;/li&gt;
&lt;li&gt;The experience was very satisfying since I was building something for myself.
&lt;/li&gt;
&lt;li&gt;Whether the product becomes profitable or not, I gained valuable experience in building a product.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But after building, we also need strong &lt;strong&gt;marketing skills&lt;/strong&gt; alongside technical skills. Learning marketing and selling is so important. Currently, I’m learning marketing and looking forward to building new products and trying them out in public.  &lt;/p&gt;




&lt;p&gt;👉 Share your experiences, suggestions, and ideas in the comments section, and &lt;strong&gt;follow my journey&lt;/strong&gt; as I build and grow this SaaS 🚀&lt;/p&gt;

</description>
      <category>startup</category>
      <category>saas</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Start of Something Big: My First Micro SaaS</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Sat, 16 Aug 2025 15:50:34 +0000</pubDate>
      <link>https://dev.to/asim786521/i-just-launched-my-first-micro-saas-1d74</link>
      <guid>https://dev.to/asim786521/i-just-launched-my-first-micro-saas-1d74</guid>
      <description>&lt;p&gt;For a long time, I’ve had this dream: build something for &lt;em&gt;myself&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;As a software developer, most of my time is spent working on client projects and meeting tight deadlines — but outside of work, I’ve always wanted a side hustle. I explored ideas, scrolled through social media, and brainstormed countless times.  &lt;/p&gt;

&lt;p&gt;Eventually, I realized something: there’s no “perfect” idea. The best way to start is simply to &lt;strong&gt;start&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;So, I decided to build something small, useful, and privacy-focused — a micro SaaS.  &lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a micro SaaS application called &lt;strong&gt;&lt;a href="https://sharescribe.online" rel="noopener noreferrer"&gt;ShareScribe&lt;/a&gt;&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;The core purpose is simple: &lt;strong&gt;create and share content anonymously&lt;/strong&gt; with the receiver, while enhancing privacy through end-to-end encryption in private mode.  &lt;/p&gt;

&lt;p&gt;A few key features:  &lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Key Features (MVP)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No login?&lt;/strong&gt; Share up to 3 texts.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free plan?&lt;/strong&gt; Log in and unlock 1-day text sharing with end-to-end encryption.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy first.&lt;/strong&gt; Paid plans (coming soon) will include password protection, private sharing, and extended durations.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File sharing?&lt;/strong&gt; Pro will support images, Unlimited will support DOC/PDF files.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Future roadmap.&lt;/strong&gt; Branding, analytics, and team collaboration are on the way.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💳 Subscription Plans
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🆓 Free – &lt;em&gt;Available now&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Perfect for trying it out.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1-day text share
&lt;/li&gt;
&lt;li&gt;End-to-end encryption (for logged-in users)
&lt;/li&gt;
&lt;li&gt;Public link only
&lt;/li&gt;
&lt;li&gt;Community access &amp;amp; basic support
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ⚡ Pro – &lt;em&gt;In Progress (coming soon)&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Best for individuals &amp;amp; small teams.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7-day share duration
&lt;/li&gt;
&lt;li&gt;Upload up to 2 images
&lt;/li&gt;
&lt;li&gt;Markdown formatting
&lt;/li&gt;
&lt;li&gt;Optional password protection
&lt;/li&gt;
&lt;li&gt;Private sharing
&lt;/li&gt;
&lt;li&gt;Download exports &amp;amp; custom themes
&lt;/li&gt;
&lt;li&gt;Priority support
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🌟 Unlimited – &lt;em&gt;In Progress (coming soon)&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;For power users &amp;amp; businesses.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;21-day share duration
&lt;/li&gt;
&lt;li&gt;Upload DOC/PDF files
&lt;/li&gt;
&lt;li&gt;Advanced branding &amp;amp; custom URLs
&lt;/li&gt;
&lt;li&gt;Link analytics &amp;amp; insights
&lt;/li&gt;
&lt;li&gt;Team collaboration + API access
&lt;/li&gt;
&lt;li&gt;White-label options &amp;amp; SSO
&lt;/li&gt;
&lt;li&gt;24/7 premium support
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;👉 &lt;strong&gt;Note:&lt;/strong&gt; Currently only the &lt;strong&gt;Free plan is live&lt;/strong&gt;. Pro and Unlimited are in progress and will be released soon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback is Open 📢
&lt;/h2&gt;

&lt;p&gt;I’ve built a feedback panel so anyone can share ideas, report bugs, or ask questions. Every bit of feedback helps me improve the app and make it more stable, user-friendly, and fun to use.  &lt;/p&gt;

&lt;p&gt;Right now, this is just the MVP — your ideas can help shape the official release!&lt;/p&gt;

&lt;p&gt;Here’s the link to try it out: &lt;strong&gt;&lt;a href="https://sharescribe.online" rel="noopener noreferrer"&gt;share scribe&lt;/a&gt;&lt;/strong&gt;  &lt;/p&gt;




&lt;p&gt;I’m excited to keep building, adding features, and learning along the way.&lt;br&gt;&lt;br&gt;
If you’re curious about privacy-first tools or just want to send something anonymously — give it a try and let me know what you think.  &lt;/p&gt;

</description>
      <category>sass</category>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why UDP Powers Streaming, Gaming, and Real-Time Apps</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Wed, 25 Jun 2025 15:22:53 +0000</pubDate>
      <link>https://dev.to/asim786521/why-udp-powers-streaming-gaming-and-real-time-apps-2onb</link>
      <guid>https://dev.to/asim786521/why-udp-powers-streaming-gaming-and-real-time-apps-2onb</guid>
      <description>&lt;h2&gt;
  
  
  What is UDP?
&lt;/h2&gt;

&lt;p&gt;UDP stands for &lt;strong&gt;User Datagram Protocol&lt;/strong&gt;. It is one of the core principles of internet protocols. It is mainly used for &lt;strong&gt;streaming purposes&lt;/strong&gt;. It is useful in situations where &lt;strong&gt;speed is more important than reliability&lt;/strong&gt;. Also, keep in mind that it &lt;strong&gt;does not guarantee delivery&lt;/strong&gt; of data.&lt;/p&gt;

&lt;p&gt;UDP is mainly used in &lt;strong&gt;real-time communication and streaming platforms&lt;/strong&gt;. It offers real-time conversation capabilities efficiently through this protocol. Major companies like &lt;strong&gt;Zoom, Skype, and Netflix&lt;/strong&gt; use this protocol to &lt;strong&gt;efficiently transfer data packets&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  How UDP Works
&lt;/h2&gt;

&lt;p&gt;Unlike TCP, UDP is a &lt;strong&gt;connectionless protocol&lt;/strong&gt;. This means it sends data directly without first setting up a connection between the sender and receiver. It breaks the data into small packets called &lt;strong&gt;datagrams&lt;/strong&gt;, and sends them to the destination. UDP does &lt;strong&gt;not check&lt;/strong&gt; if the data arrives correctly or in order.&lt;/p&gt;

&lt;p&gt;Because of this, UDP is &lt;strong&gt;faster and more lightweight&lt;/strong&gt;, but less reliable. There is &lt;strong&gt;no error checking or correction&lt;/strong&gt;, which makes it perfect for situations where a few lost packets are acceptable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where is UDP Used?
&lt;/h2&gt;

&lt;p&gt;UDP is used in many applications where &lt;strong&gt;real-time performance&lt;/strong&gt; is more important than perfect delivery. Some examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎥 &lt;strong&gt;Video streaming&lt;/strong&gt; (Netflix, YouTube Live)&lt;/li&gt;
&lt;li&gt;📞 &lt;strong&gt;Voice and video calls&lt;/strong&gt; (Zoom, Skype, WhatsApp)&lt;/li&gt;
&lt;li&gt;🎮 &lt;strong&gt;Online gaming&lt;/strong&gt; (low latency is critical)&lt;/li&gt;
&lt;li&gt;📡 &lt;strong&gt;Live broadcasting and IPTV&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🛰️ &lt;strong&gt;DNS (Domain Name System)&lt;/strong&gt; and other network services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In these use cases, a slight delay or missing packet doesn’t ruin the experience, but &lt;strong&gt;slow performance would&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Advantages of UDP
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Low latency&lt;/strong&gt; (no need to wait for acknowledgments)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Fast data transfer&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Simple protocol&lt;/strong&gt;, easy to implement&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Ideal for real-time communication&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Disadvantages of UDP
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;❌ &lt;strong&gt;No delivery guarantee&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;No error correction&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;No ordering of packets&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Not suitable for sending critical data like files or transactions&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;UDP is a powerful protocol that helps deliver &lt;strong&gt;fast and real-time communication&lt;/strong&gt; across the internet. It sacrifices reliability to achieve &lt;strong&gt;speed and low latency&lt;/strong&gt;, which is why it's commonly used in streaming, gaming, and live communication apps.&lt;/p&gt;

&lt;p&gt;Even though it doesn’t guarantee delivery, UDP plays a major role in making modern internet applications fast and responsive.&lt;/p&gt;




&lt;p&gt;Would you like me to wrap this into a full blog post format with an introduction and conclusion, or help you post it to dev.to or another platform?&lt;/p&gt;

</description>
      <category>udp</category>
      <category>streaming</category>
      <category>atprotocol</category>
    </item>
    <item>
      <title>How Sharding and Partitioning Help Scale Your Product Efficiently</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Sun, 01 Jun 2025 08:38:03 +0000</pubDate>
      <link>https://dev.to/asim786521/partitioning-and-sharding-of-data-8n4</link>
      <guid>https://dev.to/asim786521/partitioning-and-sharding-of-data-8n4</guid>
      <description>&lt;h1&gt;
  
  
  Sharding and Partitioning of Data: Scale Your Product Like a Pro 🚀
&lt;/h1&gt;

&lt;p&gt;Have you heard about &lt;strong&gt;sharding&lt;/strong&gt; and &lt;strong&gt;partitioning&lt;/strong&gt; of data when scaling your product?&lt;/p&gt;

&lt;p&gt;When a product is scaled, millions of users may use it simultaneously. At that time, we need to maintain &lt;strong&gt;data consistency&lt;/strong&gt; and ensure the product is &lt;strong&gt;much faster&lt;/strong&gt; than before—because performance is directly affected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Partitioning&lt;/strong&gt; and &lt;strong&gt;sharding&lt;/strong&gt; are two powerful methods that help fetch data faster from databases and improve performance under heavy load.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 What is Partitioning?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Partitioning&lt;/strong&gt; is the process of dividing a large dataset into smaller, manageable pieces. This division helps in improving query performance, scalability, and data organization.&lt;/p&gt;

&lt;p&gt;There are several types of partitioning:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Horizontal Partitioning&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical Partitioning&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Range Partitioning&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hash Partitioning&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔹 Horizontal Partitioning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Horizontal partitioning&lt;/strong&gt; divides the &lt;strong&gt;rows&lt;/strong&gt; of a table into multiple smaller tables, typically across databases or servers. This is the most commonly used type and is the basis for &lt;strong&gt;sharding&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  📌 Example: Horizontal Partitioning
&lt;/h3&gt;

&lt;p&gt;Suppose you have a &lt;code&gt;Customers&lt;/code&gt; table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Country&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Alice&lt;/td&gt;
&lt;td&gt;USA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Bob&lt;/td&gt;
&lt;td&gt;USA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Charlie&lt;/td&gt;
&lt;td&gt;Canada&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;David&lt;/td&gt;
&lt;td&gt;UK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Eva&lt;/td&gt;
&lt;td&gt;Canada&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Partition by Country:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;USA Table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Country&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Alice&lt;/td&gt;
&lt;td&gt;USA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Bob&lt;/td&gt;
&lt;td&gt;USA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Canada Table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Country&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Charlie&lt;/td&gt;
&lt;td&gt;Canada&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Eva&lt;/td&gt;
&lt;td&gt;Canada&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;UK Table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Country&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;David&lt;/td&gt;
&lt;td&gt;UK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔸 Vertical Partitioning
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;vertical partitioning&lt;/strong&gt;, we divide a table &lt;strong&gt;by columns&lt;/strong&gt; instead of rows. It’s helpful when frequently accessed and infrequently accessed data can be separated.&lt;/p&gt;

&lt;h3&gt;
  
  
  📌 Example: Vertical Partitioning
&lt;/h3&gt;

&lt;p&gt;Suppose you have a &lt;code&gt;Users&lt;/code&gt; table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UserID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;th&gt;PasswordHash&lt;/th&gt;
&lt;th&gt;ProfilePicture&lt;/th&gt;
&lt;th&gt;Bio&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Alice&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:alice@x.com"&gt;alice@x.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;********&lt;/td&gt;
&lt;td&gt;img1.jpg&lt;/td&gt;
&lt;td&gt;Loves cats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Bob&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:bob@x.com"&gt;bob@x.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;********&lt;/td&gt;
&lt;td&gt;img2.jpg&lt;/td&gt;
&lt;td&gt;Guitar player&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Authentication Table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UserID&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;th&gt;PasswordHash&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:alice@x.com"&gt;alice@x.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;********&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:bob@x.com"&gt;bob@x.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;********&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Profile Table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UserID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;ProfilePicture&lt;/th&gt;
&lt;th&gt;Bio&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Alice&lt;/td&gt;
&lt;td&gt;img1.jpg&lt;/td&gt;
&lt;td&gt;Loves cats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Bob&lt;/td&gt;
&lt;td&gt;img2.jpg&lt;/td&gt;
&lt;td&gt;Guitar player&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🧱 What is Sharding?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Sharding&lt;/strong&gt; is a type of horizontal partitioning where data is split across &lt;strong&gt;multiple machines or databases&lt;/strong&gt; (called shards). Each shard holds a subset of the data. Sharding is commonly used in distributed systems to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce latency
&lt;/li&gt;
&lt;li&gt;Improve fault tolerance
&lt;/li&gt;
&lt;li&gt;Scale out horizontally
&lt;/li&gt;
&lt;li&gt;Bring data closer to the user (geographical sharding)
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚙️ How Sharding Works
&lt;/h2&gt;

&lt;h1&gt;
  
  
  🧱 What is Sharding in Databases? (With Formula Explained)
&lt;/h1&gt;

&lt;p&gt;When your application grows and millions of users start hitting your system, your database can become a performance bottleneck. That’s where &lt;strong&gt;sharding&lt;/strong&gt; comes into play.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What is Sharding?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Sharding&lt;/strong&gt; is a technique used to &lt;strong&gt;split a large database into smaller, faster, and more manageable pieces&lt;/strong&gt;, known as &lt;strong&gt;shards&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each &lt;strong&gt;shard&lt;/strong&gt; is a separate database that contains a &lt;strong&gt;subset of the overall data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Sharding is a form of &lt;strong&gt;horizontal partitioning&lt;/strong&gt;, and it helps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧠 Improve performance&lt;/li&gt;
&lt;li&gt;📈 Scale out the system&lt;/li&gt;
&lt;li&gt;📉 Reduce latency&lt;/li&gt;
&lt;li&gt;💥 Avoid a single point of failure&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧮 How Does Sharding Work?
&lt;/h2&gt;

&lt;p&gt;To decide &lt;strong&gt;which shard&lt;/strong&gt; a particular piece of data goes to, systems use a formula based on a &lt;strong&gt;shard key&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔑 The Sharding Formula:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
shard = shard_key % n (n defines how many shards your system will use)

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

&lt;/div&gt;

</description>
      <category>database</category>
      <category>systemdesign</category>
      <category>performance</category>
      <category>backend</category>
    </item>
    <item>
      <title>5x Your Productivity: How AI-Powered IDEs Are Changing the Face of Development</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Sat, 08 Mar 2025 05:40:47 +0000</pubDate>
      <link>https://dev.to/asim786521/the-future-of-coding-how-ai-powered-ides-are-revolutionizing-development-1k0p</link>
      <guid>https://dev.to/asim786521/the-future-of-coding-how-ai-powered-ides-are-revolutionizing-development-1k0p</guid>
      <description>&lt;h2&gt;
  
  
  AI Tools &amp;amp; IDE Evolution
&lt;/h2&gt;

&lt;p&gt;We are witnessing the rapid boom of AI in recent times. The evolution of AI raises an important question: &lt;strong&gt;Is AI here to make our jobs easier, or will it lead to unemployment?&lt;/strong&gt; This concern has been widely discussed among tech professionals across the world.  &lt;/p&gt;

&lt;p&gt;Over the past few months, we have seen various AI tools designed for different purposes. AI models are evolving daily, each performing specialized tasks. In the tech industry, &lt;strong&gt;AI-powered IDEs&lt;/strong&gt; have emerged recently, allowing developers to work with &lt;strong&gt;AI-driven coding assistants and integrate various API-based Large Language Models (LLMs)&lt;/strong&gt;. Alongside these, &lt;strong&gt;AI agents&lt;/strong&gt; have been developed to automate everyday tasks—from sending emails to retrieving responses through platforms like &lt;strong&gt;WhatsApp or Telegram&lt;/strong&gt;.  &lt;/p&gt;

&lt;h2&gt;
  
  
  AI-Powered IDEs from a Developer’s Perspective
&lt;/h2&gt;

&lt;p&gt;From a &lt;strong&gt;developer’s point of view&lt;/strong&gt;, AI-powered IDEs integrate artificial intelligence to &lt;strong&gt;enhance coding efficiency&lt;/strong&gt;. These tools provide:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto-suggestions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code generation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugging assistance&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent refactoring&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated project file generation&lt;/strong&gt; in multiple programming languages
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Features of AI-Powered IDEs
&lt;/h2&gt;

&lt;p&gt;Like &lt;strong&gt;GitHub Copilot&lt;/strong&gt;, these tools suggest entire code blocks based on context. One of the most attractive features of AI-powered IDEs is &lt;strong&gt;AI-driven debugging&lt;/strong&gt;. Many of these IDEs utilize various &lt;strong&gt;AI LLM models&lt;/strong&gt; to detect and fix errors automatically. Additionally, they improve code quality through &lt;strong&gt;AI-driven recommendations&lt;/strong&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Popular AI-Powered IDEs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cursor&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trail&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Copilot&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tabnine&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codeium&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advantages of Using AI-Powered IDEs
&lt;/h2&gt;

&lt;p&gt;✅ &lt;strong&gt;Boosts Productivity&lt;/strong&gt; – Faster coding with AI assistance.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Reduces Bugs&lt;/strong&gt; – AI-powered debugging minimizes errors.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Enhances Learning&lt;/strong&gt; – AI suggests best practices and optimizations.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Saves Time&lt;/strong&gt; – Automates repetitive coding tasks.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges and Limitations
&lt;/h2&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Dependency on AI&lt;/strong&gt; – Over-reliance may hinder deep coding skills.&lt;br&gt;&lt;br&gt;
⚠️ &lt;strong&gt;Privacy Concerns&lt;/strong&gt; – AI models may process and store sensitive code.&lt;br&gt;&lt;br&gt;
⚠️ &lt;strong&gt;Accuracy Issues&lt;/strong&gt; – AI-generated code may require manual corrections.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Future of AI-Powered Development
&lt;/h2&gt;

&lt;p&gt;🚀 &lt;strong&gt;More advanced AI models&lt;/strong&gt; with context-aware coding.&lt;br&gt;&lt;br&gt;
🤖 &lt;strong&gt;Seamless collaboration tools&lt;/strong&gt; for AI-assisted pair programming.&lt;br&gt;&lt;br&gt;
🎯 &lt;strong&gt;Increased AI personalization&lt;/strong&gt; for customized coding experiences.  &lt;/p&gt;

&lt;p&gt;AI-powered IDEs are revolutionizing the way developers write, debug, and optimize code. While they offer significant advantages, it’s crucial to strike a balance between &lt;strong&gt;human expertise and AI assistance&lt;/strong&gt; to maximize efficiency without losing essential coding skills. The future of &lt;strong&gt;AI-driven development&lt;/strong&gt; is promising, and these tools will continue to shape the software industry in exciting ways!  &lt;/p&gt;




&lt;p&gt;Let me know if you'd like any further refinements! 🚀&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cursor</category>
      <category>trai</category>
      <category>openai</category>
    </item>
    <item>
      <title>Tanstack Router: The Future of Routing in React Applications</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Sun, 02 Feb 2025 07:04:58 +0000</pubDate>
      <link>https://dev.to/asim786521/tanstack-router-the-future-of-routing-in-react-applications-3n5p</link>
      <guid>https://dev.to/asim786521/tanstack-router-the-future-of-routing-in-react-applications-3n5p</guid>
      <description>&lt;p&gt;Tanstack offers an advanced development experience in recent times. Today, I will introduce the Tanstack Routing System.&lt;/p&gt;

&lt;p&gt;Compared to the React routing system, it has exciting features. The Tanstack Routing System is a modern routing solution that comes with TypeScript support, nested routing, and layouts. It also provides TypeScript JSON-first Search Params state management APIs. Since it is a modern routing system that emerged recently, it utilizes 100% inferred TypeScript support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Tanstack Route Creation Happens?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A route is automatically created when a new file is added, with the route name derived from the folder structure.&lt;/p&gt;

&lt;p&gt;Let's understand this with an example. We can create both normal files and lazy files by using the .lazy syntax to support lazy loading.To fetch data from parameters, we use the $id syntax in the file name&lt;/p&gt;

&lt;h4&gt;
  
  
  Root Route
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createRootRoute, Link, Outlet } from '@tanstack/react-router'
import { TanStackRouterDevtools } from '@tanstack/router-devtools'

export const Route = createRootRoute({
  component: () =&amp;gt; (
    &amp;lt;&amp;gt;
      &amp;lt;div className="p-2 flex gap-2"&amp;gt;
        &amp;lt;Link to="/" className="[&amp;amp;.active]:font-bold"&amp;gt;
          Home
        &amp;lt;/Link&amp;gt;{' '}
        &amp;lt;Link to="/about" className="[&amp;amp;.active]:font-bold"&amp;gt;
          About
        &amp;lt;/Link&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;hr /&amp;gt;
      &amp;lt;Outlet /&amp;gt;
      &amp;lt;TanStackRouterDevtools /&amp;gt;
    &amp;lt;/&amp;gt;
  ),
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Using lazy route
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createLazyFileRoute } from '@tanstack/react-router'

export const Route = createLazyFileRoute('/about')({
  component: About,
})

function About() {
  return &amp;lt;div className="p-2"&amp;gt;Hello from About!&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Using path path(file name start with ${paramsID))
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/posts/$postId')({
  loader: async ({ params }) =&amp;gt; {
    return fetchPost(params.postId)
  },
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Installation Process&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can install Tanstack Router using various package managers like npm, yarn, pnpm, or bun. After installation, we configure the router in our Vite config if we are using the Vite run engine.&lt;/p&gt;

&lt;p&gt;There are several other features available in Tanstack Router that help developers enhance routing efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tanstack vs. React Router Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both Tanstack Router and React Router have their own use cases and advantages. Here’s a quick comparison:&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of Tanstack Router Over React Router
&lt;/h3&gt;

&lt;p&gt;Automatic route generation based on the folder structure.&lt;/p&gt;

&lt;p&gt;TypeScript-first approach for better type safety.&lt;/p&gt;

&lt;p&gt;Built-in search params management using JSON.&lt;/p&gt;

&lt;p&gt;Nested layouts and routes for better organization.&lt;/p&gt;

&lt;p&gt;Lazy loading support for better performance.&lt;/p&gt;

&lt;p&gt;Efficient state management APIs integrated within the router.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;When Should You Use Tanstack Router Instead of React Router??&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;If you need strong TypeScript support with automatic type inference.&lt;/p&gt;

&lt;p&gt;When your project requires advanced route-based state management.&lt;/p&gt;

&lt;p&gt;If you prefer automatic route creation based on folder structures.&lt;/p&gt;

&lt;p&gt;When working on large-scale applications with deeply nested layouts.&lt;/p&gt;

&lt;p&gt;For more details, check the official documentation of &lt;a href="https://tanstack.com/route" rel="noopener noreferrer"&gt;Tanstack Router Documentation.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;The Tanstack Routing System provides a modern and efficient approach to handling routes in React applications. With its TypeScript-first approach, automatic route creation, and improved state management, it offers a more structured and scalable solution compared to traditional React routing methods. If you're looking for a powerful and developer-friendly routing system, Tanstack Router is definitely worth exploring!&lt;/p&gt;

</description>
      <category>react</category>
      <category>tanstack</category>
      <category>javascript</category>
      <category>javascriptlibraries</category>
    </item>
    <item>
      <title>SWR Makes It Easy for Developers!</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Sun, 12 Jan 2025 06:19:48 +0000</pubDate>
      <link>https://dev.to/asim786521/swr-make-it-easy-54oo</link>
      <guid>https://dev.to/asim786521/swr-make-it-easy-54oo</guid>
      <description>&lt;p&gt;Technologies are evolving so rapidly, especially when it comes to JavaScript. React.js and Next.js are powerful frontend frameworks that are highly popular. They provide several hooks to make developers' jobs easier.  &lt;/p&gt;

&lt;p&gt;SWR is a powerful React hook for data fetching. The name SWR stands for &lt;strong&gt;Stale-While-Revalidate&lt;/strong&gt;. It uses an HTTP cache invalidation strategy as per HTTP RFC 5861. SWR is created by the founding team of Next.js. Its name simply means: &lt;strong&gt;stale&lt;/strong&gt; stands for cached data previously fetched from an API, &lt;strong&gt;while&lt;/strong&gt; refers to the transition period, and &lt;strong&gt;revalidate&lt;/strong&gt; means verifying and updating the cached data to ensure it is up to date with the server.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Let’s discuss how it works&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;First, it fetches data from an API, stores it in the cache, and displays that data in the UI. While displaying stale data, it automatically sends a request in the background to fetch fresh data. After the cache is updated with the latest data, it re-renders the component to reflect the changes.  &lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
................&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import useSWR from 'swr'

function Profile() {
  const { data, error, isLoading } = useSWR('/api/user', fetcher)

  if (error) return &amp;lt;div&amp;gt;failed to load&amp;lt;/div&amp;gt;
  if (isLoading) return &amp;lt;div&amp;gt;loading...&amp;lt;/div&amp;gt;
  return &amp;lt;div&amp;gt;hello {data.name}!&amp;lt;/div&amp;gt;
}
&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;import useSWR from 'swr';

const fetcher = (url) =&amp;gt; fetch(url).then((res) =&amp;gt; res.json());

export default function UserProfile({ userId }) {
  const { data, error } = useSWR(`https://jsonplaceholder.typicode.com/users/${userId}`, fetcher);

  if (error) return &amp;lt;div&amp;gt;Failed to load user&amp;lt;/div&amp;gt;;
  if (!data) return &amp;lt;div&amp;gt;Loading user...&amp;lt;/div&amp;gt;;

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;{data.name}&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;Email: {data.email}&amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;Phone: {data.phone}&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Features and advantages of SWR&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The main feature of SWR is fast, lightweight, and reusable data fetching.
&lt;/li&gt;
&lt;li&gt;The most exciting feature is prefetching data, allowing us to preload data before rendering the component.
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Why should we use SWR?&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Because it saves development time and ensures fresh data without over-fetching.
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;For more references, check the &lt;a href="https://swr.vercel.app" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.  &lt;/p&gt;




</description>
      <category>swr</category>
      <category>react</category>
      <category>nextjs</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Top 5 javascript libraries you should know</title>
      <dc:creator>Asim786521</dc:creator>
      <pubDate>Tue, 01 Feb 2022 17:11:30 +0000</pubDate>
      <link>https://dev.to/asim786521/top-5-javascript-libraries-you-should-know-360d</link>
      <guid>https://dev.to/asim786521/top-5-javascript-libraries-you-should-know-360d</guid>
      <description>&lt;p&gt;Nodejs is an asynchronous event-driven javascript runtime is used to build a large web application and it supports many businesses and startups to develop more things and earn revenues.&lt;/p&gt;

&lt;p&gt;Express is a leading Framework used to create and develop the application. there are lots of packages in Express to perform different operation and function that helps programmers very much.&lt;/p&gt;

&lt;p&gt;npm is the package manager of Node js. It was created in 2009 as an open-source project that helps JavaScript developers easily share packaged modules of code. there are lots of packages that are used in the Express as per user-requirement.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Joi&lt;/strong&gt;&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%2Fjoi.dev%2Fimg%2FjoiLogo.jpg" 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%2Fjoi.dev%2Fimg%2FjoiLogo.jpg" alt="Image1" width="800" height="1066"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.npmjs.com/package/joi" rel="noopener noreferrer"&gt;package &lt;/a&gt;much have absolutely necessary package if you are implementing anything which requires a lot of data input from the user. This is the most powerful schema description language and data validator for JavaScript.&lt;/p&gt;

&lt;p&gt;Installation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install joi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Joi = require('joi');

const schema = Joi.object({
    username: Joi.string()
        .alphanum()
        .min(3)
        .max(30)
        .required(),

    password: Joi.string()
        .pattern(new RegExp('^[a-zA-Z0-9]{3,30}$')),

    repeat_password: Joi.ref('password'),

    access_token: [
        Joi.string(),
        Joi.number()
    ],

    birth_year: Joi.number()
        .integer()
        .min(1900)
        .max(2013),

    email: Joi.string()
        .email({ minDomainSegments: 2, tlds: { allow: ['com', 'net'] } })
})
    .with('username', 'birth_year')
    .xor('password', 'access_token')
    .with('password', 'repeat_password');


schema.validate({ username: 'abc', birth_year: 1994 });
// -&amp;gt; { value: { username: 'abc', birth_year: 1994 } }

schema.validate({});
// -&amp;gt; { value: {}, error: '"username" is required' }

// Also -

try {
    const value = await schema.validateAsync({ username: 'abc', birth_year: 1994 });
}
catch (err) { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;Tiny-invarient&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have ever used typescript then you known that lots of time the typescript will complain when we pass the value then it show undefined or Null value and also undefined error.when you use invarient then it helps to remain the variable exist.It contains lots of conditions and also assertive statements but also use typescript.&lt;/p&gt;

&lt;p&gt;An &lt;a href="https://www.npmjs.com/package/invariant" rel="noopener noreferrer"&gt;invariant &lt;/a&gt;function takes a value, and if the value is falsy then the invariant function will throw. If the value is truthy, then the function will not throw.&lt;/p&gt;

&lt;p&gt;Installation&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i  tiny-invariant&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`import invariant from 'tiny-invariant';

invariant(truthyValue, 'This should not throw!');

invariant(falsyValue, 'This will throw!');
// Error('Invariant violation: This will throw!');

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

&lt;/div&gt;



&lt;p&gt;3.&lt;strong&gt;ZXCVBN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/zxcvbn" rel="noopener noreferrer"&gt;zxcvbn&lt;/a&gt; is from dropbox and  used to allow you to add a good password.zxcvbn is a password strength estimator inspired by password crackers. Through pattern matching and conservative estimation, it recognizes and weighs 30k common passwords, common names and surnames according to US census data, popular English words from Wikipedia and US television and movies, and other common patterns like dates, repeats (aaa), sequences (abcd), keyboard patterns (qwertyuiop), and l33t speak.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /path/to/project/root
bower install zxcvbn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.&lt;strong&gt;NanoID&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A tiny unique string ID generator for JavaScript.it have a lots of &lt;a href="https://www.npmjs.com/package/nanoid" rel="noopener noreferrer"&gt;nano&lt;/a&gt; ids that go down in the URL structure. This package will generate a tiny secure URL friendly identifier.there are lots of Functions in the package and it has more speed in terms of safety in terms of URL.Early use uuid as as a generator and now shifted to nano id generator.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
npm i nanoid&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5.&lt;strong&gt;Canvas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/canvas" rel="noopener noreferrer"&gt;node-canvas&lt;/a&gt; is a Cairo-backed Canvas implementation for Node.js.you have basically customize a lot of confident effects and if you need to show a appreciation,happiness and milestone this might to be a great package to plug in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i canvas&lt;/code&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>node</category>
      <category>joi</category>
    </item>
  </channel>
</rss>
