<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dhananjaya Yapa on Medium]]></title>
        <description><![CDATA[Stories by Dhananjaya Yapa on Medium]]></description>
        <link>https://medium.com/@dhananjayayapa99?source=rss-43fc6c01b3fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GKdkBEvvImy6YU4GEFfV3w.png</url>
            <title>Stories by Dhananjaya Yapa on Medium</title>
            <link>https://medium.com/@dhananjayayapa99?source=rss-43fc6c01b3fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:15:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhananjayayapa99/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Before Bundle Optimization: How to Analyze Your Frontend Bundle]]></title>
            <link>https://medium.com/@dhananjayayapa99/before-bundle-optimization-how-to-analyze-your-frontend-bundle-aec31392a163?source=rss-43fc6c01b3fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/aec31392a163</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[bundle-analysis]]></category>
            <category><![CDATA[bundle-size]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[code-splitting]]></category>
            <dc:creator><![CDATA[Dhananjaya Yapa]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 12:18:26 GMT</pubDate>
            <atom:updated>2026-11-11T12:18:26.482Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bo3SqKU1_W4FfoUpekD_4g.png" /></figure><h3>1. What Is Bundle Analysis?</h3><p>When we build a frontend application using React, Next.js, or other frameworks, our source code goes through a build process. During this process, tools such as Webpack, Vite, or other bundlers combine and transform JavaScript, CSS, and other assets into production-ready files. These files are commonly called <strong>bundles</strong>.</p><p>As an application grows, its dependencies, libraries, and components can increase the overall bundle size.</p><p>This is where <strong>Bundle Analysis</strong> becomes important.</p><p>Bundle analysis helps us understand:</p><ul><li>Which libraries contribute the most to the bundle size.</li><li>Which components or modules consume more space.</li><li>Whether unnecessary dependencies are included.</li><li>Whether we can reduce the amount of JavaScript delivered to users.</li></ul><h3>2. Why Is Bundle Analysis Important?</h3><p>A larger JavaScript bundle can negatively impact application performance.</p><p>Some important benefits of bundle analysis include:</p><ul><li><strong>Improved Loading Performance:</strong> Smaller bundles generally download faster.</li><li><strong>Better User Experience:</strong> Users can interact with the application sooner.</li><li><strong>Reduced Network Usage:</strong> Less JavaScript needs to be transferred.</li><li><strong>Dependency Optimization:</strong> Identify unnecessarily large third-party libraries.</li><li><strong>Better Performance Monitoring:</strong> Understand how the application changes as new features are introduced.</li></ul><p>Remember, bundle size is not the only factor affecting performance, but it is an important one.</p><h3>3. How to Analyze a Frontend Bundle</h3><h4>A. React / Vite Applications</h4><p>For applications using Vite, we can use rollup-plugin-visualizer.</p><p><strong>Step 1: Install the package</strong></p><pre>npm install -D rollup-plugin-visualizer</pre><p><strong>Step 2: Configure vite.config.ts</strong></p><pre>import react from &#39;@vitejs/plugin-react&#39;;<br>import { visualizer } from &#39;rollup-plugin-visualizer&#39;;<br><br>export default defineConfig({<br>  plugins: [<br>    react(),<br>    visualizer({<br>      open: true,<br>      filename: &#39;stats.html&#39;,<br>      gzipSize: true,<br>      brotliSize: true,<br>    }),<br>  ],<br>});</pre><p><strong>Step 3: Build the application</strong></p><pre>npm run build</pre><p>After the build completes, the analyzer generates a stats.html report. Open this file in your browser to explore the bundle.</p><h4>B. Webpack Applications</h4><p>For Webpack-based applications, we can use webpack-bundle-analyzer.</p><p>Install it:</p><pre>npm install -D webpack-bundle-analyzer</pre><p>Configure the analyzer in your Webpack configuration:</p><pre>const BundleAnalyzerPlugin =<br>  require(&#39;webpack-bundle-analyzer&#39;)<br>    .BundleAnalyzerPlugin;<br><br>module.exports = {<br>  plugins: [<br>    new BundleAnalyzerPlugin()<br>  ]<br>};</pre><p>Run your production build and inspect the generated visualization.</p><h4>C. Next.js Applications</h4><p>For Next.js applications, we can use @next/bundle-analyzer.</p><p>Install:</p><pre>npm install -D @next/bundle-analyzer</pre><p>Configure next.config.js:</p><pre>const withBundleAnalyzer =<br>  require(&#39;@next/bundle-analyzer&#39;)({<br>    enabled: process.env.ANALYZE === &#39;true&#39;,<br>  });<br><br>module.exports = withBundleAnalyzer({});</pre><p>Run:</p><pre>ANALYZE=true npm run build</pre><p>This generates visual reports that help identify large dependencies and modules in your Next.js application.</p><h3>4. How to Understand the Bundle Analyzer Report</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saXzZ8FSGToWpXZgPC-Ykw.jpeg" /></figure><p>When we run a bundle analyzer, it generates a visual report (usually a treemap) showing how much space each module, dependency, and component occupies in the production bundle.</p><p>This report helps us understand what is making our frontend application large and where we should focus our optimization efforts.</p><p>Let’s understand the five important areas with practical React examples.</p><ol><li><strong>Large Dependencies</strong></li></ol><p>A dependency is a third-party library that we install and use in our application.</p><p>Some libraries contain a lot of functionality, but we might only use a small portion of them.</p><p>Example:</p><p>Imagine we install a charting library to display a simple bar chart.</p><pre>import ChartLibrary from &#39;large-chart-library&#39;;</pre><p>If this library contributes 500 KB to our production bundle, it can significantly increase the amount of JavaScript downloaded by the browser.</p><p>What should we do?</p><ul><li>Check whether we need the entire library.</li><li>Look for smaller alternatives.</li><li>Use dynamic imports if the library is needed only on certain pages.</li></ul><p>For example:</p><pre>const Chart = lazy(() =&gt; import(&#39;./Chart&#39;));</pre><p>This allows the chart component to be loaded when required instead of including it in the initial page load.</p><p><strong>2. Duplicate Packages</strong></p><p>Sometimes the same dependency, or different versions of the same dependency, can be included in multiple parts of an application. This can increase the overall bundle size unnecessarily.</p><p>Example:</p><p>Imagine your application has the following dependencies:</p><ul><li>Component A uses Library X version 1.</li><li>Component B uses Library X version 2.</li></ul><p>Depending on the package structure and bundler, both versions might end up in the production bundle. This means the browser may download duplicated library code.</p><p>You can inspect duplicate dependencies using:</p><pre>npm ls</pre><p><strong>3. Unused Code</strong></p><p>Unused code refers to JavaScript that is included in the production bundle but is not actually needed by the application. This can happen when we import entire libraries but use only a few functions.</p><p>Example:</p><p>Imagine you are using Lodash but only need its debounce function.</p><p>Instead of importing the entire library:</p><pre>import _ from &#39;lodash&#39;;<br><br>const searchHandler = _.debounce(() =&gt; {<br>  console.log(&#39;Searching...&#39;);<br>}, 500);</pre><p>You can import only the required function:</p><pre>import debounce from &#39;lodash/debounce&#39;;<br><br>const searchHandler = debounce(() =&gt; {<br>  console.log(&#39;Searching...&#39;);<br>}, 500);</pre><p>This can reduce the amount of code included in the final bundle, depending on the library and build configuration.</p><p><strong>4. Large Components</strong></p><p>Sometimes the issue is not a third-party library itself, but how we structure our application components.</p><p>For example, imagine a dashboard containing:</p><ul><li>User profile information.</li><li>Analytics charts.</li><li>Data tables.</li><li>Export functionality</li></ul><p>If all these components and their dependencies are loaded immediately, the initial JavaScript bundle can become unnecessarily large.</p><p>Example:</p><p>Instead of importing everything directly:</p><pre>import DashboardChart from &#39;./DashboardChart&#39;;<br>import ExportReport from &#39;./ExportReport&#39;;<br>import UserTable from &#39;./UserTable&#39;;</pre><p>We can use lazy loading:</p><pre>import { lazy, Suspense } from &#39;react&#39;;<br><br>const DashboardChart = lazy(<br>  () =&gt; import(&#39;./DashboardChart&#39;)<br>);<br>const ExportReport = lazy(<br>  () =&gt; import(&#39;./ExportReport&#39;)<br>);<br>const UserTable = lazy(<br>  () =&gt; import(&#39;./UserTable&#39;)<br>);</pre><p>Now, React can load these components when they are rendered.</p><p><strong>5. Initial Bundle</strong></p><p>The initial bundle is the JavaScript required to load and render the application when a user first visits a page. This is particularly important because users must download and execute this JavaScript before they can fully interact with the application.</p><p>Example:</p><p>Imagine your application has three pages:</p><ul><li>Home</li><li>Dashboard</li><li>Reports</li></ul><p>If all three pages and their dependencies are included in the initial bundle, users visiting only the Home page might download JavaScript required for the Dashboard and Reports pages as well.</p><p>Instead, we can implement route-based code splitting.</p><pre>import { lazy, Suspense } from &#39;react&#39;;<br><br>const Home = lazy(() =&gt; import(&#39;./Home&#39;));<br>const Dashboard = lazy(() =&gt; import(&#39;./Dashboard&#39;));<br>const Reports = lazy(() =&gt; import(&#39;./Reports&#39;));<br>function App() {<br>  return (<br>    &lt;Suspense fallback={&lt;p&gt;Loading...&lt;/p&gt;}&gt;<br>      {/* Render the required page based on the route */}<br>    &lt;/Suspense&gt;<br>  );<br>}</pre><p>With route-based code splitting, the browser can download the JavaScript for the page the user visits instead of loading every page upfront.</p><h3>5. How to Optimize the Bundle Size</h3><p>After analyzing the production bundle, we can identify large dependencies, unnecessary code, and opportunities to improve performance.</p><p>Here are some commonly used frontend optimization techniques.</p><ol><li><strong>Code Splitting</strong> — Instead of loading the entire application at once, divide the application into smaller chunks and load them when required.</li><li><strong>Tree Shaking </strong>— Tree shaking removes unused exports from JavaScript modules during the production build.</li><li><strong>Minification</strong> — Minification removes unnecessary characters from JavaScript and CSS files, such as whitespace, comments, and unnecessary syntax.</li><li><strong>Asset Compression (Gzip and Brotli)</strong> — Compression reduces the amount of data transferred between the server and browser. Two commonly used compression algorithms are Gzip and Brotli.</li><li><strong>Dynamic Imports</strong> — Dynamic imports allow us to load modules only when they are needed instead of including them in the initial application load.</li><li><strong>Third-Party Dependency Optimization </strong>— If an application uses a large date library for basic date formatting, consider whether a lightweight alternative or native JavaScript Date APIs would be sufficient.</li><li><strong>Duplicate Dependency Removal</strong> — If different components depend on different versions of the same package, inspect the dependency tree and resolve unnecessary version duplication.</li><li><strong>Lazy Loading Images and Assets </strong>— Not all assets need to load immediately when a page opens.Use lazy loading for images and other resources that are outside the initial viewport.</li><li><strong>Optimize CSS</strong> — Remove unused CSS and avoid loading large stylesheets that are unnecessary for the current page.</li><li><strong>Continuous Bundle Size Monitoring</strong> — Bundle optimization should be an ongoing process.After introducing new libraries or features, compare production bundle reports to identify unexpected increases.</li></ol><p>Bundle analysis should be part of our frontend performance optimization process, not something we perform only when an application becomes slow. By regularly inspecting production bundles, identifying large dependencies, and applying optimization techniques, we can build frontend applications that load faster and provide a better user experience.</p><p>If you don’t want to miss the upcoming articles in this series, <strong>follow me on </strong><a href="http://www.linkedin.com/in/dhananjaya-yapa"><strong>LinkedIn</strong></a>. I’ll be sharing each new article along with practical insights.</p><p>Thanks for reading, and I’ll see you in the next article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aec31392a163" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Microsoft Entra ID (Azure AD) SSO Authentication in React Web application with React…]]></title>
            <link>https://medium.com/@dhananjayayapa99/understanding-microsoft-entra-id-azure-ad-sso-authentication-in-react-web-application-with-react-119fd750bb6c?source=rss-43fc6c01b3fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/119fd750bb6c</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[microsoft-azure-ad]]></category>
            <category><![CDATA[msal-react]]></category>
            <category><![CDATA[sso]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Dhananjaya Yapa]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 09:57:42 GMT</pubDate>
            <atom:updated>2026-11-03T09:57:42.130Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Microsoft Entra ID (Azure AD) SSO Authentication in React Web application with React MSAL: Authorization Code Flow with PKCE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6QyI_FlhsVnFKiEFyf25zg.png" /></figure><h3>1. What is Single Sign-On (SSO)?</h3><p>Single Sign-On is an authentication mechanism that allows users to access multiple applications using a single set of credentials.</p><p>For example, imagine an organization uses the following applications:</p><ul><li>Employee Management System</li><li>Document Management System</li><li>HR Management System</li><li>Internal Workflow Application</li></ul><p>Without SSO, each application might maintain its own login system and user credentials. With SSO, the organization can use one central Identity Provider to authenticate users.</p><p>For example, when an employee logs into an application using their company Microsoft account, Microsoft verifies their identity. Other applications integrated with the same Identity Provider can also recognize the authenticated user, subject to their own access policies.</p><h3>2. What is Microsoft Entra ID (Azure Active Directory)?</h3><p>Microsoft Entra ID, previously known as Azure Active Directory (Azure AD), is Microsoft’s cloud-based Identity and Access Management (IAM) service.</p><p>It helps organizations manage:</p><ul><li>User identities.</li><li>Organizational accounts.</li><li>Authentication.</li><li>Application registrations.</li><li>Single Sign-On.</li><li>Multi-Factor Authentication (MFA).</li><li>Conditional Access policies.</li><li>Application permissions.</li></ul><p>Microsoft Entra ID acts as the <strong>Identity Provider (IdP)</strong> in our SSO architecture.</p><p>Before understanding the authentication flow, let’s understand some important terms.</p><p><strong>Identity Provider (IdP) — </strong>An Identity Provider is responsible for authenticating users and providing trusted identity information to applications.</p><p>In our implementation, Microsoft Entra ID is the Identity Provider.</p><p><strong>Client Application — </strong>The client application is the application that requests user authentication.</p><p>In our case, it is the React frontend using MSAL.</p><p><strong>Resource Server — </strong>A resource server is an API that accepts access tokens and provides protected resources.</p><p>In our example, it is our Node.js backend.</p><p><strong>App Registration — </strong>App Registration is where we register our application in Microsoft Entra ID.</p><p>It provides important configuration values such as:</p><ul><li>Application (Client) ID.</li><li>Directory (Tenant) ID.</li><li>Redirect URI.</li><li>Supported account types.</li><li>API permissions.</li></ul><p><strong>Tenant ID — </strong>A Tenant ID uniquely identifies an organization’s Microsoft Entra directory.</p><p><strong>Client ID — </strong>A Client ID identifies an application registered in Microsoft Entra ID.</p><h3>3. Understanding the Microsoft SSO Architecture</h3><p>Let’s consider a React frontend and Node.js backend.</p><p>Our architecture contains three main components:</p><h3>React Frontend :</h3><p>The frontend is responsible for:</p><ul><li>Displaying the Microsoft login button.</li><li>Initiating the login process.</li><li>Redirecting users to Microsoft.</li><li>Receiving the authentication response.</li><li>Acquiring tokens through MSAL.</li><li>Sending access tokens when calling protected APIs.</li></ul><p>We use:</p><ul><li>@azure/msal-react</li><li>@azure/msal-browser</li></ul><h3>Microsoft Entra ID :</h3><p>Microsoft is responsible for:</p><ul><li>Authenticating the organizational user.</li><li>Verifying credentials.</li><li>Applying MFA and Conditional Access policies.</li><li>Issuing authorization codes and tokens.</li></ul><h3>Node.js Backend :</h3><p>The backend is responsible for:</p><ul><li>Receiving Microsoft access tokens.</li><li>Validating token signatures and claims.</li><li>Verifying that tokens are intended for the backend API.</li><li>Identifying the corresponding application user.</li><li>Checking application account status.</li><li>Applying application roles and permissions.</li><li>Establishing the application’s own session if required.</li></ul><h3>4. Understanding the Authorization Code Flow with PKCE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VeCAw1N16NiyUYDX3spjUw.png" /></figure><p>This is one of the most important parts of Microsoft authentication. Modern React applications are Single Page Applications (SPAs). A SPA executes JavaScript directly in the user’s browser. Unlike a traditional server-side application, it cannot safely store a client secret.</p><p>Therefore, Microsoft recommends using the <strong>OAuth 2.0 Authorization Code Flow with PKCE</strong> for SPAs. MSAL React supports this flow through MSAL Browser.</p><p>Let’s understand how it works.</p><h4>What is Authorization Code Flow? :</h4><p>Authorization Code Flow is an OAuth 2.0 flow where the application first receives a temporary authorization code from the Identity Provider.</p><p>The application then exchanges this authorization code for tokens.</p><p>The process has two major stages:</p><ol><li>Authorization Code Request.</li><li>Authorization Code Exchange.</li></ol><p>However, for browser-based applications, we also need additional protection. This is where PKCE comes in.</p><h4>What is PKCE? :</h4><p>PKCE stands for <strong>Proof Key for Code Exchange</strong>.</p><p>It is a security extension to the OAuth 2.0 Authorization Code Flow. PKCE protects the authorization code exchange process against authorization code interception. To understand why it is important, let’s look at a potential security problem.</p><h4>Why do we need PKCE? :</h4><p>Imagine a React application initiating an authentication request. Microsoft authenticates the user and redirects the browser back to the application with an authorization code. Suppose an attacker manages to intercept that authorization code. Without additional protection, the attacker might attempt to exchange the intercepted authorization code for tokens. PKCE helps prevent this.</p><p>It ensures that the application exchanging the authorization code is the same application instance that initiated the authentication request and possesses the original secret verifier.</p><h4>How does PKCE work? :</h4><p>PKCE uses two important values:</p><p><strong>1. Code Verifier</strong></p><p>A cryptographically random string generated by the client application.</p><p>Example:</p><pre>code_verifier =<br>dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk</pre><p>The code verifier is kept by the client application and is not sent in the initial authorization request.</p><p><strong>2. Code Challenge</strong></p><p>The code challenge is generated by applying SHA-256 hashing to the code verifier and then encoding the result using Base64 URL encoding.</p><p>The formula is:</p><pre>code_challenge =<br>BASE64URL(SHA256(code_verifier))</pre><p>The resulting challenge is sent to Microsoft during the authorization request.</p><h3>Complete PKCE Process :</h3><p>Let’s understand the complete sequence.</p><p><strong>Step 1: Generate Code Verifier</strong></p><p>The application generates a random code_verifier.</p><pre>code_verifier = random_string()</pre><p><strong>Step 2: Generate Code Challenge</strong></p><p>The application hashes the verifier using SHA-256.</p><pre>code_challenge =<br>BASE64URL(SHA256(code_verifier))</pre><p><strong>Step 3: Send Authorization Request</strong></p><p>The application redirects the user to Microsoft Entra ID.</p><p>The request includes:</p><pre>client_id<br>response_type=code<br>redirect_uri<br>scope<br>state<br>nonce<br>code_challenge<br>code_challenge_method=S256</pre><p>Notice that the authorization request contains the code challenge, not the original verifier.</p><p><strong>Step 4: User Authentication</strong></p><p>Microsoft displays the login page.</p><p>The user enters their organizational credentials.</p><p>Microsoft verifies the credentials and applies any configured security policies, such as MFA.</p><p><strong>Step 5: Return Authorization Code</strong></p><p>After successful authentication, Microsoft redirects the browser to the registered redirect URI with an authorization code.</p><p>For example:</p><pre>https://localhost:5173/auth/callback?code=AUTH_CODE</pre><p>The actual redirect response can also contain state information.</p><p><strong>Step 6: Exchange Authorization Code</strong></p><p>The application sends the authorization code and the original code_verifier to Microsoft&#39;s token endpoint.</p><p>Microsoft performs the following checks:</p><ol><li>Is the authorization code valid?</li><li>Has the authorization code already been used?</li><li>Does the supplied verifier produce the original code challenge?</li><li>Does the request match the original client and redirect URI?</li></ol><p>Microsoft calculates:</p><pre>BASE64URL(SHA256(code_verifier))</pre><p>It compares the calculated value with the challenge stored during the original authorization request. If they match, the token exchange can proceed.</p><p><strong>Step 7: Issue Tokens</strong></p><p>After successful verification, Microsoft issues the requested tokens.</p><p>These can include:</p><ul><li>ID Token.</li><li>Access Token.</li><li>Refresh Token, where applicable.</li></ul><p>The tokens depend on the requested scopes and application configuration.</p><h3>7. Complete Implementation Using React MSAL</h3><h4>Step 1: Install MSAL packages</h4><p>Install the required packages in your React project:</p><pre>npm install @azure/msal-browser @azure/msal-react</pre><p>@azure/msal-browser handles the browser authentication process, while @azure/msal-react makes MSAL functionality available through React components and hooks.</p><h4>Step 2: Configure MSAL</h4><p>Create a file named authConfig.js.</p><pre>export const msalConfig = {<br>  auth: {<br>    clientId: &quot;YOUR_APPLICATION_CLIENT_ID&quot;,<br>    authority:<br>        &quot;https://login.microsoftonline.com/YOUR_TENANT_ID&quot;,<br>      redirectUri: &quot;http://localhost:3000&quot;,<br>  },  <br>  cache: {<br>    cacheLocation: &quot;sessionStorage&quot;,<br>    storeAuthStateInCookie: false,<br>  },<br>};</pre><pre>export const loginRequest = {<br>  scopes: [&quot;openid&quot;, &quot;profile&quot;, &quot;email&quot;],<br>};</pre><p>Let’s understand these properties.</p><p><strong>clientId — </strong>This is the Application (client) ID generated when we registered our application in Microsoft Entra ID. It identifies our React application to Microsoft.</p><p><strong>authority — </strong>This tells MSAL which Microsoft identity platform endpoint should handle authentication.</p><p>For a single-tenant application, we use:</p><pre>https://login.microsoftonline.com/TENANT_ID</pre><p>For applications that support multiple organizational tenants, the authority can be configured according to the required account types.</p><p><strong>redirectUri — </strong>This is the URL where Microsoft redirects the user after the authentication process. It must match a redirect URI registered in Microsoft Entra ID.</p><p><strong>cacheLocation — </strong>This determines where MSAL stores authentication-related cache information. Here, we use sessionStorage, which keeps the cache available for the current browser tab session.</p><p><strong>scopes — </strong>The scopes specify the information and permissions requested during authentication.</p><ul><li>openid requests OpenID Connect authentication.</li><li>profile requests basic profile information.</li><li>email requests an email claim when available.</li></ul><p>These scopes allow us to authenticate the user and obtain basic identity information. They do not guarantee that an email address will be present.</p><h4>Step 4: Create the MSAL instance</h4><p>Create a file named msalInstance.js.</p><pre>import {<br>    PublicClientApplication,<br>} from &quot;@azure/msal-browser&quot;;<br>import { msalConfig } from &quot;./authConfig&quot;;</pre><pre>export const msalInstance =<br>  new PublicClientApplication(msalConfig);</pre><h4>Step 5: Wrap the React application with MsalProvider</h4><p>Open your application’s entry point, usually main.jsx or index.js.</p><pre>import React from &quot;react&quot;;<br>import ReactDOM from &quot;react-dom/client&quot;;<br>import { MsalProvider } from &quot;@azure/msal-react&quot;;<br>import { msalInstance } from &quot;./msalInstance&quot;;</pre><pre>import App from &quot;./App&quot;;</pre><pre>async function initializeApp() {<br>  await msalInstance.initialize();</pre><pre>  ReactDOM.createRoot(<br>    document.getElementById(&quot;root&quot;)<br>  ).render(<br>    &lt;MsalProvider instance={msalInstance}&gt;<br>      &lt;App /&gt;<br>    &lt;/MsalProvider&gt;<br>  );<br>}</pre><pre>initializeApp();</pre><p>MsalProvider makes the MSAL instance available to all React components inside the application.</p><p>We initialize the MSAL instance before rendering the application so it is ready to process authentication operations.</p><h4>Step 6: Implement the Microsoft Login button</h4><p>Now let’s create a login component.</p><p>Create a file named Login.jsx.</p><pre>import { useMsal } from &quot;@azure/msal-react&quot;;<br>import { loginRequest } from &quot;./authConfig&quot;;</pre><pre>function Login() {<br>  const { instance } = useMsal();</pre><pre>  const handleLogin = () =&gt; {<br>    instance.loginRedirect(loginRequest);<br>  };</pre><pre>  return (<br>    &lt;div&gt;<br>      &lt;h2&gt;Welcome&lt;/h2&gt;</pre><pre>      &lt;button onClick={handleLogin}&gt;<br>        Sign in with Microsoft<br>      &lt;/button&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><pre>export default Login;</pre><p>Let’s understand what happens when the user clicks the login button.</p><ol><li>useMsal() gives us access to the MSAL instance.</li><li>loginRedirect() starts the Microsoft authentication process.</li><li>The browser redirects the user to the Microsoft login page.</li><li>The user signs in using their Microsoft account.</li><li>Microsoft authenticates the user and redirects the browser back to our registered redirect URI.</li><li>MSAL processes the authentication response and makes the account information available to the React application.</li></ol><h4>Step 7: Get the authenticated user’s information</h4><p>After successful login, we can retrieve the signed-in user’s account information using the useMsal() hook.</p><p>Create a component named UserProfile.jsx.</p><pre>import {<br>   useMsal,<br>   useIsAuthenticated,<br>} from &quot;@azure/msal-react&quot;;</pre><pre>function UserProfile() {<br>  const { accounts } = useMsal();<br>  const isAuthenticated = useIsAuthenticated();</pre><pre>  if (!isAuthenticated || accounts.length === 0) {<br>    return &lt;p&gt;Please sign in.&lt;/p&gt;;<br>  }</pre><pre>  const account = accounts[0];</pre><pre>  return (<br>    &lt;div&gt;<br>      &lt;h2&gt;Welcome, {account.name}&lt;/h2&gt;</pre><pre>      &lt;p&gt;Email: {account.username}&lt;/p&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><pre>export default UserProfile;</pre><p>Here:</p><ul><li>useIsAuthenticated() tells us whether MSAL has an authenticated account.</li><li>accounts contains the accounts known to the MSAL instance.</li><li>account.name provides the user&#39;s display name when available.</li><li>account.username provides the account&#39;s username, commonly an email-like address.</li><li>account.tenantId identifies the Microsoft Entra tenant.</li></ul><p>The account object is useful for displaying the signed-in user’s information in the UI.</p><p><strong>Important:</strong> The account information returned by MSAL is client-side information. It is suitable for displaying user details, but it should not be treated as proof of identity by a server.</p><h4>Step 8: Implement Logout</h4><p>MSAL also provides a built-in logout method.</p><p>Create a file named Logout.jsx.</p><pre>import { useMsal } from &quot;@azure/msal-react&quot;;</pre><pre>function Logout() {<br>  const { instance } = useMsal();</pre><pre>  const handleLogout = () =&gt; {<br>    instance.logoutRedirect();<br>  };</pre><pre>  return (<br>    &lt;button onClick={handleLogout}&gt;<br>      Sign out<br>    &lt;/button&gt;<br>  );<br>}</pre><pre>export default Logout;</pre><p>When the user clicks the logout button:</p><ol><li>MSAL starts the logout process.</li><li>The browser redirects to Microsoft.</li><li>Microsoft signs the user out according to the identity platform’s logout behavior.</li><li>The user is redirected back to the application.</li></ol><h4>Step 9: Display Login or User Profile Based on Authentication State</h4><p>Finally, we can combine everything in App.jsx.</p><pre>import { useIsAuthenticated } from &quot;@azure/msal-react&quot;;<br>import Login from &quot;./Login&quot;;<br>import UserProfile from &quot;./UserProfile&quot;;<br>import Logout from &quot;./Logout&quot;;</pre><pre>function App() {<br>  const isAuthenticated = useIsAuthenticated();</pre><pre>  return (<br>    &lt;div&gt;<br>      {isAuthenticated ? (<br>        &lt;&gt;<br>          &lt;UserProfile /&gt;<br>          &lt;Logout /&gt;<br>        &lt;/&gt;<br>      ) : (<br>        &lt;Login /&gt;<br>      )}<br>    &lt;/div&gt;<br>  );<br>}</pre><pre>export default App;</pre><p>Now the application automatically displays the appropriate UI based on the authentication state.</p><ul><li>If the user is not authenticated, the Microsoft login button is displayed.</li><li>If the user is authenticated, their profile information and logout button are displayed.</li></ul><h4>Step 10: What happens internally when we click Sign in with Microsoft?</h4><p>Let’s connect the implementation to the authentication flow we discussed earlier.</p><ol><li>The user clicks <strong>Sign in with Microsoft</strong>.</li><li>MSAL generates a PKCE code verifier and its corresponding code challenge.</li><li>MSAL redirects the browser to the Microsoft authorization endpoint with the client ID, redirect URI, requested scopes, and code challenge.</li><li>Microsoft displays the login page.</li><li>The user authenticates with their Microsoft account.</li><li>Microsoft redirects the browser to our React application’s redirect URI with an authorization code.</li><li>MSAL processes the response and uses the PKCE code verifier to securely complete the authorization code exchange.</li><li>Microsoft issues the requested tokens.</li><li>MSAL processes and caches the authentication result.</li><li>The React application can access the authenticated account through MSAL hooks.</li></ol><p>With this implementation, we have completed Microsoft authentication in a React application using MSAL.</p><p>We can now allow users to sign in with their Microsoft organizational accounts, access their basic account information, maintain their authentication state, and sign out.</p><p><strong>What’s next?</strong></p><p>Once the user is authenticated, our React application can acquire an access token using MSAL and send it to the backend API in the Authorization header as a Bearer token.</p><p>The backend can then validate the access token issued by Microsoft Entra ID, identify the authenticated user using the validated token claims, and apply <strong>Role-Based Access Control (RBAC)</strong> to determine which resources and operations the user is authorized to access.</p><p>This creates a clear separation of responsibilities:</p><ul><li><strong>Frontend (React + MSAL):</strong> Handles Microsoft sign-in, authentication state, and access-token acquisition.</li><li><strong>Backend (API):</strong> Validates access tokens, identifies users, checks their roles and permissions, and protects API resources.</li></ul><p>If you don’t want to miss the upcoming articles in this series, <strong>follow me on </strong><a href="http://www.linkedin.com/in/dhananjaya-yapa"><strong>LinkedIn</strong></a>. I’ll be sharing each new article along with practical insights.</p><p>Thanks for reading, and I’ll see you in the next article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=119fd750bb6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debouncing vs Throttling — Concepts Every Frontend Developer Should Know]]></title>
            <link>https://medium.com/@dhananjayayapa99/debouncing-vs-throttling-concepts-every-frontend-developer-should-know-5ef64bce933d?source=rss-43fc6c01b3fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ef64bce933d</guid>
            <category><![CDATA[debouncing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[throttling]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Dhananjaya Yapa]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 09:07:03 GMT</pubDate>
            <atom:updated>2026-10-27T09:07:03.886Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Zx8HgfH-knGcKMyP9uHnQ.png" /></figure><p>As frontend developers, we often work with events that happen repeatedly, such as typing in a search bar, scrolling a page, resizing a browser window, or clicking a button. But have you ever wondered what happens when these events trigger a function hundreds of times within a few seconds? Unnecessary function executions can lead to excessive API requests, wasted processing, and poor application performance.</p><p>Two important JavaScript techniques can help us handle these situations more efficiently: <strong>Debouncing and Throttling.</strong></p><p>Let’s understand what they mean, how they work, and how to implement them using practical JavaScript examples.</p><h3>1. What Are Debouncing and Throttling means?</h3><h3>Debouncing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrJwNGnUBqlD6rKnt92JCA.png" /></figure><p><strong>Debouncing ensures that a function executes only after a specified period has passed without another event occurring.</strong></p><p>In simple terms, it waits until the user stops performing an action before executing the function.</p><p>For example, imagine a user searching for an article by typing:</p><p>R → Re → Rea → Reac → React</p><p>Without debouncing, every keystroke could trigger an API request.</p><p>With debouncing, we can wait until the user stops typing for 500 milliseconds before sending the request.</p><p>Instead of making five requests, the application can make just one request for the final search term.</p><h3>Throttling</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwCUp7ykoUL4c6i6mOOkdw.png" /></figure><p><strong>Throttling limits how frequently a function can execute within a specified time interval.</strong></p><p>In simple terms, it allows a function to execute at controlled intervals, even when events continue to occur.</p><p>For example, imagine tracking a user’s reading progress while they scroll through a long article.</p><p>Scroll events can occur many times per second. Instead of processing every event, throttling can limit the handler to executing at most once every 500 milliseconds.</p><p>This helps reduce unnecessary processing while the user continues scrolling.</p><h3>2. How Do They Work?</h3><h4>How Debouncing Works</h4><p>Consider a search input with a debounce delay of 500 milliseconds.</p><ol><li>The user types a character.</li><li>A timer starts.</li><li>If the user types another character before the timer finishes, the previous timer is cancelled.</li><li>A new timer starts.</li><li>When the user stops typing for 500 milliseconds, the function executes.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*AarC7p2xcpvxFgKgECjTDA.png" /></figure><h3>Practical JavaScript Implementation: Debouncing</h3><p>function debounce(callback, delay) {<br> let timer;</p><p>return function (…args) {<br> clearTimeout(timer);</p><p>timer = setTimeout(() =&gt; {<br> callback(…args);<br> }, delay);<br> };<br>}</p><p>// Simulate searching for articles<br>const searchArticles = debounce((query) =&gt; {<br> console.log(“Searching articles:”, query);<br> // Call the search API here<br>}, 500);</p><p>// Simulate user typing<br>searchArticles(“R”);<br>searchArticles(“Re”);<br>searchArticles(“Rea”);<br>searchArticles(“React”);</p><p><strong>What happens here?</strong></p><ul><li>Every call cancels the previous timer.</li><li>A new 500 ms timer starts.</li><li>Because the calls happen rapidly, only the final callback executes.</li><li>The output is Searching articles: React, assuming the user does not type again during the delay.</li></ul><p>The ...args syntax allows the debounced function to accept and pass through any number of arguments.</p><h3>How Throttling Works</h3><p>Consider a scroll handler with a throttle interval of 500 milliseconds.</p><ol><li>A scroll event occurs.</li><li>The function executes if the interval allows it.</li><li>Additional events during the interval are ignored by a leading-edge throttle.</li><li>Once the interval has passed, a later event can execute the function again.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*FThTdmxSyarL7ZuJzMpz6w.png" /></figure><h3>Practical JavaScript Implementation: Throttling</h3><p>function throttle(callback, delay) {<br> let lastExecution = 0;</p><p>return function (…args) {<br> const now = Date.now();</p><p>if (now — lastExecution &gt;= delay) {<br> lastExecution = now;<br> callback(…args);<br> }<br> };<br>}</p><p>// Track article reading progress<br>const trackReadingProgress = throttle((progress) =&gt; {<br> console.log(“Reading progress:”, progress + “%”);<br> // Update reading progress<br>}, 500);</p><p>// Simulate scroll events<br>trackReadingProgress(10);<br>trackReadingProgress(20);<br>trackReadingProgress(30);<br>trackReadingProgress(40);</p><p><strong>What happens here?</strong></p><ul><li>The first call executes immediately because the initial timestamp is zero.</li><li>Calls within the next 500 milliseconds are ignored.</li><li>A later call can execute once the interval has passed.</li></ul><p>This implementation is a <strong>leading-edge throttle</strong>. It does not automatically execute again at the end of the interval if no new event occurs.</p><h3>3. Real-World Examples</h3><h4>Example 1: Search Functionality — Debouncing</h4><p>Imagine you’re building a blog or news website.</p><p>When users search for articles, making an API request after every keystroke creates unnecessary network traffic.</p><p><strong>Solution:</strong> Use debouncing to wait until the user pauses typing before fetching matching results.</p><p>Benefits:</p><ul><li>Reduces unnecessary API requests.</li><li>Minimizes repeated processing.</li><li>Improves the search experience.</li></ul><h4>Example 2: Scroll Tracking — Throttling</h4><p>Imagine an article platform that tracks how far readers scroll.</p><p>Updating reading progress on every scroll event can create unnecessary processing.</p><p><strong>Solution:</strong> Use throttling to limit how often the reading progress handler executes.</p><p>Benefits:</p><ul><li>Controls event-processing frequency.</li><li>Reduces unnecessary calculations.</li><li>Helps maintain a responsive interface.</li></ul><h3>4. Key Differences Between Debouncing and Throttling</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*FPlVw8YWoZ9DtuYuTyXVkg.png" /></figure><h3>5. When Should You Use Each Technique?</h3><p>Choose <strong>debouncing</strong> when you care about the final action after a series of events.</p><p>Examples:</p><ul><li>Search suggestions</li><li>Form validation after typing</li><li>Saving a draft after the user pauses editing</li><li>Expensive calculations after resizing ends</li></ul><p>Choose <strong>throttling</strong> when you need to process ongoing activity at a controlled rate.</p><p>Examples:</p><ul><li>Scroll tracking</li><li>Mouse-movement tracking</li><li>Periodic UI updates during resizing</li><li>Rate-limiting client-side event handlers</li></ul><p>If you don’t want to miss the upcoming articles in this series, <strong>follow me on </strong><a href="http://www.linkedin.com/in/dhananjaya-yapa"><strong>LinkedIn</strong></a>. I’ll be sharing each new article along with practical insights.</p><p>Thanks for reading, and I’ll see you in the next article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ef64bce933d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Do We Need Nest.js When Node.js Already Exists?]]></title>
            <link>https://medium.com/@dhananjayayapa99/why-do-we-need-nest-js-when-node-js-already-exists-328857d63e36?source=rss-43fc6c01b3fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/328857d63e36</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Dhananjaya Yapa]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 10:43:29 GMT</pubDate>
            <atom:updated>2026-07-22T10:46:14.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPTipzLtL5ungOQBVGBAgw.png" /></figure><blockquote><strong><em>The Architectural Evolution of Server-Side JavaScript</em></strong></blockquote><p>JavaScript has grown from a language used only for adding small interactions on web pages into a powerful technology for building complete backend systems. Node.js played a major role in this change by allowing developers to use JavaScript on the server side.</p><p>However, as applications became larger and more complex, developers started facing problems with managing code structure, scalability, and maintainability. Node.js provides the core environment for running JavaScript on the server, but it does not enforce a specific application architecture. This flexibility can sometimes lead to unorganized and difficult-to-maintain codebases, especially in large projects.</p><p>NestJS was created to solve these challenges by providing a structured framework built on top of Node.js. It introduces clear architecture, better organization, dependency injection, and design patterns that help developers build scalable and maintainable enterprise-level applications. Therefore, NestJS does not replace Node.js; instead, it improves the way Node.js applications are designed and managed.</p><p>This Article provides an exhaustive, point-by-point analysis in accessible terms, and the broader business implications of adopting a highly structured architectural framework.</p><blockquote><strong><em>The Core Distinction — Runtime Environments Vs Opinionated Frameworks : Engine vs Car</em></strong></blockquote><p>Comparing <strong>Node.js</strong> and <strong>NestJS</strong> is like comparing a car engine to a complete car. They work together at different levels:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnYzHOpG0wWoncgcvs2f-g.png" /></figure><ul><li><strong>Node.js (The Engine):</strong> A <strong>runtime environment</strong> that lets you run JavaScript on a server instead of inside a web browser. It is fast and efficient at handling many tasks at once, but it gives you a blank slate with no rules on how to organize your code.</li><li><strong>NestJS (The Car):</strong> A <strong>framework</strong> built on top of Node.js. It provides a structured, organized blueprint for building large apps. It doesn’t replace Node.js — it organizes it so your code stays neat and easy to manage over time.</li></ul><blockquote><strong><em>The Express.js Middle Ground &amp; “Architectural Chaos”</em></strong></blockquote><p>To handle raw Node.js code easily, developers often use <strong>Express.js</strong> — a flexible, lightweight tool that handles web requests.</p><ul><li><strong>The Advantage:</strong> Express has no strict rules. For small projects or prototypes, this allows you to build very quickly.</li><li><strong>The Problem:</strong> On larger teams or big projects, this total freedom creates chaos. Without clear structure, code becomes tangled, messy, hard to test, and difficult to maintain.</li></ul><p>NestJS solves this problem by enforcing clear rules and structure from day one.</p><h3>Point-by-Point Justification: <strong><em>Why We Need NestJS ?</em></strong></h3><p>To resolve the complexities of scaling applications, NestJS was created. Specifically those inspired by the frontend framework Angular — into the Node.js backend ecosystem.</p><p>The transition from a raw runtime or minimalist framework to a structured framework is driven by several key engineering imperatives. The following points provide a comprehensive explanation of why NestJS is chosen over plain Node.js and Express.</p><blockquote><strong><em>Point 1: Standardized Rules Replace Secret Team Knowledge</em></strong></blockquote><p>In flexible setups like Express, code structure relies on <strong>“tribal knowledge”</strong> — unwritten, custom rules known only to the original developers. New team members often waste weeks just figuring out where everything is saved and how the project works.</p><p>NestJS solves this through <strong>“convention over configuration”</strong>:</p><ul><li><strong>Enforced Rules:</strong> NestJS gives every project a clear, pre-set blueprint.</li><li><strong>Instant Familiarity:</strong> Because every NestJS app follows the exact same structure, any developer can jump into a new project and understand it immediately.</li><li><strong>Faster Onboarding:</strong> Teams spend less time explaining custom setups and more time building software.</li></ul><blockquote><strong><em>Point 2: Built-in TypeScript Prevents Costly Crashes</em></strong></blockquote><p>Standard Node.js uses JavaScript, which doesn’t check for data errors until your code is actively running. A simple typo can bring down an entire production application.</p><p>NestJS solves this by building <strong>TypeScript</strong> directly into its foundation:</p><ul><li><strong>Catch Errors Early:</strong> TypeScript acts like a smart spell-checker, catching bugs as you type rather than after you launch.</li><li><strong>Native Integration:</strong> Unlike Express, where setting up TypeScript is messy and incomplete, NestJS uses it natively across every layer of the app.</li><li><strong>70% Fewer Bugs:</strong> Catching type errors during development prevents up to 70% of common runtime crashes before code ever reaches users.</li></ul><blockquote><strong><em>Point 3: Dependency Injection and the Inversion of Control</em></strong></blockquote><p>In large applications, components often depend on each other. For example, a <strong>UserController</strong> may need a <strong>UserService</strong> to fetch user data. In traditional Node.js/Express applications, developers manually create dependencies:</p><pre>const userService = new UserService();</pre><p>This creates tight coupling and makes the application harder to maintain.</p><p>NestJS solves this using <strong>Dependency Injection (DI)</strong> and <strong>Inversion of Control (IoC)</strong>. Instead of classes creating their own dependencies, NestJS’s built-in <strong>IoC container</strong> automatically creates and injects required services at runtime</p><pre>constructor(private userService: UserService) {}</pre><p>NestJS manages the creation, lifecycle, and connection between components, resulting in a <strong>modular, loosely coupled, testable, and maintainable architecture</strong>. Unlike Express, where DI requires external libraries, NestJS provides DI as a core feature.</p><blockquote><strong><em>Point 4: Modular Architecture for Infinite Scalability</em></strong></blockquote><p>Scaling an unstructured Node.js app can result in a messy, interconnected codebase — where updating your user login might accidentally break your payment system.</p><p>NestJS prevents this by enforcing <strong>Modular Architecture</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qs9h6ZN0XKkmwfBcU_3c2A.png" /></figure><ul><li><strong>Self-Contained Blocks:</strong> The app is split into independent modules (e.g., UserModule, PaymentModule, InventoryModule), like self-contained Lego bricks.</li><li><strong>Isolated Changes:</strong> Updating or completely rewriting one module won’t break the others since dependencies are clean and isolated.</li><li><strong>Microservice-Ready:</strong> This clean separation makes it easy to split a large app into smaller microservices as your company grows.</li></ul><blockquote><strong><em>Point 5: Everything Built-In out of the Box</em></strong></blockquote><p>Express gives you basic routing, but forces you to search for, test, and manually wire together dozen of third-party libraries for things like database connections or email validation — adding risk from abandoned or insecure tools.</p><p>NestJS acts as an all-inclusive toolkit:</p><ul><li><strong>Ready-to-Use Features:</strong> Comes with built-in, officially maintained tools for input validation, security, error handling, caching, and database setup.</li><li><strong>Less Assembly Required:</strong> You don’t have to waste time finding and gluing third-party libraries together.</li><li><strong>Focus on Value:</strong> Developers spend less time setting up infrastructure and more time building features that matter.</li></ul><p>In this article, we explored why NestJS was created and how it addresses the architectural challenges that developers often face when building large backend applications with Node.js.</p><p>In the next article, we’ll dive into <strong>The Anatomy of a NestJS Application</strong>, where we’ll explore the fundamental building blocks of NestJS, including modules, controllers, providers, dependency injection, decorators, and other core concepts that every NestJS developer should understand.</p><p>If you don’t want to miss the upcoming articles in this series, <strong>follow me on </strong><a href="http://www.linkedin.com/in/dhananjaya-yapa"><strong>LinkedIn</strong></a>. I’ll be sharing each new article along with practical insights.</p><p>Thanks for reading, and I’ll see you in the next article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=328857d63e36" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>