<?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: Nimesh Dilhara Kulasooriya</title>
    <description>The latest articles on DEV Community by Nimesh Dilhara Kulasooriya (@nimeshdilhara).</description>
    <link>https://dev.to/nimeshdilhara</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3987640%2F6270dec9-6669-4e45-ae32-8f036010a87f.jpeg</url>
      <title>DEV Community: Nimesh Dilhara Kulasooriya</title>
      <link>https://dev.to/nimeshdilhara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nimeshdilhara"/>
    <language>en</language>
    <item>
      <title>Building a Garment Cutting Floor Gatekeeper: Why Backend Validation Matters More Than UI Restrictions</title>
      <dc:creator>Nimesh Dilhara Kulasooriya</dc:creator>
      <pubDate>Mon, 09 Nov 2026 13:30:00 +0000</pubDate>
      <link>https://dev.to/nimeshdilhara/building-a-garment-cutting-floor-gatekeeper-why-backend-validation-matters-more-than-ui-460f</link>
      <guid>https://dev.to/nimeshdilhara/building-a-garment-cutting-floor-gatekeeper-why-backend-validation-matters-more-than-ui-460f</guid>
      <description>&lt;p&gt;When building business applications, it's easy to spend most of the time thinking about dashboards, charts, and user interfaces.&lt;/p&gt;

&lt;p&gt;But in real-world manufacturing environments, some of the most important problems happen outside the screen.&lt;/p&gt;

&lt;p&gt;Recently, I worked on a project called &lt;strong&gt;ApparelFlow ERP&lt;/strong&gt;, focusing on a specific operational area in garment manufacturing: the Cutting Operations and Gatekeeper process.&lt;/p&gt;

&lt;p&gt;I wanted to explore how software engineering could help prevent operational mistakes before they affect the next stage of production.&lt;/p&gt;

&lt;p&gt;Here's what I built and some of the engineering decisions behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: What Happens When a Bundle Has Missing Pieces?
&lt;/h2&gt;

&lt;p&gt;In garment manufacturing, the cutting department prepares fabric pieces according to production requirements. These pieces are grouped into bundles and transferred to the sewing department.&lt;/p&gt;

&lt;p&gt;But what happens if a bundle reaches the sewing floor with missing components?&lt;/p&gt;

&lt;p&gt;It can interrupt production, waste resources, and affect delivery schedules.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;The idea behind the Gatekeeper Terminal was simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A batch should not move to the next production stage until it passes the required verification checks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rather than attempting to build a complete ERP suite with many unrelated features, I decided to focus on this particular workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Backend Validation: Never Trust the Frontend
&lt;/h2&gt;

&lt;p&gt;One of the main decisions I made was to treat the backend as the actual security boundary.&lt;/p&gt;

&lt;p&gt;Disabling an approval button when a batch has missing pieces might look like a reasonable solution. However, frontend restrictions alone cannot protect business operations.&lt;/p&gt;

&lt;p&gt;A user can modify frontend behavior or send requests directly to an API endpoint.&lt;/p&gt;

&lt;p&gt;So, I implemented the validation rules on the backend.&lt;/p&gt;

&lt;p&gt;Before approving a batch, the server checks whether the required component quantities are available.&lt;/p&gt;

&lt;p&gt;If even one required component is missing,&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;the approval request is rejected with:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;422 – Unprocessable Entity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This ensures that the business rule is enforced regardless of what happens on the frontend.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Role-Based Access Control (RBAC)
&lt;/h2&gt;

&lt;p&gt;Not every employee should have permission to perform every operation.&lt;/p&gt;

&lt;p&gt;For this workflow, I separated responsibilities between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cutting Supervisors: Responsible for creating and managing cutting orders.&lt;/li&gt;
&lt;li&gt;Cutting Verifiers: Authorized to verify and approve completed batches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The backend checks user permissions before allowing an approval operation.&lt;/p&gt;

