<?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: Bharat</title>
    <description>The latest articles on Forem by Bharat (@nalayak_engineer).</description>
    <link>https://forem.com/nalayak_engineer</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%2F606322%2Ffde0a2c1-5c00-4a60-bbb9-a739120bb552.jpeg</url>
      <title>Forem: Bharat</title>
      <link>https://forem.com/nalayak_engineer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nalayak_engineer"/>
    <language>en</language>
    <item>
      <title>The never ending journey to find perfect home sharing solutions 🌐📱💻...</title>
      <dc:creator>Bharat</dc:creator>
      <pubDate>Wed, 04 Dec 2024 06:47:02 +0000</pubDate>
      <link>https://forem.com/nalayak_engineer/the-never-ending-journey-to-find-perfect-home-sharing-solutions-1g07</link>
      <guid>https://forem.com/nalayak_engineer/the-never-ending-journey-to-find-perfect-home-sharing-solutions-1g07</guid>
      <description>&lt;p&gt;In the ever-evolving world of technology, finding the perfect solution for seamless data sharing across devices can feel like a never-ending journey. As someone deeply invested in creating a harmonious digital ecosystem at home, I want to share my ongoing quest to achieve effortless sharing between my iPhone, Apple TV, and laptops. 🤔🛠️&lt;/p&gt;

&lt;h2&gt;
  
  
  The Quest Begins: Ubuntu Server with SMB 🖥️🐧
&lt;/h2&gt;

&lt;p&gt;My journey started with an old laptop running the latest Ubuntu. I configured it to share files via SMB across my local network, connecting two drives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1TB SSD ⚡: For fast data backups and active storage.&lt;/li&gt;
&lt;li&gt;6TB Mechanical HDD 🛠️: Acting as a cold storage backup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To manage the data efficiently, I wrote a Python watchdog script 🐍📜 that scans the 1 TB SSD weekly. If any files haven’t been accessed in the last 15 days, they’re automatically moved to the 6 TB HDD. This setup worked well initially, and I was optimistic about having found a solid solution. ✅&lt;/p&gt;

&lt;h2&gt;
  
  
  Hitting Roadblocks with Apple Integration 🍎📺
&lt;/h2&gt;

&lt;p&gt;However, integrating an Ubuntu machine into my predominantly Apple ecosystem proved challenging. Accessing shared files on the Apple TV was problematic, and the overall experience lacked the seamlessness I desired. 😩📂 The incompatibilities started to outweigh the benefits, and I realized this wasn’t the end of my journey—it was merely a fork in the road. 🛤️&lt;/p&gt;

&lt;h2&gt;
  
  
  Switching Gears: Embracing a Mac-Based Server 🍏💻
&lt;/h2&gt;

&lt;p&gt;Determined to find a better solution, I decided to repurpose my MacBook M1, which I frequently use for automation scripts, as the new server. 💪 Since my automation was written in Python, migrating it to macOS was straightforward. 🚀&lt;/p&gt;

&lt;p&gt;I chose to format the external drives with ExFAT, avoiding APFS due to a previous experience where I lost an SSD and all its data. 😭 That loss was a tough lesson, reinforcing the importance of choosing the right file system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exploring New Horizons with Docker 🐳⚙️
&lt;/h2&gt;

&lt;p&gt;With the MacBook acting as the server, everything started functioning as expected. 🎉 To expand its capabilities, I installed Docker to host additional services. I’ve set up Plex via Docker and am currently testing it for media streaming. 📺🎶&lt;/p&gt;

&lt;p&gt;I’m also planning to implement an Nginx reverse proxy server 🌐 and a DNS server 🛡️. This will allow me to route all internal traffic using domain names instead of IP addresses, making network navigation more intuitive. 🗺️&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking Ahead: The Journey Continues 🔮🏠
&lt;/h2&gt;

&lt;p&gt;While the current setup is a significant improvement, I know the journey doesn’t end here. I’m considering investing in a Mac Mini to serve as a dedicated home server. 💻 This would provide increased stability and performance, bringing me closer to that elusive perfect sharing solution. 🤞&lt;/p&gt;

&lt;h2&gt;
  
  
  Reflections on the Journey 🤔📜
&lt;/h2&gt;

&lt;p&gt;This quest has taught me that in the tech world, solutions are often temporary and evolving. 🌟 What works today might need tweaking tomorrow. The key is to stay adaptable and open to new approaches. 🔄💡&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion 🏁✨
&lt;/h2&gt;

&lt;p&gt;Finding the perfect data-sharing solution is indeed a never-ending journey. Each challenge leads to a new discovery, and every setback offers a learning opportunity. 🌈 While I haven’t reached the destination yet, I’m enjoying the journey and the incremental improvements along the way. 🚶‍♂️🔍&lt;/p&gt;




