<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Thang Truong</title>
    <description>The latest articles on Forem by Thang Truong (@yensubldg).</description>
    <link>https://forem.com/yensubldg</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%2F867803%2F12b93178-f0c8-4cae-a52e-0c7be1486322.jpeg</url>
      <title>Forem: Thang Truong</title>
      <link>https://forem.com/yensubldg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yensubldg"/>
    <language>en</language>
    <item>
      <title>Tired of Guessing Your NestJS Routes? There's a Dashboard for That!</title>
      <dc:creator>Thang Truong</dc:creator>
      <pubDate>Mon, 16 Jun 2025 13:43:26 +0000</pubDate>
      <link>https://forem.com/yensubldg/tired-of-guessing-your-nestjs-routes-theres-a-dashboard-for-that-pi9</link>
      <guid>https://forem.com/yensubldg/tired-of-guessing-your-nestjs-routes-theres-a-dashboard-for-that-pi9</guid>
      <description>&lt;p&gt;Stop blindly navigating your growing NestJS projects! We've all been there – digging through controllers to find that specific endpoint. That's why I built &lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=Yensubldg.framework-routes-dashboard" rel="noopener noreferrer"&gt;Framework Routes Dashboard&lt;/a&gt;&lt;/strong&gt;, a VS Code extension that gives you a bird's-eye view of your entire API landscape.&lt;/p&gt;

&lt;p&gt;This simple yet powerful tool scans your workspace and presents all your NestJS routes in a clean, intuitive sidebar panel. No more wasted time hunting for endpoint details!&lt;/p&gt;




&lt;h3&gt;
  
  
  See Your Entire API at a Glance
&lt;/h3&gt;

&lt;p&gt;NestJS Dashboard automatically discovers and displays all your HTTP endpoints, providing essential information in a clear and organized tree view. You'll instantly see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Method:&lt;/strong&gt; GET, POST, PUT, DELETE, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route Path:&lt;/strong&gt; The full path to your endpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controller Name:&lt;/strong&gt; The name of the controller class.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handler Method:&lt;/strong&gt; The specific method handling the request.&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%2Fhardx70oe1024uyowzzo.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%2Fhardx70oe1024uyowzzo.png" alt="Framework Routes Dashboard" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Key Features to Streamline Your Workflow
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Discovery:&lt;/strong&gt; The extension intelligently finds all your NestJS controllers and their associated routes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Updates:&lt;/strong&gt; As you create, modify, or delete routes, the dashboard will automatically refresh to reflect the changes in your codebase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go to Definition:&lt;/strong&gt; Quickly navigate directly to the code for any endpoint with a single click.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Getting Started is a Breeze
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=Yensubldg.framework-routes-dashboard" rel="noopener noreferrer"&gt;Framework Routes Dashboard&lt;/a&gt; extension from the Visual Studio Marketplace.&lt;/li&gt;
&lt;li&gt; Open your NestJS project in VS Code.&lt;/li&gt;
&lt;li&gt; Look for the new NestJS icon in your activity bar.&lt;/li&gt;
&lt;li&gt; Click it to open the dashboard and see all your routes!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's that simple. No configuration is needed to get started.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why I Built This
&lt;/h3&gt;

&lt;p&gt;As a developer, I'm always looking for ways to improve my workflow and reduce friction. Constantly searching for route definitions in a large NestJS project was a recurring pain point. I wanted a simple, visual way to see everything at once. Seeing the positive feedback from early users has been fantastic, and I'm excited to share it with the broader dev.to community.&lt;/p&gt;

&lt;p&gt;Give it a try and let me know what you think! Your feedback and suggestions are welcome on the &lt;a href="https://github.com/yensubldg/Frameworks-Route-Dashboard" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#nestjs #vscode #typescript #devexperience&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>nestjs</category>
      <category>vscode</category>
      <category>devrel</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Multiples mode using same as dark mode class by Tailwindcss</title>
      <dc:creator>Thang Truong</dc:creator>
      <pubDate>Thu, 11 Aug 2022 04:31:00 +0000</pubDate>
      <link>https://forem.com/yensubldg/multiples-mode-using-same-as-dark-mode-class-by-tailwindcss-56p4</link>
      <guid>https://forem.com/yensubldg/multiples-mode-using-same-as-dark-mode-class-by-tailwindcss-56p4</guid>
      <description>&lt;p&gt;Tailwind - A utility-first CSS framework&lt;br&gt;
Dark mode is supported in Tailwindcss, you can see it &lt;a href="https://tailwindcss.com/docs/dark-mode"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, you want to edit your own mode. Please follow these steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Installation &lt;code&gt;tailwind&lt;/code&gt; to your project (&lt;a href="https://tailwindcss.com/docs/installation"&gt;docs here&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After complete install, you can see &lt;code&gt;taiwind.config.js (cjs)&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a &lt;code&gt;themes&lt;/code&gt; folder to store your own themes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create files &lt;code&gt;your-theme.js&lt;/code&gt; in folder &lt;code&gt;themes&lt;/code&gt; and insert this code&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;plugin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tailwindcss/plugin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;themeName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your-theme-name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// this is name of your custom theme (dark, red, light, ...)&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;plugin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;addVariant&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;addVariant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;themeName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;modifySelectors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;separator&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;modifySelectors&lt;/span&gt;&lt;span class="p"&gt;(({&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`.&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;themeName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; .&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;themeName&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;separator&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;tailwind.config.js&lt;/code&gt;, import your custom theme by option plugin
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** @type {import('tailwindcss').Config} */&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;darkMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;class&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/**/*.{astro,html,js,jsx,md,mdx,ts,tsx}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./themes/your-theme.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt; &lt;span class="c1"&gt;// edit the path if it doesn't match your project structure&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Finish, you can use your custom same as &lt;a href="https://tailwindcss.com/docs/dark-mode"&gt;dark mode&lt;/a&gt; in Tailwind
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-red-500 dark:text-white red:text-red-800 orange:text-orange-700"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Hello&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE: Don't forget to add a class to the html tag if you want the attribute to be enabled &lt;code&gt;&amp;lt;html lang="en" class="red"&amp;gt;&lt;/code&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>javascript</category>
      <category>module</category>
    </item>
    <item>
      <title>Multiple item using one ref</title>
      <dc:creator>Thang Truong</dc:creator>
      <pubDate>Mon, 01 Aug 2022 16:17:00 +0000</pubDate>
      <link>https://forem.com/yensubldg/multiple-item-using-one-ref-1288</link>
      <guid>https://forem.com/yensubldg/multiple-item-using-one-ref-1288</guid>
      <description>&lt;p&gt;Some cases in ReactJS, we need use a variable declared by &lt;code&gt;useRef&lt;/code&gt; for items, components, ....&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;First, you need variable declared by &lt;code&gt;useRef&lt;/code&gt; and &lt;br&gt;
and set initialValue to be an empty array &lt;code&gt;[]&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;const exampleRef = useRef([]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a function to add item, component to &lt;code&gt;exampleRef&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;const addToRefs = el =&amp;gt; {
    if (el &amp;amp;&amp;amp; !exampleRef.current.includes(el)) {
       exampleRef.current.push(el);
    }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you just add &lt;code&gt;ref&lt;/code&gt; to item, component, ...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div ref={addToRefs}&amp;gt;                 
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, &lt;code&gt;exampleRef.current&lt;/code&gt; as an array, you can use methods with array to use for &lt;code&gt;exampleRef&lt;/code&gt; like &lt;code&gt;map, forEach, ...&lt;/code&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>useref</category>
    </item>
  </channel>
</rss>
