<?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: Digvijay25182316</title>
    <description>The latest articles on DEV Community by Digvijay25182316 (@digvijay25182316).</description>
    <link>https://dev.to/digvijay25182316</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%2F675109%2F7cef1346-852a-49a0-bb63-d71243ac8232.png</url>
      <title>DEV Community: Digvijay25182316</title>
      <link>https://dev.to/digvijay25182316</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/digvijay25182316"/>
    <language>en</language>
    <item>
      <title>From Spring Boot to NestJS: The Chameleon Phase of My Backend Life</title>
      <dc:creator>Digvijay25182316</dc:creator>
      <pubDate>Sat, 22 Mar 2025 18:22:04 +0000</pubDate>
      <link>https://dev.to/digvijay25182316/from-spring-boot-to-nestjs-the-chameleon-phase-of-my-backend-life-15d6</link>
      <guid>https://dev.to/digvijay25182316/from-spring-boot-to-nestjs-the-chameleon-phase-of-my-backend-life-15d6</guid>
      <description>&lt;p&gt;Let’s be real — running a Spring Boot backend at scale isn’t cheap. And I wasn’t ready to keep burning resources just for the sake of familiarity. I needed efficiency without the cost, performance without complexity, and a codebase that doesn’t feel like a jungle. That’s where NestJS stepped in — and surprisingly, it held up really well.&lt;/p&gt;

&lt;p&gt;I’ve been working on an LMS (Learning Management System) platform for over a year now — my very first project since I started learning how to build websites and full-stack infrastructure. The frontend changed more times than a chameleon changes its colors 🦎 — seriously. In the early days, I was mostly handling frontend, but eventually, things shifted, and I had to take care of everything — frontend, backend, infra — solo.&lt;/p&gt;

&lt;p&gt;I started from not even knowing Java Spring Boot to somehow pulling off a working backend. But soon enough, reality hit: Spring Boot wasn’t cheap — it was eating up 27–29% CPU on an EC2 t2.micro instance, even when there was zero traffic. I knew Node.js better and trusted its efficiency, so I began migrating small services to Node — guess what? CPU dropped to just 6–7%, and I could run 4–5 apps simultaneously with 40–50 concurrent users each, using RDS as the database.&lt;/p&gt;

&lt;p&gt;But as requirements grew, editing Java Repositories and Entities constantly, verifying data consistency, and testing it all over again became a nightmare. It honestly felt like I was stuck in a backend hellfire 🔥. Especially when I realized that making schema changes in production without a proper migration system could cause unrecoverable data loss — that’s when I knew something had to change.&lt;/p&gt;

&lt;p&gt;Another big shift came when the organization behind this LMS dropped a massive requirement — a completely new app with a scanner-based attendance system and advanced access control mechanisms. That’s when things scaled from “just migration” to “full-blown infra redesign.”&lt;/p&gt;

&lt;p&gt;It was clear — I had to rethink the entire backend architecture. That’s when I started diving deep into open-source codebases like cal.com and realized what clean architecture actually looks like. Around the same time, a golden suggestion from Mr. Saurabh Khatri changed my whole vision:&lt;/p&gt;

&lt;p&gt;“Drive the entire software through configurations.”&lt;/p&gt;

&lt;p&gt;That hit different. I started building everything with developer experience in mind — a system so flexible that even a new dev could add routes, pages, and access control just by tweaking a config file.&lt;/p&gt;

&lt;p&gt;But this wasn’t a regular RBAC system — this was a beast with 13–15 unique roles, each with different capabilities. Some users even had multiple roles across modules. Implementing this kind of dynamic access control wasn't just tough — it was a structural challenge.&lt;/p&gt;

&lt;p&gt;That’s when we realized — merging both LMS apps was inevitable. But there was a catch:&lt;/p&gt;

&lt;p&gt;The older Java backend used sequential BIGINT IDs&lt;/p&gt;

&lt;p&gt;The newer NestJS app used UUIDs&lt;/p&gt;

&lt;p&gt;And both systems had existing relational data we couldn’t afford to lose.&lt;/p&gt;

&lt;p&gt;So we spun up an experimental DB to test relational integrity. Slowly, we started mapping tables one by one, dropped constraints strategically, and adopted a hybrid alphanumeric ID strategy for syncing old and new entities. We also collapsed multiple user tables into a single unified user schema, managing roles more cleanly than ever before.&lt;/p&gt;

&lt;p&gt;This phase taught me the most important lesson:&lt;/p&gt;

&lt;p&gt;"Database design and clarity in relations should be locked in during the initial phase. Period."&lt;/p&gt;

&lt;p&gt;Of course, TypeORM added its own flavors of chaos — especially with its strict syncing behavior and cryptic error messages. But to counter that, we built a custom logger system to catch and track errors across prod/test environments — which turned out to be a lifesaver.&lt;/p&gt;

&lt;p&gt;And finally, the typeorm-model-generator helped scaffold out new entity classes based on the legacy DB — giving us a solid ground to work from.&lt;/p&gt;

&lt;p&gt;This entire journey wasn’t just about migrating from Java to Node — it was a journey of growth, ownership, and evolution. From writing my first API to orchestrating a modular, configuration-driven architecture that scales, I’ve realized something important:&lt;/p&gt;

&lt;p&gt;Great systems aren’t built overnight — they’re shaped by the mistakes, rewrites, late-night debugging, and aha moments along the way.&lt;/p&gt;

&lt;p&gt;I’m no longer just writing code. I’m designing frameworks, shaping developer experience, and building platforms that others can build upon. And this LMS project? It’s no longer just a project — it’s a foundation. A blueprint. For everything I’ll build next.&lt;/p&gt;

</description>
      <category>nestjs</category>
      <category>node</category>
      <category>typescript</category>
      <category>springboot</category>
    </item>
  </channel>
</rss>