&lt;p&gt;Feel free to share your experiences or suggestions in the comments. Let’s navigate this never-ending journey together! 🤝📖&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>learning</category>
      <category>devops</category>
      <category>docker</category>
    </item>
    <item>
      <title>🚀 Automating React Project Setup with Vite, TypeScript, and Panda CSS Using a Shell Script 🐼</title>
      <dc:creator>Bharat</dc:creator>
      <pubDate>Thu, 05 Sep 2024 14:03:19 +0000</pubDate>
      <link>https://forem.com/nalayak_engineer/automating-react-project-setup-with-vite-typescript-and-panda-css-using-a-shell-script-147g</link>
      <guid>https://forem.com/nalayak_engineer/automating-react-project-setup-with-vite-typescript-and-panda-css-using-a-shell-script-147g</guid>
      <description>&lt;p&gt;As developers, we often find ourselves spending too much time repeatedly setting up new projects. While the steps to initialize a project may be simple, automating them can significantly speed up the process, allowing us to focus on what we love—coding! In this post, I’ll share a shell script I wrote to automate the setup of a React project with Vite, TypeScript, SWC, and Panda CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Automate? ⚙️
&lt;/h2&gt;

&lt;p&gt;Manually setting up new projects each time can be tedious, especially when you’re working with multiple technologies like React, TypeScript, and Panda CSS. To streamline this process, I wrote a script called friday.sh, which automates the entire setup for a new React app. 🎉 The script allows you to quickly initialize a new React project, install dependencies like Axios and React Router DOM, and configure Panda CSS—all with a single command.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does the Script Do? 📝
&lt;/h2&gt;

&lt;p&gt;Here’s what friday.sh takes care of:&lt;/p&gt;

&lt;p&gt;• 🖥️ Initializes a React project using Vite with TypeScript and SWC.&lt;br&gt;
• 🐼 Installs Panda CSS, Axios, and React Router DOM.&lt;br&gt;
• ✨ Updates the CSS file with layers for Panda CSS.&lt;br&gt;
• 🔧 Configures package.json and panda.config.ts files.&lt;br&gt;
• 🔄 Provides options to use your preferred package manager (pnpm, npm, or yarn).&lt;/p&gt;
&lt;h2&gt;
  
  
  Features 🌟
&lt;/h2&gt;

&lt;p&gt;• Automatic Setup: 🚀 The script handles the full setup of your React project, from creating the project to installing all necessary dependencies.&lt;br&gt;
• Package Manager Choice: You can choose between pnpm, npm, and yarn. By default, it uses pnpm, but you can specify a different one if needed.&lt;br&gt;
• Panda CSS Integration: 🐼 Panda CSS is installed and integrated into the project. It even updates your index.css file to include Panda’s base CSS layers.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Use 🚀
&lt;/h2&gt;

&lt;p&gt;Run the script with the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./friday.sh &lt;span class="nt"&gt;-d&lt;/span&gt; &amp;lt;directory&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-p&lt;/span&gt; &amp;lt;package-manager&amp;gt;] &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-h&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;-d : 📁 The directory where the React project will be created.&lt;/li&gt;
&lt;li&gt;-p : (Optional) The package manager to use (pnpm, npm, or yarn). Defaults to pnpm.&lt;/li&gt;
&lt;li&gt;-h: (Optional) Prints the help message and exits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example Usage 💡
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;To initialize a React project in a specified directory using the default package manager (pnpm):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./friday.sh &lt;span class="nt"&gt;-d&lt;/span&gt; /path/to/project-directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;To initialize a React project using a specific package manager (e.g., npm):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./friday.sh &lt;span class="nt"&gt;-d&lt;/span&gt; /path/to/project-directory &lt;span class="nt"&gt;-p&lt;/span&gt; npm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;To display the help message:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./friday.sh &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Script Breakdown 🛠️&lt;/p&gt;

&lt;p&gt;Here’s a step-by-step breakdown of what the script does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Directory Check: ✅ Ensures that the target directory is specified and created if it doesn’t exist.&lt;/li&gt;
&lt;li&gt;Package Manager Verification: 🔍 Checks whether the specified package manager is installed on your system.&lt;/li&gt;
&lt;li&gt;Project Initialization: 🖥️ Creates a new React project using Vite with TypeScript and SWC.&lt;/li&gt;
&lt;li&gt;Dependency Installation: 📦 Installs Panda CSS, Axios, and React Router DOM.&lt;/li&gt;
&lt;li&gt;CSS Configuration: 🎨 Updates the index.css file to import Panda CSS layers.&lt;/li&gt;
&lt;li&gt;Package JSON Update: 📝 Adds a script to package.json for Panda CSS code generation.&lt;/li&gt;
&lt;li&gt;Panda CSS Configuration: 🐼 Updates panda.config.ts to include jsxFramework: "react".&lt;/li&gt;
&lt;li&gt;Final Setup: 🏁 Prints instructions to run the project.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Link to Github 🔗
&lt;/h2&gt;

