<?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 Sarasi Rajarathna on Medium]]></title>
        <description><![CDATA[Stories by Sarasi Rajarathna on Medium]]></description>
        <link>https://medium.com/@rajarathnasarasi?source=rss-d589591e89bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hhVDA4uK5voHDfdE0ebf_Q.jpeg</url>
            <title>Stories by Sarasi Rajarathna on Medium</title>
            <link>https://medium.com/@rajarathnasarasi?source=rss-d589591e89bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:31:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajarathnasarasi/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[Framework vs Library: The Difference That Finally Made Sense to Me]]></title>
            <link>https://medium.com/@rajarathnasarasi/framework-vs-library-the-difference-that-finally-made-sense-to-me-21f3c9836a46?source=rss-d589591e89bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/21f3c9836a46</guid>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Sarasi Rajarathna]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 11:01:00 GMT</pubDate>
            <atom:updated>2026-06-10T11:01:00.763Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first started learning software development, I kept hearing two terms everywhere:</p><ul><li>Library</li><li>Framework</li></ul><p>At first, they sounded almost identical.</p><p>Both help developers write less code.</p><p>Both provide reusable functionality.</p><p>Both can be installed as dependencies.</p><p>So naturally, I wondered:</p><blockquote><strong>“If they both provide ready-made code, what is the actual difference?”</strong></blockquote><p>The answer became clear only after I understood one simple idea:</p><blockquote><strong>Who is in control?</strong></blockquote><p>And once I understood that, the difference between libraries and frameworks finally made sense.</p><h3>Why We Need Libraries and Frameworks</h3><p>Imagine you are building a vehicle.</p><p>You could start from scratch by collecting:</p><ul><li>Iron</li><li>Rubber</li><li>Plastic</li><li>Glass</li><li>Wires</li></ul><p>Then you could manufacture:</p><ul><li>Tires</li><li>Doors</li><li>Seats</li><li>Windows</li><li>Engine parts</li></ul><p>Finally, you would assemble everything into a complete vehicle.</p><p>Technically, this is possible.</p><p>But it would require a huge amount of time and effort.</p><p>Instead, vehicle manufacturers use ready-made components and focus on building the final product.</p><p>Software development works in a similar way.</p><p>Developers rarely build everything from scratch.</p><p>Instead, they use existing tools, packages, libraries, and frameworks to speed up development.</p><h3>What Is a Library?</h3><p>A library is a collection of reusable code that you can use whenever you need it.</p><p>The important thing is:</p><blockquote><strong>Your code is in control.</strong></blockquote><p>You decide:</p><ul><li>When to use the library</li><li>Which function to call</li><li>How the application behaves</li></ul><p>The library simply provides functionality.</p><h3>Real-World Analogy</h3><p>Think of a library as a toolbox.</p><p>Inside the toolbox, you have:</p><ul><li>Hammer</li><li>Screwdriver</li><li>Wrench</li></ul><p>Whenever you need a tool, you take it out and use it.</p><p>The toolbox does not tell you what to build.</p><p>You remain in control.</p><h3>Example</h3><p>Suppose you need to make HTTP requests.</p><p>You can use a library like Axios.</p><pre>axios.get(&#39;/users&#39;)</pre><p>Your code decides when to call Axios.</p><p>Axios simply performs the task and returns the result.</p><h3>What Is a Framework?</h3><p>A framework works differently.</p><p>Instead of calling the framework whenever you want, the framework provides the overall structure of the application.</p><p>You place your code inside that structure.</p><p>Then the framework decides when your code should run.</p><p>This is often summarized by a famous statement:</p><blockquote><strong>“Don’t call us. We’ll call you.”</strong></blockquote><h3>Real-World Analogy</h3><p>Imagine buying a fully designed house.</p><p>The foundation, rooms, and structure already exist.</p><p>You don’t build everything yourself.</p><p>Instead, you customize the house according to your needs.</p><p>The structure controls where things belong.</p><p>Frameworks work in a similar way.</p><p>They provide the structure, and developers add their own code within that structure.</p><h3>The Key Difference</h3><p>This is the easiest way to remember it.</p><p><strong>Library</strong></p><pre>Your Code<br>    ↓<br> Library</pre><p>Your code calls the library.</p><p>You are in control.</p><p><strong>Framework</strong></p><pre>Framework<br>    ↓<br> Your Code</pre><p>The framework calls your code.</p><p>The framework is in control.</p><p>This concept is known as <strong>Inversion of Control (IoC)</strong>.</p><h3>Examples</h3><h3>Popular Libraries</h3><ul><li>React</li><li>Mongoose</li><li>Axios</li></ul><p>You import them and use them whenever needed.</p><h3>Popular Frameworks</h3><ul><li>Express.js</li><li>Angular</li><li>Laravel</li></ul><p>These frameworks provide a predefined application structure and control much of the application’s lifecycle.</p><h3>Why Beginners Get Confused</h3><p>Many beginners think:</p><blockquote><strong>“A framework is just a bigger library.”</strong></blockquote><p>I used to think the same thing.</p><p>While frameworks often contain many libraries internally, size is not the main difference.</p><p>The real difference is control.</p><p>Libraries work for your code.</p><p>Frameworks provide a structure that your code works inside.</p><p>Once I understood that idea, everything became much clearer.</p><h3>My Personal Insight</h3><p>Before learning this concept, I viewed libraries and frameworks as almost identical tools.</p><p>Later, I realized that they solve different problems.</p><p>Libraries help me perform specific tasks whenever I need them.</p><p>Frameworks help me organize and build entire applications within a predefined structure.</p><p>That small difference completely changed how I understood modern software development.</p><h3>Final Thoughts</h3><p>Both libraries and frameworks exist to make development easier.</p><p>Without them, developers would spend enormous amounts of time rebuilding functionality that already exists.</p><p>The easiest way to remember the difference is:</p><ul><li>With a library, your code calls the library.</li><li>With a framework, the framework calls your code.</li></ul><p>Looking back, understanding this concept helped me better understand how real-world software projects are built.</p><p>And surprisingly, the difference wasn’t about the amount of code.</p><p>It was simply about who is in control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fZe2P8_ePIL3k5OiiSaBmg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21f3c9836a46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Developers Don’t Build Everything From Scratch: Understanding Dependencies]]></title>
            <link>https://medium.com/@rajarathnasarasi/why-developers-dont-build-everything-from-scratch-understanding-dependencies-f29a00afe00f?source=rss-d589591e89bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/f29a00afe00f</guid>
            <category><![CDATA[dependencies]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[beginner-developers]]></category>
            <dc:creator><![CDATA[Sarasi Rajarathna]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 11:01:01 GMT</pubDate>
            <atom:updated>2026-06-08T11:01:01.698Z</atom:updated>
            <content:encoded><![CDATA[<h3>When I first started learning software development, I had a simple assumption:</h3><blockquote><strong>“If I’m building an application, shouldn’t I write all the code myself?”</strong></blockquote><p>The more I learned, the more I realized that modern software development doesn’t work that way.</p><p>In fact, if developers tried to build everything from scratch, creating even a simple application would become incredibly difficult.</p><p>That’s when I discovered the concept of <strong>dependencies</strong>.</p><p>And suddenly, many things started making sense.</p><h3>A Real-World Example</h3><p>Imagine you want to manufacture a car.</p><p>Technically, you could start from raw materials: Iron, Rubber, Plastic, Glass and Wires.</p><p>Then you could create: Tires, Doors, Seats, Engine components, Dashboard and Windows.</p><p>And finally assemble everything into a complete vehicle.</p><p>But this would take an enormous amount of time, effort, and expertise.</p><p>Instead, manufacturers use ready-made components and focus on building the final product efficiently.</p><p>Software development works in a very similar way.</p><h3>The Problem With Building Everything Yourself</h3><p>Suppose you’re creating a backend application with Node.js.</p><p>Your application may need to:</p><ul><li>Handle HTTP requests</li><li>Connect to a database</li><li>Validate user input</li><li>Manage authentication</li><li>Send emails</li><li>Process files</li></ul><p>Could you write all of these features from scratch?</p><p>Technically, yes.</p><p>But it would require thousands of lines of code, extensive testing, and a lot of development time.</p><p>Most developers would rather focus on solving the actual business problem than rebuilding tools that already exist.</p><p>That’s where dependencies come in.</p><h3>What Are Dependencies?</h3><p>A dependency is a reusable package, library, or tool that your application relies on to perform specific tasks.</p><p>Instead of writing everything yourself, you can use solutions that have already been built, tested, and maintained by other developers.</p><p>For example:</p><ul><li>A library for handling HTTP requests</li><li>A package for connecting to databases</li><li>A tool for password encryption</li><li>A framework for building APIs</li></ul><p>These become dependencies because your application depends on them to work correctly.</p><h3>A Simple Example</h3><p>Imagine you’re building an API with Node.js.</p><p>Without dependencies, you would need to handle many low-level tasks manually.</p><p>Instead, many developers use frameworks that provide these features out of the box.</p><p>For example:</p><pre>npm install express</pre><p>This installs a dependency that helps developers create web servers and APIs more efficiently.</p><p>Instead of writing hundreds of lines of low-level networking code, you can focus on building your application’s features.</p><h3>Why Dependencies Are Important</h3><p><strong>1. Faster Development</strong></p><p>Dependencies save developers from reinventing the wheel.</p><p>Instead of spending weeks building common functionality, you can start using proven solutions immediately.</p><p><strong>2. Better Reliability</strong></p><p>Popular dependencies are often tested by thousands of developers worldwide.</p><p>This usually makes them more reliable than custom-built solutions.</p><p><strong>3. Improved Productivity</strong></p><p>Developers can focus on solving business problems rather than repeatedly building the same tools.</p><p><strong>4. Community Support</strong></p><p>Many popular packages have documentation, tutorials, and active communities that help developers learn and troubleshoot issues.</p><h3>The Hidden Cost of Dependencies</h3><p>While dependencies are extremely useful, they should be used carefully.</p><p>Adding too many dependencies can create problems such as:</p><ul><li>Larger project sizes</li><li>Security vulnerabilities</li><li>Version conflicts</li><li>Maintenance challenges</li></ul><p>That’s why experienced developers try to choose dependencies thoughtfully instead of installing every package they find.</p><h3>Where Are Dependencies Stored?</h3><p>In Node.js projects, dependencies are usually listed inside the package.json file.</p><p>For example:</p><pre>{<br>  &quot;dependencies&quot;: {<br>    &quot;express&quot;: &quot;^5.0.0&quot;<br>  }<br>}</pre><p>When someone downloads your project, they can install all required dependencies using:</p><pre>npm install</pre><p>This ensures everyone works with the same packages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FJUN2nsidU0CZ5OduNUgeg.png" /></figure><h3>My Personal Insight</h3><p>Before learning about dependencies, I thought software development was mostly about writing code.</p><p>Later, I realized that a large part of development is knowing how to use existing tools effectively.</p><p>Good developers don’t build everything themselves.</p><p>Instead, they understand when to create something from scratch and when to leverage solutions that already exist.</p><p>That realization changed the way I think about software development.</p><h3>Final Thoughts</h3><p>Modern software is built on top of countless libraries, frameworks, and tools created by developers around the world.</p><p>Dependencies allow us to build applications faster, more reliably, and with less effort.</p><p>Looking back, learning about dependencies helped me understand an important lesson:</p><p>Software development isn’t about writing every line of code yourself.</p><p>It’s about combining the right tools to create something valuable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f29a00afe00f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Restarting Your Node.js Server Manually: Learn Nodemon]]></title>
            <link>https://medium.com/@rajarathnasarasi/stop-restarting-your-node-js-server-manually-learn-nodemon-41f568f4d202?source=rss-d589591e89bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/41f568f4d202</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[beginner-developers]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Sarasi Rajarathna]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 02:01:03 GMT</pubDate>
            <atom:updated>2026-06-06T02:01:03.485Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nx8itJ6nfReF5hvAUovQCw.png" /></figure><p>When I first started building backend applications with Node.js, I noticed something that quickly became frustrating.</p><p>Every time I made a change to my code, I had to:</p><ol><li><strong><em>Save the file</em></strong></li><li><strong><em>Stop the running server</em></strong></li><li><strong><em>Start the server again</em></strong></li><li><strong><em>Test the changes</em></strong></li></ol><p>At first, it didn’t seem like a big deal.</p><p>But after repeating this process dozens of times while developing a project, it became clear that I was wasting a lot of time on something that should have been automatic.</p><p>That’s when I discovered <strong>Nodemon</strong>.</p><p>And honestly, it made Node.js development much smoother.</p><h3>The Problem Beginners Often Face</h3><p>Imagine you’re building a simple Node.js application.</p><p>You start your server:</p><pre>node app.js</pre><p>The server starts successfully.</p><p>Then you make a small change in your code.</p><p>Maybe you update a route, fix a typo, or modify some logic.</p><p>Even after saving the file, the running application doesn’t know about those changes.</p><p>To see the updated version, you need to stop the server and run it again.</p><p>When you’re making frequent changes, this process becomes repetitive and interrupts your workflow.</p><h3>What is Nodemon?</h3><p>Nodemon is a development tool for Node.js applications.</p><p>It automatically monitors your project files and restarts the application whenever it detects changes.</p><p>Instead of manually restarting your server every time you update your code, Nodemon does it for you.</p><p>Think of it as an automatic assistant that watches your files and refreshes your Node.js application whenever needed.</p><h3>Why Nodemon is Useful</h3><p><strong>1. Faster Development</strong></p><p>Without Nodemon:</p><pre>node app.js</pre><p>Every code change requires a manual restart.</p><p>With Nodemon:</p><pre>nodemon app.js</pre><p>The server automatically restarts whenever changes are saved.</p><p>This makes development much faster.</p><p><strong>2. Better Developer Experience</strong></p><p>As a beginner, I wanted to focus on writing code, not repeatedly restarting servers.</p><p>Nodemon removes that extra step and allows developers to stay focused on development.</p><p><strong>3. Immediate Feedback</strong></p><p>When building APIs or backend applications, testing changes quickly is important.</p><p>Nodemon helps by automatically applying updates after each save.</p><p>This creates a smoother development workflow.</p><h3>Installing Nodemon</h3><p>You can install Nodemon globally:</p><pre>npm install -g nodemon</pre><p>Or install it as a development dependency:</p><pre>npm install nodemon</pre><p>Many developers prefer installing it as a development dependency because it becomes part of the project configuration.</p><h3>Adding Nodemon to package.json</h3><p>Instead of running commands manually every time, you can create a script:</p><pre>&quot;scripts&quot;: {<br>  &quot;dev&quot;: &quot;nodemon app.js&quot;<br>}</pre><p>Then simply run:</p><pre>npm run dev</pre><p>This is a common setup in many Node.js projects.</p><h3>Development vs Production</h3><p>One thing I learned is that Nodemon is mainly a development tool.</p><p>It is designed to help developers during the coding process.</p><p>In production environments, applications are usually managed by tools such as process managers and deployment platforms instead of Nodemon.</p><p>That’s why you’ll often see Nodemon listed as a development dependency.</p><h3>My Personal Insight</h3><p>Before learning Nodemon, I thought manually restarting a server after every code change was just part of development.</p><p>Later, I realized that developers use tools to automate repetitive tasks and improve productivity.</p><p>Nodemon may seem like a small tool, but it removes a lot of unnecessary interruptions from the development process.</p><p>For beginners, it is one of those tools that immediately makes development feel more comfortable.</p><h3>Final Thoughts</h3><p>When learning Node.js, most beginners focus on frameworks, databases, and APIs.</p><p>But developer tools are equally important.</p><p>Nodemon is one of those simple tools that can significantly improve your workflow by automatically restarting your application whenever changes are made.</p><p>Looking back, Nodemon didn’t teach me a new programming concept.</p><p>Instead, it taught me something just as important:</p><p>Good developers don’t only write code. They also use the right tools to work more efficiently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41f568f4d202" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Every Node.js Beginner Should Learn NVM]]></title>
            <link>https://medium.com/@rajarathnasarasi/why-every-node-js-beginner-should-learn-nvm-b5b93784f3aa?source=rss-d589591e89bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5b93784f3aa</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[beginner-developers]]></category>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Sarasi Rajarathna]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 18:22:58 GMT</pubDate>
            <atom:updated>2026-06-04T18:22:58.727Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-y0g0NoBEn3eOHVNs4hf1A.png" /></figure><p>When I first started learning Node.js, I thought installing Node was a one-time task.</p><p>Download Node.js, install it, and start building projects.</p><p>Simple, right?</p><p>That’s what I believed until I started working on different projects and noticed something strange.</p><p>One project worked perfectly.</p><p>Another project showed warnings and errors.</p><p>Sometimes packages wouldn’t install correctly. Sometimes commands behaved differently on different machines.</p><p>As a beginner, I kept wondering:</p><blockquote><strong>“If Node.js is already installed, why are there still version-related problems?”</strong></blockquote><p>That was when I discovered NVM.</p><p>And suddenly, many things started making sense.</p><h3>The Problem I Didn’t Understand</h3><p>At first, I assumed every Node.js project used the same version of Node.</p><p>But in reality, different projects often require different Node.js versions.</p><p>For example:</p><ul><li><em>Project A may work best with Node.js 18</em></li><li><em>Project B may require Node.js 20</em></li><li><em>An older project might still use Node.js 16</em></li></ul><p>This created a question I couldn’t answer:</p><blockquote><strong>“How do developers manage multiple Node.js versions on the same computer?”</strong></blockquote><p>Reinstalling Node.js every time clearly wasn’t practical.</p><p>There had to be a better way.</p><h3>What is NVM?</h3><p>NVM stands for <strong>Node Version Manager</strong>.</p><p>As the name suggests, it helps developers install, manage, and switch between multiple Node.js versions.</p><p>Instead of being limited to a single Node.js installation, NVM allows you to keep several versions on your computer and switch between them whenever needed.</p><p>Think of it like a remote control for Node.js versions.</p><h3>Why NVM Matters</h3><p>Once I understood NVM, I realized it solves several common problems.</p><ol><li><strong>Working on Multiple Projects</strong></li></ol><p>Different projects often have different requirements.</p><p>With NVM, you can switch to the correct version for each project without reinstalling anything.</p><p><strong>2. Better Team Collaboration</strong></p><p>Imagine joining a project where the team uses Node.js 18, but your computer has Node.js 20 installed.</p><p>Version differences can cause unexpected issues.</p><p>NVM helps everyone use the same version and reduces compatibility problems.</p><p><strong>3. Testing Across Versions</strong></p><p>Developers sometimes need to test applications on multiple Node.js versions.</p><p>NVM makes this process much easier.</p><h3>A Simple Example</h3><p>Installing a Node.js version:</p><pre>nvm install 18</pre><p>Using that version:</p><pre>nvm use 18</pre><p>Checking installed versions:</p><pre>nvm ls</pre><p>Uninstalled the existing node version:</p><pre>nvm uninstall 18</pre><p>These few commands can save a lot of troubleshooting time.</p><h3>The Real Lesson I Learned</h3><p>Before learning NVM, I thought Node.js was something you installed once and never thought about again.</p><p>Later, I realized professional development environments are more complex than that.</p><p>Projects evolve.</p><p>Teams use different tools.</p><p>Requirements change.</p><p>Managing versions becomes an important part of development.</p><p>NVM doesn’t just solve a technical problem. It helps developers work more efficiently and avoid unnecessary frustration.</p><h3>My Personal Insight</h3><p>Learning NVM changed the way I thought about software development.</p><p>It taught me that development isn’t only about writing code.</p><p>It’s also about understanding the tools and environments that support that code.</p><p>As a beginner, I spent a lot of time wondering why certain projects behaved differently on different machines.</p><p>Now I know that version management is often part of the answer.</p><h3>Final Thoughts</h3><p>If you’re learning Node.js and haven’t explored NVM yet, I highly recommend taking some time to understand it.</p><p>It may seem like a small tool at first, but it solves a real-world problem that many developers face.</p><p>Looking back, learning NVM wasn’t just about switching Node.js versions.</p><p>It was about understanding how real-world development environments work.</p><p>And that’s why I believe every Node.js beginner should learn NVM.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5b93784f3aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From “Too Many Repositories” to Monorepo Thinking: What I Learned as a Beginner Developer]]></title>
            <link>https://medium.com/@rajarathnasarasi/from-too-many-repositories-to-monorepo-thinking-what-i-learned-as-a-beginner-developer-066f8dcd9df2?source=rss-d589591e89bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/066f8dcd9df2</guid>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[polyrepo]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[monorepo]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Sarasi Rajarathna]]></dc:creator>
            <pubDate>Sat, 23 May 2026 07:29:23 GMT</pubDate>
            <atom:updated>2026-05-23T07:29:23.065Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first started building software projects, one question confused me a lot:</p><p><strong><em>“Should frontend, backend, and database be in separate folders?<br> Or separate repositories?<br> If they are separate, how do they even run together?”</em></strong></p><p>At the beginning, project structure felt more complicated than coding itself.</p><p>I used to see developers creating:</p><ul><li>One repository for the frontend</li><li>Another for the backend</li><li>Separate database configuration projects</li><li>Different deployment setups</li></ul><p>As a beginner, it felt overwhelming.</p><p>Later, while working on projects and exploring modern development practices, I discovered the concept of a <strong>Monorepo</strong>.</p><p>And suddenly many things started making sense.</p><h3>The Confusion Beginners Usually Face</h3><p>When building full-stack applications, we mainly deal with:</p><ul><li>Frontend (React, Next.js, Vue, etc.)</li><li>Backend (Node.js, Express, Spring Boot, etc.)</li><li>Database configurations and services</li><li>Shared components or utilities</li></ul><p>At first, many beginners think:</p><p><strong><em>“Do I need different GitHub repositories for all these parts?”</em></strong></p><p>The answer is: <strong>Not always.</strong></p><p>There are actually two common approaches:</p><ol><li>Multi-Repository (Polyrepo)</li><li>Monorepo</li></ol><h3>What is a Polyrepo?</h3><p>A <strong>Polyrepo</strong> means every service or application has its own separate repository.</p><p><em>Example:</em></p><pre>frontend-app/<br>backend-api/<br>database-service/</pre><blockquote><em>Each repository is managed independently.</em></blockquote><h4><strong>Advantages of Polyrepo</strong></h4><ol><li><strong>Clear Separation:</strong> Each team or developer can focus on one service.</li><li><strong>Independent Deployment:</strong> Frontend and Backend can be deployed separately.</li></ol><h4><strong>Problems I Faced with Polyrepo</strong></h4><p>As a learner, this structure became difficult for me because:</p><ul><li>Managing multiple repositories was confusing</li><li>Cloning many repos took time</li><li>Environment setup became harder</li><li>Version mismatches happened frequently</li><li>Sharing common code was difficult</li></ul><p>Sometimes I spent more time configuring projects than actually building features.</p><h3>After struggling with multiple repositories for a while, I eventually discovered the concept of a Monorepo.</h3><p>A <strong>Monorepo</strong> means everything lives inside one repository.</p><p><em>Example:</em></p><pre>my-project/<br> ├── frontend/<br> ├── backend/<br> ├── database/<br> ├── shared/<br> └── docs/</pre><p>Everything is organized in one place. This approach completely changed how I understood project architecture.</p><h4>Why Monorepo Felt Easier for Me</h4><ol><li><strong>Everything is in One Place:</strong></li></ol><p>I no longer had to jump between repositories. Frontend, backend, and shared code were connected naturally.</p><p>2.<strong> Easier Project Setup:</strong></p><p>Instead of:</p><pre>git clone frontend<br>git clone backend<br>git clone database</pre><p>I only needed:</p><pre>git clone my-project</pre><p>That felt much cleaner.</p><p>3.<strong> Shared Code Became Simple:</strong></p><p>I could create reusable:</p><ul><li>UI components</li><li>utility functions</li><li>types/interfaces</li><li>validation logic</li></ul><p>and use them across frontend and backend easily.</p><h3>How Polyrepo and Monorepo Actually Work?</h3><p>At first, I struggled to understand how separate repositories worked together.</p><p>Later, I realized the answer was actually simple.</p><p>In <strong>Polyrepo</strong>, after cloning both repositories separately, developers simply run each project in its own terminal.</p><pre>frontend-app → npm run dev<br>backend-api  → npm run dev</pre><p>In <strong>Monorepo</strong>, each folder still runs independently, and they are just stored together.</p><pre>frontend → npm run dev<br>backend  → npm run dev</pre><p>They are separate applications inside the same repository.</p><p>The repository structure changes. Not the core execution logic.</p><p>That realization helped me a lot.</p><h3>My Personal Insight</h3><p>As someone still learning and building projects, monorepo architecture made development feel:</p><ul><li>simpler</li><li>more understandable</li><li>easier to manage</li><li>less intimidating</li></ul><p>It reduced the mental load of handling multiple repositories.</p><p>Later, as projects grow bigger, polyrepo structures may become useful.</p><p>But understanding <strong>why both approaches exist</strong> is what truly matters.</p><blockquote>Looking back, I realized the hardest part wasn’t learning frameworks — it was understanding how real projects are structured.</blockquote><blockquote>Once I understood the difference between polyrepos and monorepos, full-stack development started feeling much more approachable.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gmqvuHRLIP0hHZxTCr2_UQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=066f8dcd9df2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>