&lt;p&gt;If an unauthorized user attempts to approve a batch, the server responds with:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;403 – Forbidden&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This keeps the approval process separate from order creation and helps maintain clear responsibilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Audit Logging and Traceability
&lt;/h2&gt;

&lt;p&gt;In manufacturing systems, knowing the current status of a batch isn't always enough.&lt;/p&gt;

&lt;p&gt;It's also important to understand what happened before it reached that status.&lt;/p&gt;

&lt;p&gt;I implemented audit logging to capture important verification information, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verifier identity.&lt;/li&gt;
&lt;li&gt;Verified component quantities.&lt;/li&gt;
&lt;li&gt;Fabric wastage information.&lt;/li&gt;
&lt;li&gt;Verification activities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This provides a history of important operations and makes it easier to trace how a batch was processed.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Testing the Business Rules
&lt;/h2&gt;

&lt;p&gt;Another important part of this project was testing the logic behind the workflow.&lt;/p&gt;

&lt;p&gt;I used Jest to write automated tests covering important business rules, authorization checks, and edge cases.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What happens when a batch has missing components?&lt;/li&gt;
&lt;li&gt;Can a user without verifier permissions approve a batch?&lt;/li&gt;
&lt;li&gt;Does the system reject invalid approval attempts?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted to make sure that these rules were not just working in the expected scenario but also behaving correctly when something went wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technology Stack
&lt;/h2&gt;

&lt;p&gt;The project was developed using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js (App Router) – Application framework.&lt;/li&gt;
&lt;li&gt;TypeScript – Type safety.&lt;/li&gt;
&lt;li&gt;PostgreSQL – Relational database.&lt;/li&gt;
&lt;li&gt;Supabase – Database and backend services.&lt;/li&gt;
&lt;li&gt;Tailwind CSS – UI styling.&lt;/li&gt;
&lt;li&gt;Jest – Automated testing.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;One of the biggest takeaways from this project was that building business software requires more than implementing features.&lt;/p&gt;

&lt;p&gt;Understanding the workflow, identifying possible failure points, enforcing business rules, and controlling access are equally important.&lt;/p&gt;

&lt;p&gt;I also realized that sometimes building one focused module properly can be more valuable than creating a large application filled with features that don't solve a specific problem well.&lt;/p&gt;

&lt;p&gt;ApparelFlow ERP was a good opportunity to explore these engineering concepts in a practical manufacturing scenario.&lt;/p&gt;

&lt;p&gt;Try It Yourself&lt;/p&gt;

&lt;p&gt;GitHub Repository:&lt;br&gt;
&lt;a href="https://github.com/NimeshDilhara96/apparel-flow-erp" rel="noopener noreferrer"&gt;https://github.com/NimeshDilhara96/apparel-flow-erp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear from other developers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you approach enforcing business rules that must never be bypassed, especially in systems where one incorrect approval can affect an entire operational workflow?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>nextjs</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Still Waiting for My First Opportunity...</title>
      <dc:creator>Nimesh Dilhara Kulasooriya</dc:creator>
      <pubDate>Fri, 06 Nov 2026 15:46:23 +0000</pubDate>
      <link>https://dev.to/nimeshdilhara/still-waiting-for-my-first-opportunity-4ed</link>
      <guid>https://dev.to/nimeshdilhara/still-waiting-for-my-first-opportunity-4ed</guid>
      <description>&lt;p&gt;I completed my Software Engineering degree with the hope of starting my career in the software industry.&lt;/p&gt;

&lt;p&gt;Since then, I've applied for opportunities, attended interviews, completed technical assessments, and put a lot of effort into proving my abilities.&lt;/p&gt;

&lt;p&gt;But the results haven't been what I hoped for.&lt;/p&gt;

&lt;p&gt;I've faced rejections, missed opportunities, and even situations where things didn't go as expected despite putting in genuine effort.&lt;/p&gt;

&lt;p&gt;What hurts the most is that not every rejection comes from a lack of skills or effort. Sometimes, circumstances are beyond your control. Sometimes, you don't even get a fair chance to show what you can do.&lt;/p&gt;