&lt;p&gt;Github : &lt;a href="https://github.com/nalayakengineer/friday" rel="noopener noreferrer"&gt;friday.sh&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion 🎉
&lt;/h2&gt;

&lt;p&gt;This script has saved me a significant amount of time when setting up new React projects, especially when integrating multiple technologies like Panda CSS. I encourage you to try it out and customise it for your own needs!&lt;/p&gt;

&lt;p&gt;Feel free to share the feedback or leave a start on &lt;a href="https://github.com/nalayakengineer/friday" rel="noopener noreferrer"&gt;Github&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>bash</category>
      <category>pandacss</category>
    </item>
    <item>
      <title>The quest for a robust and scalable storage solution for home use.</title>
      <dc:creator>Bharat</dc:creator>
      <pubDate>Thu, 05 Sep 2024 09:55:06 +0000</pubDate>
      <link>https://forem.com/nalayak_engineer/the-quest-for-a-robust-and-scalable-storage-solution-for-home-use-2j35</link>
      <guid>https://forem.com/nalayak_engineer/the-quest-for-a-robust-and-scalable-storage-solution-for-home-use-2j35</guid>
      <description>&lt;p&gt;In today’s digital age, data storage has become an essential part of daily life—whether it’s for backing up family photos, managing large media collections, or handling more advanced home lab setups. Like many of you, I found myself searching for a reliable, scalable, and high-speed storage solution that would allow me to safely store data without breaking the bank. After going through numerous consumer-grade NAS options, I decided to take a DIY route, leveraging my IT background to create a custom storage solution at home.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;I started with what I had lying around—a trusty HP laptop running the latest Ubuntu 24. This serves as the base of my experiment. The laptop is connected to a single 6TB hard drive, which I’ve shared over Samba for ease of access within my local network. So far, the performance has been solid, but I wanted to go bigger—much bigger.&lt;/p&gt;

&lt;p&gt;Luckily, I have a few 6TB server-grade hard drives on hand. My goal is to use four of them in a direct-attached storage (DAS) setup connected to the laptop via a Type-C Thunderbolt port. The idea here is to take advantage of Thunderbolt’s high-speed data transmission capabilities, which will allow this humble setup to scale significantly in terms of storage capacity and speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why DIY?
&lt;/h2&gt;

&lt;p&gt;Many would argue that off-the-shelf NAS solutions are convenient and come with user-friendly interfaces, but there are some key benefits to building your own storage system:&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Customisability&lt;/strong&gt;: You have full control over the software stack, file systems, and network configurations.&lt;br&gt;
• &lt;strong&gt;Scalability&lt;/strong&gt;: Expanding storage is as simple as adding more drives.&lt;br&gt;
• &lt;strong&gt;Cost-Efficiency&lt;/strong&gt;: By using existing hardware and repurposing server-grade drives, you can achieve high-end performance without the premium price tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hardware and Storage Design
&lt;/h2&gt;

&lt;p&gt;• 💻 Laptop: HP running Ubuntu 24 with Core i7, 16GB of RAM and 520GB SSD.&lt;br&gt;
• 🫙 Drives: 4x 6TB server-grade HDDs (total 24TB).&lt;br&gt;
• 🔌 Connection: Type-C Thunderbolt for high-speed data transfer.&lt;br&gt;
• Storage Software: I’m currently exploring different software solutions to manage the drives and ensure redundancy. Some of the top contenders are ZFS for its scalability and Btrfs for snapshot capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Expansion: piKVM for Remote Management
&lt;/h2&gt;

&lt;p&gt;As I continue to build out this storage solution, remote management will be a key factor for convenience. In the future, I plan to implement a piKVM to manage the laptop remotely. For those unfamiliar, piKVM is a fantastic open-source hardware project that allows you to control machines over the network as if you were sitting right in front of them. Until I get that up and running, I’m managing the system through either a direct SSH session or, when needed, a VNC connection for more visual tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Thoughts?
&lt;/h2&gt;

&lt;p&gt;This is just the beginning of my journey toward a scalable home storage solution. I’m excited to see where it leads, but I would love to hear from you! Have you attempted something similar? Any tips, suggestions, or recommendations are welcome.&lt;/p&gt;

&lt;p&gt;Please leave your feedback in the comments— I look forward to your thoughts and insights!&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>discuss</category>
      <category>diy</category>
    </item>
  </channel>
</rss>