&lt;p&gt;It's frustrating to keep building projects, learning new technologies, and improving yourself while still struggling to get that first opportunity.&lt;/p&gt;

&lt;p&gt;I'm not saying I have nothing left to learn. I know I do. But I also know how much effort I've put into getting here.&lt;/p&gt;

&lt;p&gt;I don't know how long this journey will take, but honestly, I'm tired of waiting for that first chance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I just wish someone would give me an opportunity to prove myself.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>discuss</category>
      <category>beginners</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>What is FNM ?</title>
      <dc:creator>Nimesh Dilhara Kulasooriya</dc:creator>
      <pubDate>Sat, 03 Oct 2026 12:34:19 +0000</pubDate>
      <link>https://dev.to/nimeshdilhara/what-is-fnm--o4e</link>
      <guid>https://dev.to/nimeshdilhara/what-is-fnm--o4e</guid>
      <description>&lt;p&gt;When working on web projects, we all know that Node.js is something we usually need to have installed. Most of the time, we simply go to the Node.js website, download the version we need, and install it.&lt;/p&gt;

&lt;p&gt;But things can get a little annoying when you are working on multiple projects.&lt;/p&gt;

&lt;p&gt;Different projects can require different Node.js versions. For example, one project might need Node 18, while another project might require Node 20 or 22.&lt;/p&gt;

&lt;p&gt;If you update Node.js for a new project, there is a chance that an older project may stop working as expected.&lt;/p&gt;

&lt;p&gt;Downloading and installing Node.js again every time you need a different version is not really practical. Having a way to switch between versions when needed makes things much easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;FNM&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is where FNM (Fast Node Manager) becomes useful.&lt;/p&gt;

&lt;p&gt;FNM allows you to install and manage multiple Node.js versions on the same machine and switch between them when needed.&lt;/p&gt;

&lt;p&gt;On Windows, you can install FNM directly through PowerShell and then install the Node.js versions you need.&lt;/p&gt;

&lt;p&gt;For example, you can use Node 18 for one project and Node 22 for another project. This means you don't have to update your entire Node.js installation every time you work on a different project.&lt;/p&gt;

&lt;p&gt;Another thing I found interesting about FNM is that it is built with Rust, which makes it lightweight and fast. For something that is mainly used to manage Node.js versions, I found that to be a nice advantage.&lt;/p&gt;

&lt;p&gt;Setting up FNM is also not that difficult. You can install it using a few PowerShell commands, and if you are not familiar with the setup, you can also use an AI tool like ChatGPT to get step-by-step guidance.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;So, why did I build another tool?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Since I was already using FNM, I wanted to make the process a little easier for myself.&lt;/p&gt;

&lt;p&gt;So I built FNM Manager, a simple GUI for managing FNM.&lt;/p&gt;

&lt;p&gt;Instead of typing commands in the terminal every time, I wanted to have a small interface where I could:&lt;/p&gt;

&lt;p&gt;View installed Node.js versions&lt;br&gt;
Install Node.js versions&lt;br&gt;
Switch between Node.js versions&lt;br&gt;
Manage the basic FNM workflow from a GUI&lt;/p&gt;

&lt;p&gt;This is not intended to be a big product or a replacement for FNM.&lt;/p&gt;

&lt;p&gt;It is simply a small tool I built to make my own development workflow a little easier.&lt;/p&gt;

&lt;p&gt;Current State&lt;/p&gt;

&lt;p&gt;The project is still very simple, and there are definitely things that can be improved.&lt;/p&gt;

&lt;p&gt;For now, it does the basic things I need, so I decided to put it on GitHub and share it.&lt;/p&gt;

&lt;p&gt;If you use FNM, feel free to check it out. Feedback and ideas for future improvements are always welcome.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;a href="https://github.com/NimeshDilhara96/fnm-manager" rel="noopener noreferrer"&gt;View&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would also be interested to hear what features you would like to see in a simple FNM GUI.&lt;/p&gt;

</description>
      <category>node</category>
      <category>developertools</category>
      <category>fnm</category>
      <category>npm</category>
    </item>
    <item>
      <title>How do you find your first clients as a developer ?</title>
      <dc:creator>Nimesh Dilhara Kulasooriya</dc:creator>
      <pubDate>Fri, 03 Jul 2026 17:00:11 +0000</pubDate>
      <link>https://dev.to/nimeshdilhara/how-do-you-find-your-first-clients-as-a-developer--5fnk</link>
      <guid>https://dev.to/nimeshdilhara/how-do-you-find-your-first-clients-as-a-developer--5fnk</guid>
      <description>&lt;p&gt;How do you find clients?&lt;/p&gt;

&lt;p&gt;I'm building real projects and improving my skills every day. Now I want to learn how developers get their first freelance clients.&lt;/p&gt;

&lt;p&gt;Do you use LinkedIn, your own website, referrals, Fiverr, Upwork, or something else?&lt;/p&gt;

&lt;p&gt;I'd love to hear your experience and any advice for someone just starting.&lt;/p&gt;




&lt;p&gt;💼 Portfolio: &lt;a href="https://nimeshdilhara.vercel.app" rel="noopener noreferrer"&gt;https://nimeshdilhara.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading! 😊&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>freelancing</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Which AI Coding Assistant Should I Invest In? 🤔 (ChatGPT Pro vs. Claude Pro vs. Gemini)</title>
      <dc:creator>Nimesh Dilhara Kulasooriya</dc:creator>
      <pubDate>Tue, 16 Jun 2026 17:29:54 +0000</pubDate>
      <link>https://dev.to/nimeshdilhara/which-ai-coding-assistant-should-i-invest-in-chatgpt-pro-vs-claude-pro-vs-gemini-341g</link>
      <guid>https://dev.to/nimeshdilhara/which-ai-coding-assistant-should-i-invest-in-chatgpt-pro-vs-claude-pro-vs-gemini-341g</guid>
      <description>&lt;p&gt;Hi everyone! I’m currently at a point where I want to subscribe to a premium AI assistant to speed up my development workflow. As a Full-stack Developer, I do a lot of coding in the MERN stack and Python, and I'm really focusing on Web System Security right now.&lt;/p&gt;

&lt;p&gt;I’m trying to decide between ChatGPT Pro, Claude Pro, and Gemini Advanced.&lt;/p&gt;

&lt;p&gt;I’d love to hear from you all:&lt;/p&gt;

&lt;p&gt;Which one do you find most reliable for debugging complex code?&lt;/p&gt;

&lt;p&gt;Which one is better at handling large project codebases (e.g., when I need to refactor or understand a whole system)?&lt;/p&gt;

&lt;p&gt;For someone focused on System Security, which assistant gives the most accurate and safe code suggestions?&lt;/p&gt;

&lt;p&gt;If you have experience using these for professional-level coding, please let me know your thoughts! Is it worth paying for one, or should I stick to the free versions for now?&lt;/p&gt;

&lt;p&gt;Looking forward to your suggestions! 👇&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>help</category>
      <category>coding</category>
    </item>
    <item>
      <title>Hello World! 👋</title>
      <dc:creator>Nimesh Dilhara Kulasooriya</dc:creator>
      <pubDate>Tue, 16 Jun 2026 15:24:16 +0000</pubDate>
      <link>https://dev.to/nimeshdilhara/hello-world-36hb</link>
      <guid>https://dev.to/nimeshdilhara/hello-world-36hb</guid>
      <description>&lt;p&gt;Hi everyone! I’m Nimesh Dilhara, a Software Engineering student.&lt;/p&gt;

&lt;p&gt;I’m new here to the DEV community! I’m planning to use this space to share my learning journey, the projects I’m working on, and the things I’m discovering in tech—especially in Full-stack (MERN), AI, and Cloud.&lt;/p&gt;

&lt;p&gt;I’m really looking forward to connecting with fellow developers and learning from you all.&lt;/p&gt;

&lt;p&gt;Let's build and learn together! Say hi in the comments! 👇&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
