<?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"><channel><title><![CDATA[Utsav Bhattarai]]></title><description><![CDATA[It's me , The little bit pro programmer🔥]]></description><link>https://blog.utsavbhattarai.info.np</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 04:55:13 GMT</lastBuildDate><atom:link href="https://blog.utsavbhattarai.info.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[From Kathmandu to Bengaluru: My Experience at GNOME Asia Summit 2024]]></title><description><![CDATA[Introduction
This year, I had the incredible opportunity to attend the GNOME Asia Summit 2024 in Bengaluru as a contributor. Looking back, it feels like a full-circle moment. Last year, I was a volunteer at GNOME Asia Summit 2023, which was held in N...]]></description><link>https://blog.utsavbhattarai.info.np/gnome-asia-summit-2024</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/gnome-asia-summit-2024</guid><category><![CDATA[Open Source]]></category><category><![CDATA[Gnome]]></category><category><![CDATA[conference]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sun, 15 Dec 2024 10:52:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1734258515483/c94ec633-4523-4cb9-ab2d-4e187a1e80b3.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">Introduction</h1>
<p>This year, I had the incredible opportunity to attend the GNOME Asia Summit 2024 in Bengaluru as a contributor. Looking back, it feels like a full-circle moment. Last year, I was a volunteer at GNOME Asia Summit 2023, which was held in Nepal. I helped with content writing, social media management, and various other tasks, and it was such an inspiring experience.</p>
<p>After the summit in Nepal, GNOME Nepal was officially formed, and I became one of the leading contributors right from the start. I led the team to build our community website along with hosting it in own GNOME domain(<a target="_blank" href="https://nepal.gnome.org">nepal.gnome.org</a>) and took on technical responsibilities. Now, as a GitHub maintainer, I review pull requests, propose new features, and assist developers who want to contribute.</p>
<p>Acknowledging these contributions, I was sponsored to attend the GNOME Asia Summit 2024 in Bengaluru. The journey, the summit, and everything in between were unforgettable, and I’m excited to share my experience!</p>
<h1 id="heading-journey-to-bengaluru">Journey to Bengaluru</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1734257166606/bcaeec6b-cf6d-4f7e-8d01-c797ed3beb08.png" alt class="image--center mx-auto" /></p>
<p>My journey to Bengaluru for the GNOME Asia Summit 2024 started with a lot of excitement and a bit of adventure. I traveled with my fellow speakers, Anuroj and Siddharth. We first flew from Kathmandu to Jhapa, where we stayed for the night. The next day, we headed to Bagdogra to catch our flight to Bengaluru.</p>
<p>Our flight was scheduled for 2:15 PM, but, as travel often goes, it was delayed by two hours. Despite the delay, the excitement kept our spirits high, and we finally landed in Bengaluru at 7 PM. That night, we decided to explore the Bengaluru streets.</p>
<p>We ended up eating the famous Hyderabadi Biryani. It was such a flavorful and satisfying meal—a perfect way to kick off the summit experience. The night out gave us a chance to unwind, bond, and get a taste of Bengaluru’s vibrant food culture, setting a great tone for the days ahead.</p>
<h1 id="heading-the-summit-experience">The Summit Experience</h1>
<p>We started Day 1 of the summit by heading to the conference location at the Red Hat office in the Carina building block. After registering, we received our swags—stickers, pins, and more—and then it was time for the talks to begin.</p>
<h3 id="heading-day-1">Day 1:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1734257180384/81bf6d2a-741f-4440-9090-c5908b7e2dc8.png" alt class="image--center mx-auto" /></p>
<p>I attended some amazing sessions from speakers like Jona Azizaj, Smera Goel, Akaashdeep Dhar, Naveen Kumar, and many more. Each talk was insightful, and I learned a lot about GNOME and the open-source community.</p>
<p>Later, we had the <strong>Fedora release party</strong>, where there were great swags and delicious rolls (both vegetarian and non-vegetarian) for lunch. The sessions continued after that, and I also got to hear talks from <strong>Nepalese speakers</strong>, which was a proud moment for me.</p>
<p>There was also <strong>coffee vending machine</strong> sponsored by Red Hat Pvt. Ltd. It kept us energized throughout the day and was definitely a cherry on top. On that day, we also helped <strong>Aryan Kaushik</strong> to plan the <strong>Ubuntu release party</strong>. We found the perfect venue called <strong>Toit</strong>, which turned out to be a really comfy place.</p>
<p>After the first day wrapped up, we headed back to the hotel to freshen up and then went out for dinner. We ate <strong>dosa</strong> and <strong>sambar</strong>, which was light, delicious, and became one of my favorite meals (right after biryani from the night before).</p>
<h3 id="heading-day-2">Day 2:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1734257206330/cc01a789-df21-44fb-aa00-e6a3421e74cf.png" alt class="image--center mx-auto" /></p>
<p>The second day was just as packed with great sessions. I attended talks by <strong>Aryan Kaushik</strong>, <strong>Sumantro Mukherjee</strong>, <strong>Om Prakash Sharma</strong>, and <strong>Samyak Jain</strong>. And of course, we had more coffee from Red Hat to keep us going.</p>
<p>In the evening, we had the <strong>Ubuntu release party</strong> at Toit, where we cut a cake and enjoyed some tasty pizzas, all thanks to Aryan for treating us! It was a perfect way to end a busy day, surrounded by fellow contributors and speakers.</p>
<p>Both days were filled with inspiring sessions, great food, and the best part—connecting with amazing people in the open-source community!</p>
<blockquote>
<p>After a busy day of sessions, we headed out to explore Bengaluru. We first stopped for <strong>Haradadi Biryani</strong>. Then, we visited a <strong>coffee shop</strong>, where we played games like <strong>Jenga</strong> and relaxed. It was a fun, chill evening that gave us a chance to bond with fellow speakers and contributors before getting ready for the next day of the summit.</p>
</blockquote>
<h3 id="heading-day-3">Day 3:</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1734257213420/b18be586-99d5-4be4-af47-f83fb9dfbd26.png" alt class="image--center mx-auto" /></p>
<p>It was an trip with fellow speakers and GNOME Foundation members. After two intense days of conference sessions, we took some time to explore Bengaluru’s sights. We started by visiting the <strong>Bengaluru Museum</strong>, where we got a chance to learn more about the technology and culture.</p>
<p>The day was full of sightseeing, and it was a great way to relax and enjoy some downtime with people we had met during the summit. We visited other local attractions and shared stories, experiences, and laughs.</p>
<blockquote>
<p>In the evening, we(Me, Aaditya and Sailesh) went out again to explore Bengaluru by night. We sipped on <strong>Puneri chai</strong> and tried some delicious local <strong>street food</strong>, enjoying the vibrant atmosphere of the city. We clicked pictures, chatted, and made more memories. It was an awesome end to a fantastic day, wrapping up a trip I’ll never forget!</p>
</blockquote>
<h1 id="heading-closing-remarks">Closing Remarks</h1>
<p>Attending the GNOME Asia Summit 2024 in Bengaluru was an unforgettable experience. From the incredible sessions and networking with open-source enthusiasts to the fun nights out exploring the city, every moment was memorable. I’m grateful for the opportunity to connect with so many amazing people, learn from inspiring talks, and be part of a community that’s truly passionate about making a difference in the tech world.</p>
]]></content:encoded></item><item><title><![CDATA[Introducing gc - AI Powered git commit message generator]]></title><description><![CDATA[Have you ever struggled to write a good Git commit message? I know I have! That’s why I created gc—a CLI tool powered by AI to help you write clear, meaningful commit messages without any hassle.
Why did I build gc?

The idea for gc came from a commo...]]></description><link>https://blog.utsavbhattarai.info.np/gc</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/gc</guid><category><![CDATA[ModusHack]]></category><category><![CDATA[hackathon]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sat, 30 Nov 2024 13:28:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1732957477006/c55a29b8-57c1-46e4-810b-fae29c5f7879.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Have you ever struggled to write a good Git commit message? I know I have! That’s why I created <strong>gc</strong>—a CLI tool powered by AI to help you write clear, meaningful commit messages without any hassle.</p>
<h2 id="heading-why-did-i-build-gc">Why did I build gc?</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1732880959162/b73a83c3-92cd-41ad-82e9-2ae7d3b2d6ba.png" alt class="image--center mx-auto" /></p>
<p>The idea for <strong>gc</strong> came from a common developer struggle: writing good commit messages. During one of my collaborative projects, I noticed how unclear and inconsistent commit messages caused confusion. Some were too vague, like “fix stuff,” while others were unnecessarily long. This made it hard to understand the changes when revisiting the code or working with the team.</p>
<p>I wanted to solve this problem by making commit messages simpler and smarter. With AI becoming more accessible, I realized it could help automate this task. The goal was to create a tool that saves time, ensures meaningful commit messages, and lets developers focus on coding instead of worrying about what to write in their Git commits.</p>
<p><strong>gc</strong> is my solution: an AI-powered CLI tool that generates clear and context-aware commit messages, but still gives you the flexibility to customize them. It’s all about making Git workflows smoother and reducing stress for developers.</p>
<h2 id="heading-usage">Usage</h2>
<p><strong>gc</strong> is a globally installable Node.js package designed to make your Git workflow smoother. It’s easy to set up and works seamlessly with any Git repository.</p>
<h3 id="heading-installation">Installation</h3>
<p>To install <strong>gc</strong>, make sure you have Node.js (v16 or higher) and Git installed. Then, run:</p>
<pre><code class="lang-bash">npm install -g @utsavdotdev/gc
</code></pre>
<p>That’s it! The tool is now ready to use.</p>
<h3 id="heading-commands">Commands</h3>
<ul>
<li><p><strong>Generate Commit Messages</strong></p>
<pre><code class="lang-bash">  gc new
</code></pre>
<p>  Get AI-generated commit message suggestions and select or edit the one you like.</p>
</li>
<li><p><strong>Write Custom Commit Messages</strong></p>
<pre><code class="lang-bash">  gc new -c
</code></pre>
<p>  Manually input your own commit message.</p>
</li>
<li><p><strong>Privacy Settings</strong></p>
<pre><code class="lang-bash">  gc opt-in  
  gc opt-out
</code></pre>
<p>  Choose whether to share anonymous data to help improve the tool.</p>
</li>
<li><p><strong>Help</strong></p>
<pre><code class="lang-bash">  gc --<span class="hljs-built_in">help</span>
</code></pre>
<p>  View a detailed list of commands and how to use them.</p>
</li>
</ul>
<h3 id="heading-usage-1">Usage</h3>
<p>Using <strong>gc</strong> is as simple as these three steps:</p>
<ol>
<li><p><strong>Stage Your Changes</strong><br /> Before running <strong>gc</strong>, add your changes to the staging area using: <code>git add .</code></p>
</li>
<li><p><strong>Generate or Write a Commit Message</strong></p>
<p> To let AI suggest commit messages, use: <code>gc new</code></p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1732884215699/f63015a1-23b5-46b9-82d9-afaf65e11dc7.gif" alt class="image--center mx-auto" /></p>
<p> To write a custom commit message, use: <code>gc new -c</code></p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1732884922903/7fa26b61-d8ec-4547-9fd5-0612181e43d5.gif" alt class="image--center mx-auto" /></p>
</li>
<li><p><strong>Commit or Copy the Message</strong><br /> Once you have your message ready, you can:</p>
<ul>
<li><p>Copy it to your clipboard for later use.</p>
</li>
<li><p>Open and edit it in your preferred CLI editor to make additional adjustments.</p>
</li>
<li><p>Commit it directly to your repository.</p>
</li>
</ul>
</li>
</ol>
<h2 id="heading-development-process">Development Process</h2>
<p>Creating <strong>gc</strong> was an exciting journey that involved several steps to ensure it was useful, reliable, and user-friendly. Here’s a breakdown of the development process:</p>
<h3 id="heading-stage-1-research">Stage 1 - Research</h3>
<p>To kick off the project, I started by looking into existing solutions like <a target="_blank" href="https://github.com/insulineru/ai-commit"><strong>ai-commit</strong></a> and <a target="_blank" href="https://github.com/Nutlope/aicommits"><strong>aicommits</strong></a>. Both are CLI tools designed to generate AI-powered commit messages. While they are useful, I noticed a few areas where they could be improved:</p>
<ul>
<li><p><strong>Customization</strong>: These tools lacked flexibility for users to edit messages easily during the workflow.</p>
</li>
<li><p><strong>Interactive Features</strong>: I wanted a more interactive and user-friendly experience for selecting, editing, or copying messages.</p>
</li>
<li><p><strong>Privacy Options</strong>: I felt it was important to give users clear control over anonymous data sharing(experimental)</p>
</li>
</ul>
<p>This research gave me a solid foundation and clear direction for building <strong>gc</strong>, focusing on making it smarter, more flexible, and better suited to developers’ needs.</p>
<h3 id="heading-stage-2-gathering-tech-stack">Stage 2 - Gathering Tech Stack</h3>
<p>Since the hackathon was organized by Modus, using their platform for building functions and APIs was a mandatory requirement. Modus integrated Models provided the foundation for generating context-aware commit messages, and integrating it became a key part of the project.</p>
<p>For other aspects of the project, I carefully selected tools to ensure efficiency and scalability:</p>
<ul>
<li><p><strong>Next.js</strong>: To build a sleek and responsive website for showcasing <strong>gc</strong>.</p>
</li>
<li><p><strong>Node.js</strong>: The backbone of the CLI tool for its performance and simplicity.</p>
</li>
<li><p><strong>Inquirer.js</strong>: To create interactive prompts for a seamless user experience.</p>
</li>
<li><p><strong>Commander.js</strong>: For command-line argument parsing and structuring the CLI commands.</p>
</li>
<li><p><strong>Clipboardy</strong>: To enable copying generated commit messages directly to the clipboard.</p>
</li>
<li><p><strong>Simple-Git</strong>: To interact with Git repositories programmatically.</p>
</li>
</ul>
<h3 id="heading-stage-3-building-client-side">Stage 3 - Building Client Side</h3>
<p>The first step in building the client-side was creating the <strong>CLI tool</strong>, as it’s the core feature of <strong>gc</strong>. I focused on ensuring the tool was simple to use and provided a seamless experience for developers. Key features like AI-powered commit suggestions, custom messages, and clipboard integration were implemented during this phase.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1732934466686/37cf6f52-b090-468a-9813-48de43339f92.jpeg" alt class="image--center mx-auto" /></p>
<p>After finalizing the CLI tool, I moved on to designing the <strong>landing page</strong> using <strong>Next.js</strong> and <strong>TailwindCSS</strong>. The landing page includes a <strong>mock terminal box</strong>, where users can interact with predefined commands such as:</p>
<ul>
<li><p><code>gc info</code>: Displays information about the tool.</p>
</li>
<li><p><code>gc features</code>: Lists the key features of <strong>gc</strong>.</p>
</li>
<li><p><code>gc commands</code>: Shows a quick reference for all available CLI commands.</p>
</li>
<li><p><code>cls</code> or <code>clear</code>: Clears the terminal screen.</p>
</li>
</ul>
<h3 id="heading-stage-4-integrating-modus">Stage 4 - Integrating Modus</h3>
<p>Integrating <strong>Modus</strong> was a crucial step in the development of <strong>gc</strong>. This was my first experience with <strong>Hypermode</strong> and <strong>Modus</strong>, so I started from scratch. I began by watching the collaborative YouTube video between <strong>Hypermode</strong> and <strong>Hashnode</strong>, which helped me understand the basics. Then, I dive into the documentation, exploring code snippets provided by <strong>Hypermode</strong>. Initially, it was overwhelming, and I felt completely lost. To clear my mind, I decided to focus on completing the client-side part of the project first.</p>
<p>Once I felt refreshed, I returned to setting up <strong>Modus</strong>, following the documentation step by step. I was able to successfully set it up and generate a simple GraphQL API for a "hello message" function. Thankfully, GraphQL wasn’t new to me, as I had worked with it previously while experimenting with the <strong>Hashnode</strong> API.</p>
<p>Next, I explored the models I would need. I initially tried using an external model by adding it to the <code>modus.json</code> file, but I encountered limitations due to free credits running out after testing. Fortunately, I discovered that <strong>Hypermode</strong> also hosts some models, which worked much better for my needs and provided valid responses.</p>
<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">I used the <strong>Hypermode-hosted text generation model</strong>, <code>meta-llama/Meta-Llama-3.1-8B-Instruct</code>, to power the AI-driven commit message generation feature.</div>
</div>

<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1732934623053/3de63af6-72b4-47eb-83af-adde437ac446.jpeg" alt class="image--center mx-auto" /></p>
<p>After that, I wrote a function that takes a prompt and the Git diff output, then returns an array of commit messages. To fine-tune this function, I tested it approximately 100-130 times, iterating on the prompt to get the most accurate results. However, I ran into a challenge when the service suddenly crashed, showing a 503 error. Fortunately, the <strong>Modus</strong> team resolved the issue within a couple of hours.</p>
<p>Once everything was up and running, I fine-tuned the responses from the model and displayed them to the user in a clear and meaningful way. This integration of Modus into <strong>gc</strong> was a key step in making the AI-powered commit message feature come to life.</p>
<h3 id="heading-stage-5-deployment">Stage 5 - Deployment</h3>
<p>When it came to deploying <strong>Modus</strong>, I initially thought it would be a difficult process. However, once I aligned everything in the right way, it turned out to be much easier than I expected.</p>
<p>For the <strong>landing page</strong>, I hosted it on <strong>Vercel</strong>, which was quick and simple, allowing it to be live right away.</p>
<p>The <strong>CLI tool</strong> was published on the <strong>npm package registry</strong>, making it easy for others to install and use.</p>
<p>As for the <strong>Modus functions and APIs</strong>, I had to link my GitHub repo to <strong>Hypermode</strong> using the command:</p>
<pre><code class="lang-bash">hyp link
</code></pre>
<p>Once linked, it automatically updated the Modus app's endpoints with each commit and provided a production-ready API accessible with the <strong>Hypermode API key</strong>. This process was surprisingly easy and worked smoothly once everything was set up properly.</p>
<h2 id="heading-problem-encounter">Problem Encounter</h2>
<p>During the development of <strong>gc</strong>, I faced a few challenges that required some problem-solving and adjustments:</p>
<ol>
<li><p><strong>Modus API Crashes</strong>: While testing the integration with <strong>Modus</strong>, I encountered an issue where the API returned a 503 error. It turned out that this was caused by an overload in requests. Fortunately, the <strong>Modus</strong> team fixed the issue within a couple of hours, allowing me to continue working without major delays.</p>
</li>
<li><p><strong>External Model Limitations</strong>: I initially tried to use an external AI model for generating commit messages by adding it to the <code>modus.json</code> file. However, after running out of free credits, I had to find an alternative. Luckily, <strong>Hypermode</strong> hosted models that worked well, and I was able to use those instead.</p>
</li>
<li><p><strong>Fine-Tuning AI Responses</strong>: Getting the AI model to generate relevant commit messages based on Git diffs was challenging. I had to test the prompt multiple times—about 100-130 attempts—to refine it and ensure that the responses were meaningful. Even after that, I had to fine-tune the model’s outputs to match the expected results.</p>
</li>
</ol>
<h2 id="heading-links">Links</h2>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/UmwjiRI8pdk">https://youtu.be/UmwjiRI8pdk</a></div>
<p> </p>
<ul>
<li><p>🖥️ <strong>GitHub Repository</strong>: <a target="_blank" href="https://github.com/utsavdotdev/gc">utsavdotdev/gc</a></p>
</li>
<li><p>🌐 <strong>Website</strong>: <a target="_blank" href="https://gc-cli.vercel.app/">gc</a></p>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Building <strong>gc</strong> was a great experience, and I’m happy with how it turned out. It’s a tool that helps developers generate meaningful commit messages using AI, making workflows smoother and more efficient.</p>
<p>A huge <strong>thank you</strong> to <strong>Hashnode</strong> and <strong>Hypermode</strong> for organizing this hackathon and providing the tools and support that made this project possible. 🚀</p>
]]></content:encoded></item><item><title><![CDATA[Say Hello to AI-KYC: The Next-Gen KYC Verification]]></title><description><![CDATA[Struggling with clunky KYC procedures? AI-KYC is the answer! Our intelligent system simplifies and speeds up verification, turning a complex task into an effortless one. Revolutionize your KYC experience now!
🚀 Meet our Team
Hi! I’m Utsav Bhattarai ...]]></description><link>https://blog.utsavbhattarai.info.np/say-hello-to-ai-kyc-the-next-gen-kyc-verification</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/say-hello-to-ai-kyc-the-next-gen-kyc-verification</guid><category><![CDATA[AIForTomorrow]]></category><category><![CDATA[hackathon]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sun, 28 Jul 2024 15:08:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722159202735/9a07bc83-9b30-4f53-9454-e8c1bdaa35c5.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Struggling with clunky KYC procedures? AI-KYC is the answer! Our intelligent system simplifies and speeds up verification, turning a complex task into an effortless one. Revolutionize your KYC experience now!</strong></p>
<h1 id="heading-meet-our-team">🚀 Meet our Team</h1>
<p>Hi! I’m Utsav Bhattarai 👋, and I’ve teamed up with my friend <strong>Rajesh Khadka</strong> and our video wizard <strong>Bishesh Marasini</strong> to bring you <a target="_blank" href="https://aikyc-v1.vercel.app/">AI-KYC</a>. We’re thrilled to share our latest project with you. AI-KYC is an innovative app designed to make the KYC process smarter and simpler.</p>
<p>Connect with us:</p>
<ul>
<li><p><strong>Utsav Bhattarai</strong>: <a target="_blank" href="mailto:utsavbhattarai007@gmail.com">Email</a> | <a target="_blank" href="https://linkedin.com/in/utsavdotdev">LinkedIn</a> | <a target="_blank" href="https://github.com/utsavdotdev">Github</a></p>
</li>
<li><p><strong>Rajesh Khadka</strong>: <a target="_blank" href="mailto:rajeshkhadkaofficial45@gmail.com">Email</a> | <a target="_blank" href="https://www.linkedin.com/in/rajeshkhadka200/">LinkedIn</a> | <a target="_blank" href="https://github.com/utsavdotdev">Github</a></p>
</li>
<li><p><strong>Bishesh Marasini</strong>: <a target="_blank" href="mailto:marasinibishesh@gmail.com">Email</a> | <a target="_blank" href="https://www.linkedin.com/in/marasinibishesh/">LinkedIn</a> | <a target="_blank" href="https://github.com/marasinibishesh">Github</a></p>
</li>
</ul>
<p>We’d love to hear from you and show you how AI-KYC is changing the game in identity verification!</p>
<h1 id="heading-project-overview">💡 Project Overview</h1>
<p><strong>AI-KYC</strong> is an innovative web-based application designed to simplify the KYC (Know Your Customer) process for organizations/ Business. It allows orgs to effortlessly create and customize KYC forms directly on the platform. Once KYC forms are set up, the application generates unique links for the respective  form that can be shared with end users, who can then fill out the KYC forms with ease. Our machine learning models then work behind the scenes to verify identities by matching document's face with their live selfie.</p>
<p>The platform features a user-friendly dashboard for managing submissions, exporting data to Excel, and viewing key statistics. With JWT authentication, AI-KYC ensures secure and reliable data handling throughout the process.</p>
<h1 id="heading-why-we-did-this-project">🔥 <strong>Why we did this project</strong></h1>
<p>In today's business landscape, whether it’s a startup, big company or any organization, Know Your Customer (KYC) verification is essential. However, hiring multiple employees for manual verification (in most of the cases)  is costly and inefficient. So, to reduce this problem to some extent, we decided to build this application as a hackathon Project.</p>
<p>Our innovative solution automates the KYC process, allowing businesses and organizations  to integrate a powerful AI-driven system that eliminates the need for a large verification team. AI-KYC verifies users in under a minute, reducing costs, enhancing accuracy, and freeing up resources to focus on growth.  After investing a little more time on this, we believe we can come up with it’s refined version.</p>
<h1 id="heading-tech-tools">🔧 Tech Tools</h1>
<h3 id="heading-frontend">🎨 Frontend:</h3>
<ul>
<li><p><a target="_blank" href="https://vite.new/react"><strong>Vite with React</strong></a>: Fast and optimized development setup using Vite and React.</p>
</li>
<li><p><a target="_blank" href="https://tailwindcss.com/"><strong>TailwindCSS</strong></a>: Utility-first CSS framework for rapid UI development.</p>
</li>
<li><p><a target="_blank" href="https://ui.shadcn.com/"><strong>Shadcn UI</strong></a>: Comprehensive component library for consistent and customizable UI elements.</p>
</li>
</ul>
<h3 id="heading-backend">🌐 Backend:</h3>
<ul>
<li><p><a target="_blank" href="https://www.mongodb.com/"><strong>MongoDB</strong></a>: NoSQL database for flexible and scalable data storage.</p>
</li>
<li><p><a target="_blank" href="https://expressjs.com/"><strong>Express.js</strong></a>: Web application framework for building robust backend services.</p>
</li>
<li><p><a target="_blank" href="https://nodejs.org/en"><strong>Node.js</strong></a>: JavaScript runtime environment for executing server-side code.</p>
</li>
</ul>
<h3 id="heading-ai-tools">🤖 AI Tools:</h3>
<ul>
<li><p><a target="_blank" href="https://ai.google.dev/gemini-api/docs/vision"><strong>Gemini Vision API</strong></a>: Extracts details from documents using advanced AI.</p>
</li>
<li><p><a target="_blank" href="https://justadudewhohacks.github.io/face-api.js/docs/index.html"><strong>Face API.js Models</strong></a>: Real-time face comparison between selfies and document photos.</p>
<ul>
<li><p><strong>68 Point Face Landmark Detection Model</strong>: Identifies key facial landmarks.</p>
</li>
<li><p><strong>Face Recognition Model</strong>: Matches faces with high accuracy.</p>
</li>
<li><p><strong>SSD Mobilenet V1</strong>: Object detection model for face localization and identification.</p>
</li>
</ul>
</li>
</ul>
<p>    See all the ML modals used in this App here :  <a target="_blank" href="https://github.com/utsavdotdev/ai-kyc/tree/main/bot/models">Click here</a></p>
<blockquote>
<p>✨<strong>Note</strong>: Our AI-powered bot works behind the scenes to handle user verification. It uses the above AI models and the Gemini API to analyze form submissions, compare selfies with document photos, and extract essential information for comparison. This ensures a smooth and accurate verification process, keeping everything secure and efficient.</p>
</blockquote>
<h1 id="heading-quick-glimpse">👁️ Quick Glimpse</h1>
<h3 id="heading-1-hero-page">1. Hero Page</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722089386399/eec01f42-737a-4f09-aab7-dfbe21aed292.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-2-feature-section">2. Feature Section</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722089445427/6dfd3006-b3f0-4b4d-be7d-ae23513222ff.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-3-dashboard-page">3. Dashboard Page</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722089842277/96aaaeeb-8fff-4715-91d1-4abe94d311d9.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>This page displays the list of forms created by the business organization.</p>
</blockquote>
<h3 id="heading-4-analytics-page">4. Analytics Page</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722090147134/87c91fd6-5722-4091-8c74-285ffee0162a.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>This page provides insights of the forms created by the organization.</p>
</blockquote>
<h3 id="heading-5-setting-page">5. Setting Page</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722090493346/553128de-87d3-4e8c-bf2f-d746526a54dd.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-6-user-list-page">6. User List Page</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722175950526/491ce29e-e718-44cd-a3f1-dff4ce863172.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>This sections shows the list of users who filled the respective KYC form.</p>
</blockquote>
<h3 id="heading-7-kyc-form-page">7. KYC form Page</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722092434916/e6d8db03-2cbc-4e21-9448-2bef089217ee.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>This is multi step form where user's fill their details.</p>
</blockquote>
<h1 id="heading-architecture-diagram"><strong>👩‍💼 Architecture Diagram</strong></h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722159448172/6825bec7-c55c-4790-9781-b5e70ef54220.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-highlighted-features">✨ Highlighted Features</h1>
<h3 id="heading-1-form-creation"><strong>1. Form Creation</strong>:</h3>
<p>Businesses and organizations can effortlessly create and customize KYC forms directly on our platform, to make the verification process more easier.</p>
<h3 id="heading-2-create-unique-links"><strong>2. Create Unique Links</strong></h3>
<p>The application automatically generates a unique URL for each KYC form, which businesses and organizations can easily share with their end users. These links can also be integrated into existing systems, making it simple for users to access and complete the forms.</p>
<h3 id="heading-3-ai-powered-verification"><strong>3. AI-Powered Verification</strong></h3>
<p>AI-KYC uses advanced machine learning algorithms to automatically verify and reject user submissions, ensuring accurate and efficient processing.</p>
<h3 id="heading-4-real-time-notification-on-customers-email"><strong>4. Real time Notification on Customers email</strong></h3>
<p>Users who fill out the form will receive real-time email notifications with their verification status within minutes. If their KYC submission is rejected for any reason, AI-KYC provides clear and valid reasons for the rejection as a remark.</p>
<h3 id="heading-5-comprehensive-dashboard"><strong>5. Comprehensive Dashboard</strong></h3>
<p>AI-KYC offers a robust dashboard to manage and view KYC form submissions, helping organizations track and analyze responses effectively.</p>
<h3 id="heading-5-export-to-excel"><strong>5. Export to Excel</strong></h3>
<p>Easily export form data to Excel files for seamless data manipulation and reporting.</p>
<h3 id="heading-6-statistics-overview"><strong>6. Statistics Overview</strong></h3>
<p>Business/ Organization can gain valuable insights and improve processes with detailed statistics on KYC form submitted by end users.</p>
<h3 id="heading-7-secure-jwt-authentication"><strong>7. Secure JWT Authentication</strong></h3>
<p>Our app uses JWT to protect user data across the server.</p>
<h3 id="heading-8-modern-responsive-design"><strong>8. Modern, Responsive Design</strong></h3>
<p>Enjoy a sleek, modern design that is responsive across all devices, ensuring a smooth and user-friendly experience.</p>
<h1 id="heading-challenges">🛠️ Challenges</h1>
<h3 id="heading-adapting-ai-models"><strong>Adapting AI Models</strong></h3>
<p>Initially, we aimed to develop and train our own AI models locally. However, this required significant CPU, GPU, and memory resources, which our laptops couldn't handle. We decided to use per-trained models but faced issues with compatibility, particularly on Windows. Migrating to Linux helped, but finding the right models and integrating them was a challenging and frustrating process. Ultimately, we overcame these hurdles and successfully integrated the necessary AI models.</p>
<h1 id="heading-video-creation-and-presentation">🎥 Video Creation and Presentation</h1>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=BR13h5Cdpck">https://www.youtube.com/watch?v=BR13h5Cdpck</a></div>
<p> </p>
<p>Creating this video was a significant step for us, especially as introverts who faced challenges like multiple retakes and background noise. We wanted to clearly communicate our vision for AI-KYC and how our product can solve real-world problems. Committed to our idea, we believed that simply talking about it wasn't enough; we needed the world to visualize its potential.</p>
<p>A picture is worth a thousand words, so we chose to express our concept through a video. With the help of our friend Bishesh Marasini, who handled the video editing, we were able to bring our ideas to life and show the real-world application of AI-KYC. This video is not just an explanation but a visualization of our dedication and the impact we aim to make.</p>
<blockquote>
<p>This pic reflects the video editing process.</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722178460786/7b9ae96a-e2ea-4c05-92a7-1ae7a4dec5ed.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-future-plans"><strong>🔮 Future Plans</strong></h1>
<p>1. <strong>Seamless Integration:</strong></p>
<p>We plan to integrate AI-KYC directly into existing systems, making it easier for businesses to adopt and use our solution without disrupting their current workflows.</p>
<p>2. <strong>Enhanced Machine Learning Accuracy:</strong></p>
<p>We aim to fine-tune our machine learning models to improve accuracy and similarity detection, ensuring even more reliable KYC verification.</p>
<p><strong>3. Providing Verified Certificates or badge:</strong></p>
<p>In future, we are planning to offer verified certificates to customers who complete the KYC process, enabling them to use these certificates across various platforms, streamlining their verification experience.</p>
<p><strong>4. API Outsourcing:</strong></p>
<p>Our goal is to develop and provide an API so that businesses can use AI-KYC in their own unique ways, leveraging our technology to enhance their existing processes.</p>
<h1 id="heading-deployment"><strong>🚀 Deployment</strong></h1>
<p>Yes, you heard it right—AI-KYC is now live! We're using <a target="_blank" href="https://vercel.com">vercel</a> to deploy the front end and <a target="_blank" href="http://render.com">render.com</a> to deploy the server and bot components of the application.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722161809587/cf72bd80-84df-4fbd-b7b1-833527493ece.png" alt="bot running in the server" class="image--center mx-auto" /></p>
<h1 id="heading-key-links">🔗 Key Links</h1>
<ul>
<li><p>🚀 <strong>GitHub</strong>: <a target="_blank" href="https://github.com/utsavdotdev/ai-kyc">Click Here</a></p>
</li>
<li><p>🎬 <strong>YouTube</strong>: <a target="_blank" href="https://www.youtube.com/watch?v=BR13h5Cdpck">Click Here</a></p>
</li>
<li><p>🌐 <strong>Website</strong>: <a target="_blank" href="https://aikyc-v1.vercel.app">Click Here</a></p>
</li>
</ul>
<h1 id="heading-wrap-up">🎉 Wrap-up</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722178613328/653e9be9-9ff2-49cf-ae33-6991b8b99c35.jpeg" alt class="image--center mx-auto" /></p>
<p>Overall, developing AI-KYC was an incredible learning experience. We gained valuable insights into advanced AI models, honed our skills in integrating machine learning algorithms, and improved our proficiency with the <strong>MERN stack.</strong> And most important of all, we developed a new skill of being patient when our code doesn't work and we don't get any solutions at all. The entire journey was rewarding, and we highly encourage anyone interested in innovation to participate in a hackathon and push their limits.</p>
]]></content:encoded></item><item><title><![CDATA[Introducing Apexa - The Analyzer]]></title><description><![CDATA[Tired of sorting through comments? Apexa's got your back! Get instant notifications on audience reactions and say goodbye to content creation confusion. Apexa doesn't just analyze; it helps you generate awesome ideas. Stay tuned as we reveal how Apex...]]></description><link>https://blog.utsavbhattarai.info.np/introducing-apexa-the-analyzer</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/introducing-apexa-the-analyzer</guid><category><![CDATA[mindsdb]]></category><category><![CDATA[MindsDBHackathon]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sun, 14 Jan 2024 14:22:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705150918439/df8e42cd-2f0a-4001-b73b-cf5e28a08499.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Tired of sorting through comments? Apexa's got your back! Get instant notifications on audience reactions and say goodbye to content creation confusion. Apexa doesn't just analyze; it helps you generate awesome ideas. Stay tuned as we reveal how Apexa's image generation adds a magical touch to your creative journey!</p>
<h1 id="heading-team-details"><strong>🚀 Team Details:</strong></h1>
<p>Hi, I'm <strong>Utsav Bhattara</strong>i 👋, and alongside my awesome friend's <a class="user-mention" href="https://hashnode.com/@rajeshkhadka">Rajesh Khadka</a> 🤝 and Our Video Crafter friend <a class="user-mention" href="https://hashnode.com/@bishesh">Bishesh Marasini</a> , we've teamed up to bring you Apexa - The Analyzer. As passionate developers and tech enthusiasts, we embarked on this hackathon journey to create a powerful open-source app that adds a dash of innovation to your online experience.</p>
<p>Feel Free to connect with us:</p>
<p>My handles:</p>
<ul>
<li><p>📧 Email: <strong>utsavbhattarai007@gmail.com</strong></p>
</li>
<li><p>📱 LinkedIn: <a target="_blank" href="https://www.linkedin.com/in/utsavbhattarai007/">@utsavbhattarai007</a></p>
</li>
<li><p>🌐 GitHub: <a target="_blank" href="https://github.com/utsavbhattarai007">@utsavbhattarai007</a></p>
</li>
</ul>
<p>Rajesh's handles:</p>
<ul>
<li><p>📧 Email: <strong>rajeshkhadkaofficial45@gmail.com</strong></p>
</li>
<li><p>📱 LinkedIn: <a target="_blank" href="https://www.linkedin.com/in/rajeshkhadka200/">@rajeshkhadka200</a></p>
</li>
<li><p>🌐 GitHub: <a target="_blank" href="https://github.com/rajeshkhadka200">@rajeshkhadka200</a></p>
</li>
</ul>
<p>Bishesh's handles:</p>
<ul>
<li><p>📧 Email: <strong>marasinibishesh@gmail.com</strong></p>
</li>
<li><p>📱 LinkedIn: <a target="_blank" href="https://www.linkedin.com/in/bisheshmarasini/">@bisheshmarasini</a></p>
</li>
</ul>
<h1 id="heading-project-overview"><strong>💡 Project Overview:</strong></h1>
<p>Apexa is the MIT license open source web application where you can keep track of your <strong>YouTube videos</strong> and <strong>Hashnode blogpost</strong> to understand your audience's thoughts on your content. Also you can generate a summary of the tracked videos and blogspot. Perfect for sharing with those friends who prefer concise over comprehensive content</p>
<p>With Apexa, you can discover new content ideas tailored to your interests, providing you with a brainstorming companion right at your fingertips. Additionally, you have the ability to create stunning AI-powered images suitable for video thumbnails and blog covers.</p>
<h1 id="heading-inspiration-idea-and-problem"><strong>🔥 Inspiration, idea, and problem :</strong></h1>
<p>During a casual audio call with my friend <a class="user-mention" href="https://hashnode.com/@rajeshkhadka">Rajesh Khadka</a> , he mentioned that <strong>Hashnode</strong> and <strong>Mindsdb</strong> had launched a Hackathon. Intrigued by this, we delved into the details provided in the announcement blog post by <a class="user-mention" href="https://hashnode.com/@danielapassos">Daniela Passos</a> . After thoroughly considering the announcement, we decided to collaborate and work on this exciting idea.</p>
<p>Certainly, it tackles the manual process of analyzing audience responses and helps in connecting with the audience as a content creator. To some extent, it facilitates brainstorming for content ideas and generate the creative images with just words.</p>
<h1 id="heading-tech-stack"><strong>🔧 Tech Stack:</strong></h1>
<p>Let's break down the tools that bring Apexa to life:</p>
<h3 id="heading-1-reactjs-as-front-end">1. ReactJs as Front-end</h3>
<p>We used <a target="_blank" href="https://react.dev/">ReactJs</a> to make Apexa look cool and feel super easy to use. It's like the artist behind the scenes.</p>
<h3 id="heading-2-mongodb-as-database">2. MongoDB as database</h3>
<p><a target="_blank" href="https://www.mongodb.com/">MongoDB</a> is like our organized filing cabinet. It keeps all our data safe and easy to find, making sure everything in Apexa runs smoothly.</p>
<h3 id="heading-3-custom-styling-with-material-ui">3. Custom styling with Material UI</h3>
<p>Imagine mixing your own unique style with a collection of sleek design elements. That's what happened with <a target="_blank" href="https://mui.com/material-ui/">Material UI</a> – it's our secret sauce for making Apexa look awesome.</p>
<h3 id="heading-4-mindsdb-as-brain-of-the-operation">4. <strong>MindsDB as Brain of the operation:</strong></h3>
<p><a target="_blank" href="https://mindsdb.com/">MindsDB</a> is the smart brain of Apexa. It helps to create, train, and optimize models for making the better AI product . MindsDB also grabs YouTube comments for Apexa because it knows where to find lots of useful info. And here's the cool part – MindsDB is an open-source project! That means anyone can tweak it to fit their needs. Just jump into the official <a target="_blank" href="https://github.com/mindsdb/mindsdb">MindsDB Repo</a> and start making it your own by adding different data sources, AI engine and lots of stuffs.</p>
<h1 id="heading-quick-look">👁️Quick Look</h1>
<h3 id="heading-1-hero-page">1. Hero Page</h3>
<p>The first impression! The Hero Page showcases Apexa's awesome features – YouTube comment analysis, blog insights, content recommendations, and more.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705156620393/7eacd8af-0e3d-4d79-9599-dc27a5c1c9c7.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-2-youtube-analyzer-page">2. Youtube Analyzer Page</h3>
<p>Dive into the world of YouTube insights! Paste your video link, hit search, and witness a visual breakdown of comments. Get summaries, turn on notifications, and stay connected with your audience effortlessly.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705156664211/d868d5c7-fe7a-49dd-b7c5-a2845748ae22.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-3-blog-analyzer-page">3. Blog Analyzer Page</h3>
<p>For the bloggers out there! Analyze Hashnode blog comments with a click. Summarize, turn on notifications, and keep your blog community engaged and positive.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705156763482/b67a5b16-e349-4354-993c-f150b3e935aa.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-4-content-recommender-page">4. Content Recommender Page</h3>
<p>Need content inspiration? Choose your field, share your thoughts, and hit the magic button. Apexa suggests creative content ideas for videos, reels, blogs, and social media.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705156738276/7aa5c4e5-b667-4fb4-98f6-142f1559c832.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-5-image-generation-page">5. Image Generation Page</h3>
<p>Unleash your creativity! Describe an image in the text box, hit process, and watch Apexa turn your words into a visual masterpiece. Download and share your unique creations</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705156771121/8e5c0695-9bd0-42a4-8aa0-87dccde4336c.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-key-features"><strong>✨ Key Features:</strong></h1>
<h3 id="heading-1-comment-analysis"><strong>1. Comment Analysis 🔍</strong></h3>
<p>Our Comment Analysis feature in the blog and YouTube sections makes it easy for users to understand what people are saying without reading all the comments. We've optimized this feature by processing comments in batches of 5 for quicker responses. The analysis is showcased with simple and beautiful pie charts for better visualization.</p>
<h3 id="heading-2-summary-generation">2. <strong>Summary Generation 📝</strong></h3>
<p>With Summary Generation on YouTube and blog pages, users can get a quick summary of a video or blog with just one click. It shows up in a nice pop-up with a cool writing animation.</p>
<h3 id="heading-3-notification-system">3. <strong>Notification System 🔔</strong></h3>
<p>The Notification System in both blog and YouTube sections can be turn on to get alerted when toxic and hate comments are detected. Crafted with the help of a background bot, it runs every 20 seconds, scanning for harsh and spam comments in our database and sending notifications to the tracked user.</p>
<h3 id="heading-4-image-generator">4. <strong>Image Generator 🖼</strong></h3>
<p>The Image Generator turns your words into pictures. Just type a word, hit a button, and a cool image comes out. We use a smart model called OpenAI DALL-E 3 to do this.</p>
<h3 id="heading-5-content-recommender">5. <strong>Content Recommender 💡</strong></h3>
<p>The Content Recommender suggests ideas for blogs, videos, and social media posts based on what users like. It's like a helpful friend giving you cool ideas for what to create next.</p>
<h3 id="heading-6-user-authentication">6. <strong>User Authentication 🔒</strong></h3>
<p>In Apexa, Authentication is secured using <strong>JWT</strong> with refresh and access tokens, ensuring the safety of user data and other information.</p>
<h3 id="heading-7-insightful-analytics">7. <strong>Insightful Analytics 📊</strong></h3>
<p>At Apexa, we really care about insights. Our Insightful Analytics feature looks at comments, figures out what's useful, and shows you important stuff. We've tested it with over 500 comments to make sure it works well.</p>
<h3 id="heading-8-text-to-speech-functionality">8. <strong>Text-to-Speech Functionality 🎤</strong></h3>
<p>Located in the Content Recommender Page, each text box has a handy text-to-speech button that converts written ideas into spoken words.</p>
<h3 id="heading-9-continuous-tracking">9. <strong>Continuous Tracking 🔄</strong></h3>
<p>If there are new comments in blogs and videos, they get processed again when the user tracks the same content, adding up to the previous insights. It keeps you continuously updated on audience interactions</p>
<h1 id="heading-why-mindsdb"><strong>🧠 Why MindsDB?</strong></h1>
<p>We chose <a target="_blank" href="http://mindsdb.com">MindsDB</a> as it was a requirement for the hackathon organized by <strong>Hashnode</strong> in collaboration with MindsDB. While it might seem a bit challenging initially, once you get comfortable with MindsDB, you'll love its features. MindsDB offers a wide range of data sources, AI engines, and integration handlers that allow you to build your own AI applications. You can create your own models by training them with large datasets tailored to your specific needs. MindsDB also supports popular AI engines like <strong>OpenAI</strong> and Hugging Face.</p>
<p>A cool aspect of MindsDB is that it's an open-source project, meaning anyone can contribute by adding their data sources, handlers, or AI engines to the official <a target="_blank" href="https://github.com/mindsdb/mindsdb">MindsDB repository</a>. This flexibility allows users to easily customize and create their AI applications.</p>
<h1 id="heading-how-we-used-mindsdb"><strong>🤖 How We Used MindsDB:</strong></h1>
<p>We use MindsDB for various tasks, such as extracting YouTube comments and optimizing OpenAI models for specific purposes. Initially, we perform all the necessary tasks and testing using MindsDB's GUI editor through SQL commands. The models trained and optimized in the GUI editor are then accessed and utilized in our web application through <a target="_blank" href="https://github.com/mindsdb/mindsdb-js-sdk">MindsDB's JavaScript SDK</a>. This SDK acts as a connection system to link the models with our back-end server. Here are some of the secret codes we used to make all this happen:</p>
<ol>
<li><h4 id="heading-for-fetching-youtube-comments">For Fetching Youtube Comment's</h4>
</li>
</ol>
<pre><code class="lang-sql"><span class="hljs-comment">-- Creating Datasource of youtube</span>
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">DATABASE</span> mindsdb_youtube
<span class="hljs-keyword">WITH</span> <span class="hljs-keyword">ENGINE</span> = <span class="hljs-string">'youtube'</span>,
<span class="hljs-keyword">PARAMETERS</span> = {
  <span class="hljs-string">"youtube_api_token"</span>: <span class="hljs-string">'-Your Youtube Developer Api key-'</span>  
};

<span class="hljs-comment">-- For fetching the youtube comments of respective channel</span>
<span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> mindsdb_youtube.comments
<span class="hljs-keyword">WHERE</span> video_id = <span class="hljs-string">"Video ID"</span>;
</code></pre>
<ol>
<li><h4 id="heading-for-creating-the-ml-engine-of-openai">For Creating the ML engine of OpenAi</h4>
</li>
</ol>
<pre><code class="lang-sql"><span class="hljs-comment">-- This engine is used throughout of your application</span>
<span class="hljs-keyword">CREATE</span> ML_ENGINE openai_engine
<span class="hljs-keyword">FROM</span> openai
<span class="hljs-keyword">USING</span> 
   api_key = <span class="hljs-string">'Your OpenAi API key'</span>;
</code></pre>
<ol>
<li><h4 id="heading-for-comment-analysis">For comment Analysis</h4>
</li>
</ol>
<pre><code class="lang-sql"><span class="hljs-comment">-- This model is used to extract sentiment of 5 comments per request</span>
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">MODEL</span> mindsdb.comment_analyzer
PREDICT sentiment
<span class="hljs-keyword">USING</span>
  <span class="hljs-keyword">engine</span> = <span class="hljs-string">'openai_engine'</span>,
  model_name = <span class="hljs-string">'gpt-4'</span>,
  max_tokens=<span class="hljs-number">400</span>,
  prompt_template = <span class="hljs-string">'Evaluate the sentiment of the following comment segments enclosed by {} and separated by &amp;. Provide only one sentiment for each comment, strictly choosing one out of these sentiments: Appreciation, Hate, Neutral, Spam. Avoid offering any explanations. If {comment1}&amp; {comment2}&amp; is passed, the response should be sentiment1, sentiment2. If {comment1}&amp; {comment2}&amp; {comment3}&amp; {comment4}&amp; {comment5}$ is passed, the response should be sentiment1, sentiment2, sentiment3, sentiment4, sentiment5. Ensure that this format remains consistent for all comments, and the maximum number of comments to be passed is up to 5 - {{comment}}'</span>;
</code></pre>
<ol>
<li><h4 id="heading-for-extracting-summary-of-blog-and-youtube">For extracting summary of blog and youtube</h4>
</li>
</ol>
<pre><code class="lang-sql"><span class="hljs-comment">-- This model is used to extract the summary of youtube video through transcript</span>
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">MODEL</span> mindsdb.text_summary
PREDICT summary
<span class="hljs-keyword">USING</span>
  <span class="hljs-keyword">engine</span> = <span class="hljs-string">'openai_engine'</span>,
  model_name = <span class="hljs-string">'gpt-4'</span>,
  max_tokens=<span class="hljs-number">400</span>,
  prompt_template = <span class="hljs-string">'Summarize the content of the YouTube video using transcript in short and strictly donot give incomplete summary - transcript: {{transcript}}'</span>;

<span class="hljs-comment">-- This model is used to extract summary of blog through markdown</span>
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">MODEL</span> mindsdb.blog_summary
PREDICT summary
<span class="hljs-keyword">USING</span>
  <span class="hljs-keyword">engine</span> = <span class="hljs-string">'openai_engine'</span>,
  model_name = <span class="hljs-string">'gpt-4'</span>,
  max_tokens=<span class="hljs-number">400</span>,
  prompt_template = <span class="hljs-string">'Summarize the content of the blog using markdown in short and strictly donot give incomplete summary - markdown: {{markdown}}'</span>;
</code></pre>
<h1 id="heading-add-on">➕ Add on:</h1>
<p><strong>Knowledge Base</strong>: It is a repository of learned representations or embeddings, usually created by training an embedding model on relevant data. This knowledge can be used by the agent to understand and respond to user inputs.</p>
<p><strong>Skills</strong>: These are specific capabilities or tasks associated with the AI agent. Skills define how the agent can use its knowledge to perform various tasks, and they are often linked to models or knowledge bases.</p>
<p><code>CREATE KNOWLEDGE BASE</code> command is used to create a knowledge base from an embedding model, and the <code>CREATE SKILL</code> command is used to define specific skills that utilize knowledge bases or other resources for tasks like sentiment analysis or text summarization. The agent is then configured with these skills to enable it to respond intelligently to user input.</p>
<pre><code class="lang-sql"><span class="hljs-comment">-- Create an ML Engine for OpenAI</span>
    <span class="hljs-keyword">CREATE</span> ML_ENGINE openai_engine
    <span class="hljs-keyword">FROM</span> openai
    <span class="hljs-keyword">USING</span>
        api_key = <span class="hljs-string">'sk-.................'</span>;

<span class="hljs-comment">-- Create an embedding model for the knowledge base</span>
    <span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">MODEL</span> mindsdb.embedding_model
    PREDICT embeddings
    <span class="hljs-keyword">USING</span>
       <span class="hljs-keyword">engine</span> = <span class="hljs-string">'openai_engine'</span>,
       <span class="hljs-keyword">mode</span>=<span class="hljs-string">'embedding'</span>,
       model_name=<span class="hljs-string">'text-embedding-ada-002'</span>,
       question_column = <span class="hljs-string">'content'</span>;

<span class="hljs-comment">-- Create a knowledge base using the embedding model</span>
    <span class="hljs-keyword">CREATE</span> KNOWLEDGE BASE my_knowledge_base
    <span class="hljs-keyword">USING</span>
       <span class="hljs-keyword">model</span> = mindsdb.embedding_model;

<span class="hljs-comment">-- Insert data into the knowledge base</span>
    <span class="hljs-keyword">INSERT</span> <span class="hljs-keyword">INTO</span> my_knowledge_base (<span class="hljs-keyword">content</span>)
    <span class="hljs-keyword">VALUES</span> (<span class="hljs-string">"I really enjoyed reading about your experiences and lessons learned as a developer. It's clear that you have a passion for this field and a dedication to constantly improving your skills. Keep on coding!"</span>);

<span class="hljs-comment">--  Create a skill for sentiment analysis using the knowledge base</span>
    <span class="hljs-keyword">CREATE</span> SKILL sentiment_analysis_skill
    <span class="hljs-keyword">USING</span>
        <span class="hljs-keyword">type</span> = <span class="hljs-string">'knowledge_base'</span>,
        <span class="hljs-keyword">source</span> = <span class="hljs-string">'my_knowledge_base'</span>,
        description = <span class="hljs-string">'Sentiment Analysis'</span>;
</code></pre>
<p>Above code structure introduces a knowledge base (my_knowledge_base) and a skill (sentiment_analysis_skill) that utilizes the knowledge base. The sentiment analysis model (comment_analyzer) is then associated with the skill in an agent (my_agent).</p>
<h1 id="heading-how-we-tackled-challenges"><strong>🛠 How We Tackled Challenges:</strong></h1>
<p>let's simplify the challenges and how we tackled them:</p>
<h3 id="heading-1-installation-challenge">1. <strong>Installation Challenge :</strong></h3>
<p>Our first challenge was installing MindsDB because the cloud version was down. Docker and pip install didn't work well due to slow internet and low specs. Seeking help in the MindsDB community Discord, we got instant support. Though initial suggestions didn't work, a community member advised installing MindsDB through source by cloning the repo. This method worked for both Linux and Windows systems, overcoming the installation challenge.</p>
<blockquote>
<p>This picture captures the moment when <strong>Tarun</strong>, a helpful community member, assisted us in solving the installation challenge. Although we couldn't capture our direct Zoom meeting with him, this image symbolizes the support and guidance he and other community member provided during the troubleshooting process.</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705211373912/5ddde1cf-3881-46c1-8c70-322e3057e732.jpeg" alt="This is the screenshot of slack which shows how tarun(one of the community member if Mindsdb) helps us)" class="image--center mx-auto" /></p>
<blockquote>
<p>In this picture, Zoran is helping to solve issue related to Mindsdb</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705212367210/7c02e204-2781-487e-b18f-31972b6d9984.jpeg" alt class="image--center mx-auto" /></p>
<h3 id="heading-2-using-graphql-hashnode-api">2. <strong>Using GraphQL hashnode API :</strong></h3>
<p>MindsDB supported YouTube comments but not Hashnode. While exploring contributing to MindsDB for Hashnode integration, we decided to use Hashnode's GraphQL API due to time constraints. The GraphQL API was new to us, so we sought help in the Hashnode Discord channel. They provided us with a GraphQL query to fetch data, resolving our issue with using the Hashnode GraphQL API.</p>
<blockquote>
<p>In this Picture, Community member of Hashnode is helping us to use GraphQL hashnode Api</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705212576345/18ce16a5-c244-471d-bd51-1037042de831.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-3-processing-comments-in-batch">3. <strong>Processing comments in batch</strong></h3>
<p>Initially, processing comments one by one was time-consuming, leading to timeouts with the GPT-3.5 turbo model. We requested and received access to the GPT-4 model, but the problem persisted. To enhance efficiency, we decided to process comments in batches of 5. Designing the perfect prompt was crucial, and after testing in the MindsDB GUI editor, we created an effective prompt. This reduced processing time significantly, allowing us to analyze 100 to 200 comments in just 5-6 seconds.</p>
<h1 id="heading-video-crafting-and-presentation">🎥 Video Crafting and Presentation:</h1>
<p>After a month of hard work on our app Apexa, we decided to push our limit and create an awesome video presentation. My friend and I didn't have powerful laptops, but luckily, our friends did, and also had great video editing skills. He even suggested a cool idea for the first part of the video, which you can check out on our YouTube channel.</p>
<p>We borrowed a tripod and a good mobile phone for video recording. Planning our presentation, we created simple scripts for the video. Since my friend and I lived in the same city, we met up at his house to record. It wasn't all smooth sailing; we had to do several re-shoots because our screen recorder crashed and didn't capture high-quality footage. After searching for another recorder, we finally got it right. It took us two days to record the video, and then we sent the clips to our friend <strong>Bishesh</strong>, who worked his magic to edit the video into a simple and creative masterpiece. 🚀</p>
<p>Now, the awesome video is ready for everyone to watch!</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=YLbB1my0-9Y">https://www.youtube.com/watch?v=YLbB1my0-9Y</a></div>
<p> </p>
<p>Let's view the some snapshot's during our video making:</p>
<blockquote>
<p>This picture captures us during a late-night reshoot for our video. Behind those smiles, there's a bit of sadness due to the frustration caused by a crash.</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705213696686/9465adbb-fb09-47ff-a12e-30d822559b32.jpeg" alt class="image--center mx-auto" /></p>
<blockquote>
<p>This snapshot was taken during the editing process.</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705213943727/19a78d50-d045-4485-b91a-6f93eafbfd6b.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-important-links"><strong>🔗 Important Links:</strong></h1>
<ul>
<li><p>🚀 <strong>GitHub</strong>: <a target="_blank" href="https://github.com/rajeshkhadka200/apexa">Click Here</a></p>
</li>
<li><p>🎬 <strong>YouTube</strong>: <a target="_blank" href="https://www.youtube.com/watch?v=YLbB1my0-9Y">Click Here</a></p>
</li>
<li><p>🌐 <strong>Website</strong>: <a target="_blank" href="http://194.195.114.83">Click Here</a> (The MindsDB cloud version is currently unavailable, resulting the main part of website being offline.)</p>
</li>
<li><p>💻 <strong>Mindsdb GUI Editor Code</strong>: <a target="_blank" href="https://github.com/rajeshkhadka200/apexa/blob/main/Editor.md">Click here</a></p>
</li>
</ul>
<h1 id="heading-conclusion"><strong>🎉 Conclusion:</strong></h1>
<p>Overall the hackathon was a great experience for learning. We got to learn about <strong>Minds-db,</strong> generating models, training models, got a kick start on handling <strong>GraphQL</strong> API and learned some better ways to google. And most important of all, we developed a new skill of being patient when our code doesn't work and we don't get any solutions at all. Taking help from the community on discord, Slack and shaping the app. The whole experience was great, and if you haven't tried a hackathon yet, give it a shot now!</p>
]]></content:encoded></item><item><title><![CDATA[A Recap of Hacktoberfest 2023]]></title><description><![CDATA[Unlocking the code: My Journey Through Hacktoberfest 2023, where collaboration meets innovation, challenges become opportunities, and open source unites us all. Let's get started!
Overview🚀
Back in 2022, I was introduced to Hacktoberfest, but being ...]]></description><link>https://blog.utsavbhattarai.info.np/a-recap-of-hacktoberfest-2023</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/a-recap-of-hacktoberfest-2023</guid><category><![CDATA[Open Source]]></category><category><![CDATA[Hacktoberfest2023]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Thu, 09 Nov 2023 12:13:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1699506759259/26996259-23c5-494b-b91a-cd6f86f5fdf0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Unlocking the code: My Journey Through Hacktoberfest 2023, where collaboration meets innovation, challenges become opportunities, and open source unites us all. Let's get started!</p>
<h1 id="heading-overview">Overview🚀</h1>
<p>Back in 2022, I was introduced to <strong>Hacktoberfest</strong>, but being new to open-source and the event itself, I couldn't complete it. However, that initial experience fueled my curiosity, motivating me to dive deeper into open-source and set a goal to conquer Hacktoberfest 2023. That was the spark that ignited my journey. Now that Hacktoberfest 2023 has come to an end, it's time to look back on the adventure I embarked on during this month-long celebration of open-source. In this blog, I'll take you through my experience, the hurdles I had to overcome, the rewards I'm eagerly anticipating, and the invaluable lessons I've gathered along the way.</p>
<h1 id="heading-my-contribution">My contribution 🛠️</h1>
<p>Once October started, I was really excited to join open-source projects and complete Hacktoberfest. Along the way, I discovered some extra events like hacksquad hosted by awesome open-source companies like Novu, Amplication, Appwrite, Hashnode, and Airbyte. What's great is that these events all share the same goal as Hacktoberfest, so any contributions I made in these events counted for Hacktoberfest as well. So, I decided to take on these extra challenges, even though it meant juggling a lot of tasks and dealing with some challenges. I'll explain more about that in this blog.</p>
<p>The event that I participated in the period of Hacktoberfest:</p>
<ol>
<li><p><strong>Main Hacktoberfest</strong></p>
<p> <a target="_blank" href="https://holopin.io/@utsavbhattarai007"><img src="https://holopin.me/utsavbhattarai007" alt="An image of @utsavbhattarai007's Holopin badges, which is a link to view their full Holopin profile" /></a></p>
<p> In the main Hacktoberfest 2023, I had to merge 4 valid pull requests during October. I went above and beyond, merging 10+ pull requests, with a focus on contributions to Novu. As a reward, I had the opportunity to plant a tree, receive a digital Holopin badge, and enjoy various digital rewards.</p>
<blockquote>
<p>💡Know more: <a target="_blank" href="https://hacktoberfest.com/about/">Click here</a></p>
</blockquote>
</li>
<li><p><strong>Novu Hacktoberfest</strong></p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1699519302496/b264ed72-3e31-4c7a-b7c3-c8a7b4a5d22f.png" alt class="image--center mx-auto" /></p>
<p> Novu has organized an awesome event as a celebration of Hacktoberfest, where I needed to merge 3 or 5 pull requests to receive either normal swag or premium swag. I successfully merged 5 pull requests and grabbed the #10 position in the leaderboard, primarily focusing on Novu's documentation.</p>
<blockquote>
<p>💡Know more: <a target="_blank" href="https://novu.co/hacktoberfest/">Click here</a></p>
</blockquote>
</li>
<li><p><strong>Hacksquad</strong></p>
<p> Hacksquad was another fantastic event, jointly organized by 5 to 6 open-source companies to celebrate the Hacktoberfest season of contributions. To participate, we had to merge pull requests in valid repositories with at least 200 stars on GitHub. Unfortunately, our team didn't make it to the top 60 due to various reasons, ending up at position #95.</p>
<blockquote>
<p>💡Know more: <a target="_blank" href="https://www.hacksquad.dev/">Click here</a></p>
</blockquote>
</li>
<li><p><strong>Amplication Hacktoberfest</strong></p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1699518897250/e5f047fe-78f0-41c6-8d5c-37575ee689a8.png" alt class="image--center mx-auto" /></p>
<p> Amplication Hacktoberfest included various events such as plugin development, issue solving, building apps using Amplication as a backend, and documenting the process. The winners had the chance to receive swags like stickers and t-shirts. I built an app called "Snapshot" for capturing high-quality website screenshots and documented the development process through a blog post on <a target="_blank" href="http://dev.to">Dev.to</a>.</p>
<blockquote>
<p>💡Know more: <a target="_blank" href="https://www.hacksquad.dev/">Click here</a></p>
<p>📝 Blog: <a target="_blank" href="https://dev.to/utsavbhattarai007/introducing-snapshot-a-high-quality-screenshot-clicker-2jki">Click here</a></p>
</blockquote>
</li>
<li><p><strong>Hashnode x Airbyte Hackathon</strong></p>
<p> The Hashnode x Airbyte Hackathon required us to contribute to Airbyte by improving connectors or writing quickstart guides for various use cases provided by them. I wrote a quickstart guide and documented it in a blog post, which I shared on Hashnode.</p>
<blockquote>
<p>💡Know more: <a target="_blank" href="https://hashnode.com/hackathons/airbyte">Click here</a></p>
<p>📝 Blog: <a target="_blank" href="https://utsavbhattarai.hashnode.dev/participating-in-the-airbyte-x-hashnode-hackathon-my-story">Click here</a></p>
</blockquote>
</li>
</ol>
<h1 id="heading-challenges">Challenges💥</h1>
<p>Participating occasionally and encountering no challenges make for an uninspiring competition. Indeed, during this time, I confronted several challenges. These challenges include:</p>
<ol>
<li><p><strong>Time Management</strong></p>
<p> Hacktoberfest takes place every October, coinciding with the festive season in Nepal when we celebrate Dashain and Tihar. This cultural celebration, along with my entrance examinations in mid-October, posed a significant time management challenge. It made it difficult for me to allocate time to contribute to open-source projects and led to me missing out on many events. The time constraint also played a role in our team's inability to secure the #60 position in Hacksquad.</p>
</li>
<li><p><strong>Technical Complexity</strong></p>
<p> Many open-source projects are technically complex, with intricate code structures and specialized knowledge requirements. Understanding these codebases, identifying suitable issues, and making meaningful contributions often proved to be challenging, requiring a steep learning curve.</p>
</li>
<li><p><strong>Feedback and Rejections</strong></p>
<p> Dealing with feedback on my pull requests, as well as the occasional rejection, was emotionally taxing. It required me to build resilience and learn from feedback constructively to improve my contributions.</p>
</li>
</ol>
<h1 id="heading-rewards-amp-excitement">Rewards &amp; Excitement 🎁</h1>
<p>As a developer, we really like swag. Swag is the cool stuff that motivates us and feels like a prize for our hard work. I won some swag during Hacktoberfest, and even though it's not a lot, it means a bunch to me. Here's what I earned from different side events:</p>
<ol>
<li><p>I merged 5 pull requests in the Novu project, and that means I get the chance to win some awesome premium swag.</p>
</li>
<li><p>I built an app using Amplication as a backend, so I'm eligible for a premium Amplication t-shirt.</p>
</li>
<li><p>I merged a quickstart, and that gave me some credits for swag. I'm planning to use these credits to get some cool stuff from the swag store.</p>
</li>
</ol>
<h1 id="heading-connecting-with-the-community">Connecting with the Community 👥</h1>
<p>Speaking for myself, I used to be quite shy and didn't talk much to others. But during this Hacktoberfest, I managed to conquer my shyness. I joined different Discord channels and began talking to many amazing people. I wasn't afraid to reach out through text messages or even in virtual meetings to ask for help and share my thoughts. This was a big achievement for me because I learned to share my ideas and make use of the knowledge that others were willing to share</p>
<h1 id="heading-lessons-learned">Lessons Learned 🧠</h1>
<ul>
<li><p><strong>Persistence pays off</strong>: Facing challenges head-on and staying dedicated leads to well-deserved rewards.</p>
</li>
<li><p><strong>Open source is a team effort</strong>: The warm community and the willingness to support each other are both heartening and motivating.</p>
</li>
<li><p><strong>Never stop learning</strong>: Every contribution is a chance to improve skills and gain new knowledge.</p>
</li>
<li><p><strong>Time management is key</strong>: Balancing multiple responsibilities is essential for a successful Hacktoberfest journey.</p>
</li>
<li><p><strong>Feedback is a friend</strong>: Constructive criticism is an opportunity for growth, both as a developer and a contributor.</p>
</li>
<li><p><strong>Mastering Git and GitHub</strong>: I've also acquired advanced skills in using Git and GitHub, which has been a valuable addition to my toolkit.</p>
</li>
</ul>
<h1 id="heading-conclusion">Conclusion 🌅</h1>
<p>Hacktoberfest 2023 has been a remarkable journey, filled with challenges, rewards, and personal growth. It's reaffirmed the power of persistence, community collaboration, and the joy of continuous learning. As I look back on this adventure, I'm not just a contributor; I'm part of a global community that thrives on open source. With new skills, friendships, and experiences in hand, I eagerly anticipate the next Hacktoberfest and the continued exploration of the world of open-source.</p>
]]></content:encoded></item><item><title><![CDATA[Participating in the Airbyte x Hashnode Hackathon: My Story]]></title><description><![CDATA[Overview
Just 30 days ago, I was introduced to the dynamic collaboration between Airbyte and Hashnode. This hackathon stood out from the typical ones organized by Hashnode over the years. Unlike the conventional hackathons focused on building product...]]></description><link>https://blog.utsavbhattarai.info.np/participating-in-the-airbyte-x-hashnode-hackathon-my-story</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/participating-in-the-airbyte-x-hashnode-hackathon-my-story</guid><category><![CDATA[#AirbyteHackathon ]]></category><category><![CDATA[airbyte ]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Thu, 02 Nov 2023 13:33:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1698931948454/006ea67d-40eb-4c21-ace0-84ea71282b0c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-overview">Overview</h1>
<p>Just 30 days ago, I was introduced to the dynamic collaboration between Airbyte and Hashnode. This hackathon stood out from the typical ones organized by Hashnode over the years. Unlike the conventional hackathons focused on building products with specific tech stacks, this unique event aligned perfectly with Hacktoberfest. It was all about enhancing connectors and crafting quickstart guides for Airbyte, with participants contributing through pull requests.</p>
<h1 id="heading-about-airbyte">About Airbyte</h1>
<p><a target="_blank" href="https://airbyte.com/">Airbyte</a>, a leading open-source data integration platform, excels in effortlessly syncing data from diverse sources (APIs, databases, files) to chosen destinations like data warehouses and lakes. It stands out with 350+ connectors and a robust community focus. Notably, its extensibility offers versatile data integration solutions.</p>
<blockquote>
<p>💡Know more: <a target="_blank" href="https://docs.airbyte.com/">Click here</a></p>
</blockquote>
<h1 id="heading-tools-i-use">Tools I use</h1>
<p>In the hackathon, I felt confident in my ability to create effective quickstart guides, and to address the unique challenges that came my way, I made use of a range of tools:</p>
<h2 id="heading-1-terraform">1. Terraform</h2>
<p><a target="_blank" href="https://www.terraform.io/">Terraform</a> is a versatile infrastructure as code (IaC) tool that automates the provisioning and management of cloud resources, offering simplicity and flexibility in infrastructure management.</p>
<h2 id="heading-2-bigquery">2. BigQuery</h2>
<p><a target="_blank" href="https://cloud.google.com/bigquery/docs/introduction">BigQuery</a> is Google Cloud's serverless data warehouse and analytics platform, ideal for handling large-scale data analysis. It offers fast query performance, scalability, and seamless integration with other Google Cloud services, making it a valuable tool for data-driven insights and decision-making.</p>
<h2 id="heading-3-dbt">3. Dbt</h2>
<p><a target="_blank" href="https://www.getdbt.com/">dbt</a> (data build tool) is a transformative data transformation and modeling tool. It helps data professionals easily transform and structure data for analytics, making it ready for querying in databases.</p>
<h1 id="heading-my-contribution">My contribution</h1>
<p>In the hackathon, I dedicated my efforts to quickstart development, resulting in two valuable contributions:</p>
<h2 id="heading-github-insights-stack-merged"><strong>GitHub Insights Stack (Merged)</strong></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698857868849/93b5870b-b97e-4051-aa53-1b3c412e72d7.png" alt class="image--center mx-auto" /></p>
<p>This quickstart offers a seamless setup for a data stack using Airbyte, dbt, and the GitHub API. It allows you to extract the GitHub repository, commit, and pull request data, perform transformations, and gain insights into code quality, collaboration, and project health.</p>
<blockquote>
<p>💡Learn more: <a target="_blank" href="https://github.com/airbytehq/quickstarts/tree/main/github_insight_stack">Click here</a></p>
</blockquote>
<h2 id="heading-performance-optimization-stack-in-progress"><strong>Performance Optimization Stack (In Progress)</strong></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1698857903960/fdc21838-3208-4382-b49d-94c067e9fc47.png" alt class="image--center mx-auto" /></p>
<p>While this quickstart isn't complete due to limitations with Airbyte and Datadog integration, it aims to guide users through setting up smooth data integration between Datadog, Airbyte, and dbt. The goal is to extract performance metrics and logs from Datadog with Airbyte, then use dbt to transform and analyze the data for optimizing system performance and resource utilization.</p>
<blockquote>
<p>💡Learn more: <a target="_blank" href="https://github.com/airbytehq/quickstarts/pull/58">Click here</a> (pull request)</p>
</blockquote>
<h1 id="heading-challenges">Challenges</h1>
<ul>
<li><p><strong>Learning Curve:</strong> When I started in data engineering, I had to begin from scratch, which was tough. To overcome this, I spent time learning and practicing, gradually building my knowledge.</p>
</li>
<li><p><strong>Problem-Solving:</strong> Making the quickstarts required solving problems. I did this by taking a step-by-step approach, asking for help when needed, and using what I'd learned.</p>
</li>
<li><p><strong>Time Constraints:</strong> The hackathon had time limits, and I was still learning. To manage this, I learned how to use my time wisely, focus on important tasks, and use available resources effectively.</p>
</li>
<li><p><strong>Integration Limitations:</strong> While working on the second quickstart, I faced issues with connecting Airbyte and Datadog. Sadly, I won't be able to complete it due to my exam and time limitation.</p>
</li>
</ul>
<h1 id="heading-conclusion">Conclusion</h1>
<p>In conclusion, my journey as a beginner in data engineering was a path filled with challenges that I actively embraced and overcame. These experiences reflect my dedication to learning and my ability to tackle obstacles in the ever-evolving field of data engineering.</p>
]]></content:encoded></item><item><title><![CDATA[🌍Introducing Devhub: Uniting Coders, Catalyzing Innovation!]]></title><description><![CDATA[Devhub - Appwrite X Hashnode
In the fast-paced world of technology, developers constantly seek ways to connect, collaborate, and stay up-to-date with the latest trends. That's where DevHub comes in. DevHub is a dynamic web application designed to bri...]]></description><link>https://blog.utsavbhattarai.info.np/introducing-devhub-uniting-coders-catalyzing-innovation</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/introducing-devhub-uniting-coders-catalyzing-innovation</guid><category><![CDATA[Appwrite]]></category><category><![CDATA[Appwrite Hackathon]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Tue, 13 Jun 2023 13:06:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660029097/9ec89abc-1a96-48d4-8e62-501d4f22e273.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-devhub-appwritehttpscloudappwriteio-x-hashnodehttpshashnodecom">Devhub - <a target="_blank" href="https://cloud.appwrite.io">Appwrite</a> X <a target="_blank" href="https://hashnode.com">Hashnode</a></h1>
<p>In the fast-paced world of technology, developers constantly seek ways to connect, collaborate, and stay up-to-date with the latest trends. That's where DevHub comes in. DevHub is a dynamic web application designed to bridge the gap between developers, providing a platform for them to connect, showcase their work, and explore exciting hackathons. Developed as part of the <a target="_blank" href="https://appwrite.io/"><strong>Appwrite</strong></a> <strong>X</strong> <a target="_blank" href="https://hashnode.com/"><strong>Hashnode</strong></a> Hackathon, I am thrilled to introduce DevHub and share the story behind its creation.</p>
<h1 id="heading-team-details">Team details</h1>
<p>Prepare to be amazed by the solo mastery of its creator—me! Witness the extraordinary capabilities of DevHub, a coding marvel born from my singular vision and unwavering passion. Join me as we revolutionize the developer landscape and unleash the true potential of every coder.</p>
<ul>
<li><p>GitHub: <a target="_blank" href="http://github.com/utsavbhattarai007">utsavbhattarai007</a></p>
</li>
<li><p>Hashnode: <a class="user-mention" href="https://hashnode.com/@utsavbhattarai">Utsav bhattarai</a></p>
</li>
</ul>
<h1 id="heading-description-of-project"><strong>Description of Project</strong></h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660050524/f91cb44f-99e7-4406-8208-a0d94d986f7c.png" alt class="image--center mx-auto" /></p>
<p>DevHub is more than just a social networking platform for developers—it's a hub of innovation and knowledge-sharing. With its intuitive interface inspired by Twitter, DevHub allows developers to connect, engage, and share their insights within a supportive community. The platform facilitates seamless communication through features like <mark>tweeting, retweeting</mark> and creating a sense of unity and collaboration.</p>
<p>But DevHub doesn't stop at fostering connections. <mark>It goes a step further by curating and displaying popular tech blog posts from around the internet</mark>, ensuring developers are always up-to-date with the latest industry trends and <mark>it also helps to get info about the ongoing hackathons around the globe</mark>. lastly, These things help the developer to expand their reach and build their online presence effortlessly.</p>
<h1 id="heading-tech-stack">Tech Stack</h1>
<p>The tech stack for DevHub comprises several powerful technologies and frameworks that work together seamlessly to deliver a robust and engaging web application. Here are the key components of the tech stack:</p>
<ul>
<li><p>Frontend:</p>
<ul>
<li><strong>React JS:</strong> A popular JavaScript library for building user interfaces, offering a component-based approach and efficient rendering.</li>
</ul>
</li>
<li><p>Backend:</p>
<ul>
<li><strong>Node.js</strong>: A JavaScript runtime built on Chrome's V8 engine, enabling server-side development with JavaScript.</li>
</ul>
</li>
<li><p>Appwrite Cloud Services:</p>
<ul>
<li><p><strong>Database</strong>: Appwrite's database service provides a secure and scalable solution for storing and retrieving data.</p>
</li>
<li><p><strong>Authentication</strong>: Appwrite's authentication service handles user authentication and security, ensuring secure access to DevHub's features.</p>
</li>
<li><p><strong>Functions</strong>: Appwrite's serverless functions enable the execution of custom logic and backend operations, enhancing the platform's capabilities. In Devhub, This service is used for crawling blog posts and hackathons around the globe.</p>
</li>
<li><p><strong>Storage</strong>: Appwrite's storage service allows efficient and reliable file storage and retrieval, supporting various media types. This services is used to store the image of devits(Devhub's post).</p>
</li>
</ul>
</li>
</ul>
<p>This tech stack combination provides a solid foundation for DevHub, enabling efficient frontend development with React JS, seamless server-side implementation with Node.js and Express, and leveraging Appwrite's cloud services for database management, authentication, custom functions, and storage operations.</p>
<h1 id="heading-why-appwrite">Why Appwrite?</h1>
<p>In reality, I first heard about Appwrite several months ago and was intrigued to learn more about it. However, as a student, I found it challenging to balance my studies with exploring Appwrite. I patiently waited for an opportunity, and finally, after completing my 12th standard exams, I discovered the Appwrite hackathon on Hashnode. This motivated me to dive into learning Appwrite and create some amazing projects.</p>
<p>During my free time, I dedicated myself to researching Appwrite. Initially, I was uncertain about how to set up, configure, and work with Appwrite on my local system using Docker. Fortunately, Appwrite released its cloud infrastructure, which made the setup and usage much easier and I also love the Appwrite cloud card:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660114880/1db54697-1fce-406d-841c-753fffbbf45d.png" alt class="image--center mx-auto" /></p>
<p>Once I started learning Appwrite Cloud, I was fascinated by how seamlessly it provided awesome features. My goal was to build a platform for developers to connect, share, and collaborate. Appwrite turned out to be the perfect backend tech stack for this project. It offers user-friendly authentication methods, including a wide range of social media login platforms. Additionally, the fast and efficient database, where data is stored as collections, along with the Appwrite Functions and bucket storage services, captured my attention. These services were incredibly easy to use and provided outstanding performance. Choosing Appwrite was the best option to transform my idea into a real-world project.</p>
<h1 id="heading-quick-look">Quick look</h1>
<ul>
<li><p>Home page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660003499/7e4ad3a8-f525-4c44-ad39-ec9984eb1023.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Discover page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660018775/04c47494-6300-482f-979c-118862a447e1.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Hackathons Page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660204340/3f245555-39dd-4120-ae10-b2c43ed3d26e.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Blogs page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660213216/a81f6c77-f748-4772-a987-df9e13ba86ba.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Profile Page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660238342/6d558c0c-4180-42e6-aecc-e8f56fb623dd.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Setting Page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660253085/1f94a39e-8c01-4da2-a98c-0c4813f3a785.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Specific Post Page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686660305736/7457f6a8-6372-4cba-905a-0d8570fb4db0.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Login Page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686732573041/aa6224e5-2d44-4e92-be54-c2a8b151167d.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Profile complete page</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686732824748/4638e429-9b8f-4de5-bafd-bfb174de35fb.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<h1 id="heading-how-i-used-appwrite">How I used Appwrite?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686661253618/9fc4fcae-2b0a-49be-b65d-d30965c3b0b0.png" alt class="image--center mx-auto" /></p>
<p>I utilized nearly all of Appwrite's features, tailoring them to meet my specific needs and objectives. Features that I used are as follows:</p>
<h3 id="heading-1-database">1. Database</h3>
<p>In my project, I utilized the database service provided by Appwrite to store various types of data, such as user information, devits (devhub posts), hackathons, and blogs. To configure Appwrite in my React Vite project, I used this command:</p>
<pre><code class="lang-bash">appwrite init
</code></pre>
<p>In the file named "appwriteConfig.js," I imported the necessary services from the Appwrite library, including Client, Account, Databases, and Storage.</p>
<p>Here's a simplified version of the code:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { Client, Account, Databases, Storage } <span class="hljs-keyword">from</span> <span class="hljs-string">"appwrite"</span>;

<span class="hljs-keyword">const</span> client = <span class="hljs-keyword">new</span> Client();
client
  .setEndpoint(<span class="hljs-string">"https://cloud.appwrite.io/v1"</span>) <span class="hljs-comment">// API Endpoint</span>
  .setProject(<span class="hljs-string">"PROJECT ID"</span>); <span class="hljs-comment">// Project ID</span>

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> account = <span class="hljs-keyword">new</span> Account(client);
<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> storage = <span class="hljs-keyword">new</span> Storage(client);
<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> database = <span class="hljs-keyword">new</span> Databases(client, <span class="hljs-string">"DATABASE ID"</span>);
</code></pre>
<p>For performing CRUD operations, I made use of the Appwrite database's different methods. Here's a simplified example:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { database } <span class="hljs-keyword">from</span> <span class="hljs-string">"../appwrite/appwriteConfig"</span>;

<span class="hljs-keyword">const</span> methods = <span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> database.createDocument(<span class="hljs-string">"DATABASE ID"</span>, <span class="hljs-string">"COLLECTION ID"</span>, uniqueid, {
    <span class="hljs-comment">// data</span>
  });

  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> database.listDocuments(<span class="hljs-string">"DATABASE ID"</span>, <span class="hljs-string">"COLLECTION ID"</span>, [
    <span class="hljs-comment">// query to fetch data</span>
  ]);

  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> database.updateDocument(<span class="hljs-string">"DATABASE ID"</span>, <span class="hljs-string">"COLLECTION ID"</span>, <span class="hljs-string">"DATA ID"</span>, {
    <span class="hljs-comment">// updated data</span>
  });

  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> database.deleteDocument(<span class="hljs-string">"DATABASE ID"</span>, <span class="hljs-string">"COLLECTION ID"</span>, <span class="hljs-string">"DATA ID"</span>);
};
</code></pre>
<p>Note: The code provided is a simplified representation and may require additional implementation details for real-world execution. For more comprehensive code examples, you can refer to the Appwrite documentation or visit my <a target="_blank" href="https://github.com/utsavbhattarai007/devhub-with-appwrite">GitHub repository.</a></p>
<h3 id="heading-2-authentication">2. Authentication</h3>
<p>To enable social media login authentication using Google in Appwrite's Devhub, you need to set up Google authentication in Appwrite by creating a Google Console project and configuring the OAuth Client ID. Appwrite will provide you with a redirect URL that you'll need to add to the Google Credentials page.</p>
<p>Here's an example of how you can set up Google authentication in the frontend:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { account } <span class="hljs-keyword">from</span> <span class="hljs-string">"../appwrite/appwriteConfig"</span>;

<span class="hljs-keyword">const</span> googleSignin = <span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> account.createOAUTH2Session(
    <span class="hljs-string">"google"</span>,
    <span class="hljs-string">"SUCCESS REDIRECT URL"</span>,
    <span class="hljs-string">"FAILURE REDIRECT URL"</span>
  );
};
</code></pre>
<p>In the <code>googleSignin</code> function, you can call <code>account.createOAUTH2Session</code> with the <code>"google"</code> provider to initiate the Google authentication flow. Replace the "SUCCESS REDIRECT URL" and "FAILURE REDIRECT URL" with the appropriate URLs according to your project.</p>
<h3 id="heading-3-function">3. Function</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686661335135/c3b59aad-8f9d-4f20-bc0f-3d6f7e99c3b2.png" alt class="image--center mx-auto" /></p>
<p>In my project, I leveraged the Appwrite Function services to crawl popular blogs from Hashnode and the latest hackathons from Devpost. I then updated the respective collections for blogs and hackathons.</p>
<p>To begin, I initialized the Appwrite Function by executing the command:</p>
<pre><code class="lang-bash">appwrite init <span class="hljs-keyword">function</span>
</code></pre>
<p>Following that, I wrote the necessary code to crawl the hackathons and blogs from Devpost and Hashnode. Once the code was complete, I deployed it using the command:</p>
<pre><code class="lang-bash">appwrite deploy <span class="hljs-keyword">function</span>
</code></pre>
<p>This allowed the function to be live and operational, enabling the crawling and updating of the blogs and hackathons collections.</p>
<p>This is the execution of hackathons crawler:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686661377646/d4d9db59-6ca9-4ea3-9e62-584ac360b92e.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-4-storage">4. Storage</h3>
<p>In this project, I utilized the Storage service provided by Appwrite to store images from Devits (Devhub's posts). Here's an example of how the Storage service can be used:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { storage } <span class="hljs-keyword">from</span> <span class="hljs-string">"../appwrite/appwriteConfig"</span>;

<span class="hljs-keyword">const</span> uploadImg = <span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> storage.createFile(<span class="hljs-string">'[STORAGE BUCKET ID]'</span>, <span class="hljs-string">'[UNIQUE ID]'</span>, [FILE]);

  <span class="hljs-comment">// To preview and retrieve the image URL, you can use the following:</span>
  <span class="hljs-keyword">const</span> imgUrl = <span class="hljs-keyword">await</span> storage.getFilePreview(<span class="hljs-string">'[BUCKET ID]'</span>, res.$id);
};
</code></pre>
<p>By calling the <code>uploadImg</code> function, you can upload an image to the specified storage bucket using the <code>storage.createFile</code> method. Replace <code>[STORAGE BUCKET ID]</code> with the appropriate ID of the storage bucket provided by appwrite. Also, replace <code>[UNIQUE ID]</code> with a unique identifier for the image, and <code>[FILE]</code> should be replaced with the actual file object or data.</p>
<p>To preview and retrieve the URL of the uploaded image, you can use the <code>storage.getFilePreview</code> method, passing the <code>[BUCKET ID]</code> and the unique ID of the uploaded image (<code>res.$id</code>) as parameters.</p>
<h1 id="heading-challenges-i-faced">Challenges I faced</h1>
<p>As a first-time user of Appwrite, I faced numerous challenges while building my real-world project with it. While working with React.js for the frontend, I encountered relatively fewer challenges since I was already familiar with it. However, when it came to using Appwrite, I faced several difficulties and obstacles. Some of the major challenges are as follows:</p>
<ol>
<li><p>Designing Theme: I struggled with deciding on a suitable theme for my project's design. Eventually, I chose to adopt a Twitter-like design with some modifications to create the Devhub interface.</p>
</li>
<li><p>Querying Documents: I encountered a major challenge while querying documents using Appwrite. After a considerable amount of brainstorming, I realized that I had forgotten to create an index for the collection I was querying. This oversight caused a significant delay in progress as I spent half a day rectifying the issue.</p>
</li>
<li><p>Array of Objects: Another challenge arose when I needed to store an attribute as an array of objects, which was not directly supported by Appwrite. Seeking assistance in the Appwrite Discord server, I received help from a mentor who suggested converting the attribute to a string array and pushing the object as a string. This workaround resolved the issue.</p>
</li>
<li><p>Hosting and Authentication: Upon hosting my frontend, I encountered authentication errors that were not present during local development. Seeking guidance in the Appwrite community, a mentor identified the problem. It turned out that I had forgotten to properly set up the platform in Appwrite, which caused the authentication issues. Once the setup was correctly configured, the problem was resolved.</p>
</li>
</ol>
<p>Despite these challenges, the support from the Appwrite community and mentors proved invaluable in finding solutions and overcoming the obstacles faced during the development process.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686732371521/a6d2b057-127c-404e-8848-93aa96c24f48.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>PS: Appwrite Mentor helping to solve the issue</p>
</blockquote>
<p>Despite these challenges, I was able to overcome them by learning from the experience and implementing appropriate solutions.</p>
<h1 id="heading-important-links">Important Links</h1>
<h4 id="heading-github-repo-click-herehttpsgithubcomutsavbhattarai007devhub-with-appwrite"><strong>Github Repo</strong>: <a target="_blank" href="https://github.com/utsavbhattarai007/devhub-with-appwrite">Click here</a></h4>
<h4 id="heading-website-link-click-herehttpsdevhubstech"><strong>Website Link</strong>: <a target="_blank" href="https://devhubs.tech">Click here</a></h4>
<h1 id="heading-demo-credentials">Demo Credentials</h1>
<blockquote>
<p>Only for Hashnode and Appwrite team. Normal user can sign in with google.</p>
</blockquote>
<ul>
<li><p>Email: demo007@gmail.com</p>
</li>
<li><p>Password: demo1234</p>
</li>
</ul>
<h1 id="heading-conclusion">Conclusion</h1>
<p>In conclusion, building a real-world project with Appwrite and integrating it into a React.js frontend was a valuable learning experience. Despite facing various challenges along the way, such as designing the theme, querying documents, handling an array of objects, and resolving authentication issues during hosting, I was able to overcome these obstacles with the help of the supportive Appwrite community and mentors.</p>
<p>I am grateful for the resources and opportunities provided by Hashnode and Appwrite. Hashnode's platform enabled me to stay updated and engaged with the developer community, while Appwrite's powerful backend services simplified the development process and provided essential features like authentication, database management, storage, and functions.</p>
<p>I would like to express my sincere appreciation to both Hashnode and Appwrite for their continuous support, documentation, and the incredible communities they have fostered. The knowledge and experience gained through this project have undoubtedly been invaluable to my growth as a developer.</p>
<p>Thank you, <a target="_blank" href="https://hashnode.com">Hashnode</a> and <a target="_blank" href="https://appwrite.io">Appwrite</a>, for this awesome event.</p>
]]></content:encoded></item><item><title><![CDATA[Code Warriors Unite: Conquering Bugs at the Offline Hackathon]]></title><description><![CDATA[Overview⚡
Developers, get ready to buckle up! Attending an offline hackathon that's 340 miles away doesn't happen every day. However, as I navigated through the winding roads and unexpected detours, I stumbled upon some surprising discoveries. From t...]]></description><link>https://blog.utsavbhattarai.info.np/code-warriors-unite-conquering-bugs-at-the-offline-hackathon</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/code-warriors-unite-conquering-bugs-at-the-offline-hackathon</guid><category><![CDATA[DebuggingFeb]]></category><category><![CDATA[hackathon]]></category><category><![CDATA[Bugs and Errors]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Fri, 10 Mar 2023 17:30:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1678384508577/c877db39-9be3-4d8d-a835-3e188eafa423.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-overview">Overview⚡</h1>
<p>Developers, get ready to buckle up! <mark>Attending an offline hackathon that's 340 miles away doesn't happen every day</mark>. However, as I navigated through the winding roads and unexpected detours, I stumbled upon some surprising discoveries. From the valuable skill of debugging to the benefits of working together as a team, this adventure had it all. So, fasten your seatbelts and relax because things are about to get exciting!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1678457210368/9bcd8b8d-d469-4a5b-96e4-9b9a0a056d8b.gif" alt class="image--center mx-auto" /></p>
<h2 id="heading-background">Background</h2>
<p>So, over the weekend, my buddies and I stumbled upon a three-day hackathon that seemed like the perfect opportunity to take a break from college. We were so excited to participate that we immediately filled out the application and eagerly awaited the results. The thought of being a part of the hackathon was super exciting, and we couldn't wait to see what was in store for us. Unfortunately, we were not selected this time. But hey, there's always next time, right?</p>
<p>So, We refused to lose hope. Fortunately, we discovered another opportunity - an offline hackathon in Dharan, which was 340 miles away from our base in Butwal. At first, we were hesitant about undertaking such a long journey, but after discussing it with our friends, we decided to go for it. Our determination and openness to new possibilities paid off, as we were able to participate in the hackathon and it turned out to be a life-changing experience for us.</p>
<h2 id="heading-the-journey-of-340-miles">The Journey of 340 miles</h2>
<p>We started our journey early in the morning, boarding a bus in Butwal. As we departed, I felt excitement and anticipation. I was prepared for anything that lay ahead. The stunning scenery of Nepal's hills and valleys captivated me. Each view was more breathtaking than the last, from towering mountains to lush forests. However, the journey was not without obstacles, such as unexpected delays and bumpy roads.</p>
<p>Despite these setbacks, we persevered, driven by our <strong>commitment</strong> to our goal. Finally, we arrived in Dharan, feeling proud and accomplished. We had journeyed 340 miles from Butwal and emerged stronger, wiser, and more determined than ever before.</p>
<h2 id="heading-some-snaps">Some Snaps📸</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1678466866169/84ab08fa-157e-4452-ae1c-f7ae227948de.gif" alt class="image--center mx-auto" /></p>
<h1 id="heading-the-preparation">The Preparation👨‍💻</h1>
<p>As soon as we arrived in Dharan, our organizer greeted us warmly and gave us a brief tour of the <strong>Purwanchal Engineering Campus</strong>. After that, they kindly offered to take us to a nearby hotel for a much-needed meal. When we had finished eating, we headed to the homestay where we would be staying for the next three days. The homestay was located in a picturesque area surrounded by verdant forests and exuded a calm and peaceful atmosphere, providing a perfect escape from the hustle and bustle of the outside world. In this way, we've just wrapped up day one!</p>
<h2 id="heading-refreshing-mindset">Refreshing Mindset</h2>
<p>Our time at the homestay was so refreshing! We had a blast playing around in the gorgeous park and taking in all the greenery. We also went out and checked out the lively streets of Dharan, hitting up the temple and clock tower, and of course, snapping some cool pics for our Insta😂.</p>
<p>When hunger struck, we stumbled upon a cafe named <strong>Circle Cafe</strong> that didn't look like much from the outside, but once inside, we were greeted with a beautifully designed interior that left us in awe. We savored some of the national favorite momos, which were every bit as delicious, Overall, our refreshing mindset was a much-needed escape from the monotony of daily life, and left us feeling reinvigorated and ready to take on whatever came our way.</p>
<h2 id="heading-collaborating-with-teammates">Collaborating with teammates</h2>
<p>With our minds and bodies feeling rejuvenated, we were ready to tackle the upcoming hackathon. On day 2 Night, We gathered together to brainstorm strategies, ideas, and approaches, collaborating to determine the most effective course of action for the competition. Based on each individual's strengths and skills, we divided tasks, including designing, presenting, and coding, to work seamlessly together. We felt confident in achieving our shared goals and emerging victorious in the hackathon.</p>
<h2 id="heading-preparing-the-resources">Preparing the resources</h2>
<p>To gear up for the hackathon, we choose <mark>MERN tech stack</mark> to develop our web app. Since it's a familiar and dependable choice for our team, it was an obvious choice. For an attractive and user-friendly interface, we picked Figma to aid the design process. We took great care to make sure we had all the essential tools and resources ready for the competition, so we could tackle any obstacles that came our way. Furthermore, we dedicated ourselves to improving our respective skills, to produce a winning solution for the hackathon.</p>
<h2 id="heading-some-snaps-1">Some Snaps📸</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1678468740644/9abbf7c1-ead7-41bb-9c39-f2426d7e4cf6.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-the-battle">The Battle⚒️</h1>
<p>We were filled with excitement and anticipation as Day 3 approached, and we headed to the ERC(Engineering College) for the much-awaited hackathon. After a helpful orientation session, we were ready for the Github workshop, but as seasoned Github users, we decided to skip it and focus on our project in the hackathon room for the next 24 hours. Our passion and determination fueled us as we worked tirelessly to develop a solution that would have a meaningful impact.</p>
<blockquote>
<p>😂Here's a fun fact: During the observation session, we were introduced to the various teams. The organizer took the time to introduce each team by their unique names, such as Stackunderflow, Margin Top, Team Enigma, Team Trinity, and more. Finally, our team was introduced as Team Haskmukh, which means "<mark>Happy Mood</mark>".</p>
</blockquote>
<h2 id="heading-crafting-the-project">Crafting the Project</h2>
<p>The hackathon kicked off with the sweet aroma of freshly brewed coffee, heightening our excitement for network connectivity and track selection. After evaluating options like Health Sector, IOT, Tourism, and Agriculture, we unanimously chose Health Sector and got straight to brainstorming ideas. Fortunately, we had already spent the previous night mulling over potential concepts and had settled on <mark>the idea of centralizing medical reports for easy access</mark>. Fueled by our collective passion and enthusiasm, we dove into our tasks with gusto. While I focused on coding the front end, my teammates utilized their respective skills and expertise to tackle their responsibilities.</p>
<h2 id="heading-the-first-encounter-with-the-bug">The first encounter with the bug</h2>
<p>As we embarked on our project with a tight 24-hour deadline, we faced numerous bugs and errors that threatened to impede our progress. Our first bug emerged on the backend while creating an endpoint, where we couldn't post JSON data in the express server. Luckily, I had dealt with a similar issue in a previous project and quickly resolved it by</p>
<pre><code class="lang-javascript">app.use(express.json());
</code></pre>
<p>However, as I shifted my attention to the front end, I was constantly confronted with frustrating padding and margin bugs. We faced various challenges, but our determination to succeed never wavered. We tackled each obstacle as it came, driven by our unwavering passion.</p>
<h2 id="heading-overcoming-the-obstacles">Overcoming the obstacles</h2>
<p>We were having an absolute blast at the hackathon! We savored our amazing coffee, indulged in a scrumptious lunch, and then relished a delightful dinner. While coding our project, we encountered small bugs and errors, but we tackled them with ease. As we continued coding, we realized that we were almost done with our project - how exciting! With only a few hours left before the deadline, we decided to go above and beyond by adding some extra features. The energy was electric as we worked diligently, and we couldn't wait to finally complete our masterpiece!</p>
<p>We hosted the backend and front end of our app on a Linode server, and after some struggles, we were finally able to get our app hosted. However, our joy was short-lived when <mark>we were hit with a DOS attack just two hours before the deadline</mark>. Panic set in as we saw that our server was down, but we refused to give up. We quickly created a new server and hosted our app, and took steps to prevent future attacks by researching how to secure our server.</p>
<p>After overcoming this hurdle, we relaxed and I took the time to write a blog about our experience. But just as we were starting to wind down, we faced another obstacle. <mark>Our backend server crashed</mark>, and with only 30 minutes left before the submission deadline, we started to panic once again. We searched for a solution but couldn't find one, so we decided to set up a local server to showcase our app. I was confident that I could solve the issue, so I began googling while my friend set up the local server. I was eventually able to reset the Linode server and host our app with the latest package, which solved the problem unexpectedly.</p>
<p>Despite these challenges, we were able to overcome them through teamwork, determination, and resourcefulness. We were proud of what we had accomplished and learned from the experience. We knew that we could handle whatever challenges came our way in the future.</p>
<h2 id="heading-some-snaps-2">Some Snaps📸</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1678468243588/f1765c5f-e785-4a5f-84f9-dfb9fe42afd1.gif" alt class="image--center mx-auto" /></p>
<h1 id="heading-the-victory">The Victory🏆</h1>
<h2 id="heading-showcase-of-project">Showcase of Project</h2>
<p>After hours of debugging, our project was running smoothly on the server. It was a great moment for our team as we had put a lot of effort and dedication into it. Now, our biggest challenge was showcasing it creatively to the judges, highlighting its unique features and demonstrating its usefulness. We were determined to do our best and show the judges what we were capable of.</p>
<p>The moment finally arrived when the judges came to see our presentation. I was nervous about presenting, so I decided to back up my friend who had better presentation skills. We had prepared a PowerPoint presentation and a short video about our project. When it was time to present, my friend started by introducing our project and explaining its usefulness, while I backed him up with additional information. The judges asked us some cross-questions, but we were well-prepared and provided satisfactory answers. In the end, the judges appreciated our efforts and dedication, and we finished our presentation feeling accomplished and proud of what we had achieved.</p>
<h2 id="heading-success-in-the-competition">Success in the competition</h2>
<p>On the eve of the <strong>Deltathon(</strong>Hackathon theme name<strong>)</strong> closing ceremony, we were brimming with excitement and anticipation. We decided to spend our last few hours before the results announcement by heading out to Dharan's streets. Our destination was a cozy spot, the <strong>Circle Cafe</strong>, that we stumbled upon earlier. A friend, who was a little bit professional chef, took charge of ordering our dinner dishes, promising us a feast for our taste buds. While we waited for our food to arrive, we engaged in friendly games of ludo and chess by the bonfire. The aroma of our food soon wafted towards us, and we eagerly dug in, savoring the flavors of the dishes. After dinner, we leisurely strolled through the night streets of Dharan, taking in the city's ambiance before returning to our homestay.</p>
<p>The next day, the closing ceremony was scheduled for midday, giving us enough time to explore more of Dharan more before the big event. We visited several places, marveling at the beauty and culture of the city. As the time for the announcement of the results drew closer, we could feel our nerves building up. Our hearts raced with anticipation as we waited for our team's name to be called. The results were announced in descending order, and we were relieved to find that our team was not on the bottom list. However, our hopes of winning were almost dashed until the final moment when <mark>our team was declared the winner</mark>. We jump from our seats, overcome with joy and excitement, and rushed to the stage to receive our prize and trophy. The custom-made trophy was a work of art and a testament to our team's hard work and dedication. The happiness and pride we felt at that moment were indescribable. We clicked countless photos, capturing the memories of this unforgettable experience, and shared them on social media, basking in the glory of our victory. We had conquered the event and emerged victorious, our hearts brimming with gratitude and pride.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/utsabdev/status/1616775617701371907">https://twitter.com/utsabdev/status/1616775617701371907</a></div>
<p> </p>
<h2 id="heading-some-snaps-3">Some Snaps📸</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1678468198183/8eae7136-768f-4a87-92ad-4311c449d217.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-lessons-learned">Lessons Learned💪</h1>
<h2 id="heading-the-importance-of-teamwork-in-debugging">The importance of teamwork in debugging</h2>
<p>Teamwork is crucial for successful debugging. Despite obstacles in the Deltathon project, our strong team bond helped us overcome challenges and achieve victory. Each member played a vital role in identifying errors and finding solutions. We communicated effectively, listened actively, and collaborated towards a common goal. Our success showcases the importance of teamwork in debugging, proving that it can help us overcome even the most daunting challenges.</p>
<h2 id="heading-the-persistence-in-debugging">The persistence in debugging</h2>
<p>The road to success is often filled with obstacles and challenges, and debugging is no different. While working on our project for Deltathon, we encountered numerous issues that demanded our unwavering determination to resolve. Despite the setbacks, we remained steadfast in our goal and tirelessly worked to overcome every hurdle. We experimented with various tactics, explored new approaches, and refused to give up until we found a solution. Our persistence paid off in the end, as we completed the project successfully and presented it to the judges with confidence.</p>
<p>It demonstrates the value of perseverance, determination, and hard work, and how these qualities can lead us to great success. We discovered that success is not just about talent or skill, but also about the willingness to persist and never quit. Although the journey may be long and arduous, with persistence, we can achieve greatness.</p>
<h2 id="heading-debugging-tips-for-hackathons">Debugging tips for hackathons</h2>
<p>Debugging during a hackathon can be a challenging task, especially when you have limited time to complete your project. Here are some tips that we found helpful in debugging during Deltathon:</p>
<ol>
<li><p><strong>Plan ahead</strong>: Make sure to allocate enough time for debugging and anticipate potential challenges that may arise. This will help you stay on track and avoid last-minute stress.</p>
</li>
<li><p><strong>Prioritize issues</strong>: Not all errors are created equal. Focus on fixing the most critical issues first, as these may have a significant impact on the functionality of your project.</p>
</li>
<li><p><strong>Use version control</strong>: Version control tools like Git can help you keep track of changes in your code and revert back to previous versions if necessary. This can save you a lot of time and effort in debugging.</p>
</li>
<li><p><strong>Test early and often</strong>: Regularly testing your code can help you catch issues early on, giving you more time to address them. Make sure to test your code frequently and thoroughly.</p>
</li>
<li><p><strong>Get feedback</strong>: Don't be afraid to ask for feedback from your teammates or mentors. They may be able to provide valuable insights and help you identify issues that you may have missed.</p>
</li>
<li><p><strong>Stay calm and focused</strong>: Debugging can be stressful, but it's important to stay calm and focused. Take breaks when needed and approach the problem with a clear mind.</p>
</li>
</ol>
<p>By following these tips, you can approach debugging during hackathons with a more strategic and effective mindset, leading to smoother and more successful project outcomes.</p>
<h1 id="heading-conclusion">Conclusion✨</h1>
<p>Participating in an offline hackathon that is 340 miles away can be intimidating, but it offers an opportunity for a life-changing experience. Though the journey may present unexpected challenges, determination and teamwork can help overcome them, leading to success. By focusing on skill development, collaboration, and persistence, developers can achieve great results in hackathons. Debugging can be a difficult task during these events, but with proper planning and strategies, obstacles can be overcome. In conclusion, participating in hackathons can offer valuable learning experiences and opportunities for personal and professional growth.</p>
]]></content:encoded></item><item><title><![CDATA[How to make Tic Tac Toe console game using C# in Vs code?]]></title><description><![CDATA[Tic Tac Toe is a classic two-player game that can be easily implemented in C# using Visual Studio Code (VSCode). In this blog, I will guide you through the steps to make your own Tic Tac Toe game in C# with VSCode.
Let's Start!

Setup🧑‍💻
Step 1: In...]]></description><link>https://blog.utsavbhattarai.info.np/how-to-make-tic-tac-toe-console-game-using-c-in-vs-code</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/how-to-make-tic-tac-toe-console-game-using-c-in-vs-code</guid><category><![CDATA[WeMakeDevs]]></category><category><![CDATA[development]]></category><category><![CDATA[BlogsWithCC]]></category><category><![CDATA[tic tac toe]]></category><category><![CDATA[Games]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Tue, 31 Jan 2023 17:32:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1675187028425/c65793b7-321a-4839-afa8-c78e01579144.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Tic Tac Toe is a classic two-player game that can be easily implemented in C# using Visual Studio Code (VSCode). In this blog, I will guide you through the steps to make your own Tic Tac Toe game in C# with VSCode.</p>
<p>Let's Start!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1675187118747/ef484d56-e485-49ab-853d-357e0539bb5b.gif" alt class="image--center mx-auto" /></p>
<h1 id="heading-setup">Setup🧑‍💻</h1>
<h3 id="heading-step-1-install-visual-studio-code">Step 1: Install Visual Studio Code</h3>
<ul>
<li>If you don't have Visual Studio Code installed, download it from <a target="_blank" href="https://code.visualstudio.com/"><strong>https://code.visualstudio.com/</strong></a></li>
</ul>
<h3 id="heading-step-2-install-net-core">Step 2: Install .NET Core</h3>
<ul>
<li>To create a C# program, you need to have the .NET Core SDK installed. Download it from <a target="_blank" href="https://dotnet.microsoft.com/download"><strong>https://dotnet.microsoft.com/download</strong></a></li>
</ul>
<h1 id="heading-lets-build">Let's build⚒️</h1>
<h3 id="heading-step-3-create-a-new-project">Step 3: Create a new project</h3>
<ul>
<li><p>Open Visual Studio Code and press "Ctrl + Shift + P" to open the Command Palette.</p>
</li>
<li><p>Type "dotnet new console" and select "dotnet new console" from the list.</p>
</li>
<li><p>You will now have a new C# console project with a Program.cs file.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1675181574231/6e8702d8-a06b-43eb-a7a1-af829a679989.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<h3 id="heading-step-4-write-the-code-in-programcs-file">Step 4: Write the code in Program.cs file</h3>
<ul>
<li><p>Let's define the namespace <code>TicTacToe</code> and make class <code>Program.</code></p>
<pre><code class="lang-csharp">  <span class="hljs-keyword">using</span> System;
  <span class="hljs-keyword">namespace</span> <span class="hljs-title">TicTacToe</span>
  {
   <span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
   {
    <span class="hljs-comment">// Main code will be here</span>
   }
  }
</code></pre>
</li>
<li><p>Now define the constant values for your game board inside the <code>program</code> class.</p>
<pre><code class="lang-csharp">  <span class="hljs-comment">// Constant values for the size of the game board</span>
  <span class="hljs-keyword">private</span> <span class="hljs-keyword">const</span> <span class="hljs-keyword">int</span> ROWS = <span class="hljs-number">3</span>;
  <span class="hljs-keyword">private</span> <span class="hljs-keyword">const</span> <span class="hljs-keyword">int</span> COLUMNS = <span class="hljs-number">3</span>;

  <span class="hljs-comment">// 2D array to represent the game board</span>
  <span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">char</span>[,] board = <span class="hljs-keyword">new</span> <span class="hljs-keyword">char</span>[ROWS, COLUMNS];
</code></pre>
</li>
<li><p>Then define the player. In your game, There are 2 players. They are: O and X.</p>
<pre><code class="lang-csharp">  <span class="hljs-comment">// Enum to represent the current player</span>
  <span class="hljs-keyword">private</span> <span class="hljs-keyword">enum</span> Player
   {
     X, O
   }

  <span class="hljs-comment">// Variable to store the current player</span>
  <span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> Player currentPlayer = Player.X;
</code></pre>
</li>
<li><p>After that declare the <code>main</code> function.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"><span class="hljs-keyword">string</span>[] args</span>)</span>
   {
    <span class="hljs-comment">// Core logic of the game will be here</span>
   }
</code></pre>
<ul>
<li><p>Before writing the login inside the <code>main</code> function, let's declare and write the necessary function which will be required in the future.</p>
<p>  This will initialize the board.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">InitializeBoard</span>(<span class="hljs-params"></span>)</span>
    {
      <span class="hljs-comment">// Initialize the board with empty spaces</span>
      <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> r = <span class="hljs-number">0</span>; r &lt; ROWS; r++)
       {
        <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> c = <span class="hljs-number">0</span>; c &lt; COLUMNS; c++)
           {
                      board[r, c] = <span class="hljs-string">' '</span>;
           }
       }
    }
</code></pre>
<p>  This will print the layout of the board on the console screen.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">PrintBoard</span>(<span class="hljs-params"></span>)</span>
  {
   <span class="hljs-comment">// Print the current state of the board</span>
   <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> r = <span class="hljs-number">0</span>; r &lt; ROWS; r++)
     {
      Console.WriteLine(<span class="hljs-string">"-------------"</span>);
      <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> c = <span class="hljs-number">0</span>; c &lt; COLUMNS; c++)
        {
          Console.Write(<span class="hljs-string">"| "</span>);
          Console.Write(board[r, c]);
          Console.Write(<span class="hljs-string">" "</span>);
        }
       Console.WriteLine(<span class="hljs-string">"|"</span>);
     }
    Console.WriteLine(<span class="hljs-string">"-------------"</span>)
  }
</code></pre>
<p>  This will make a move by the input of user.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">bool</span> <span class="hljs-title">MakeMove</span>(<span class="hljs-params"><span class="hljs-keyword">int</span> row, <span class="hljs-keyword">int</span> column</span>)</span>
   {
    <span class="hljs-comment">// Check if the move is valid (within the bounds of the board and on an                            empty square)</span>
     <span class="hljs-keyword">if</span> (row &gt;= <span class="hljs-number">0</span> &amp;&amp; row &lt; ROWS &amp;&amp; column &gt;= <span class="hljs-number">0</span> &amp;&amp; column &lt; COLUMNS &amp;&amp;    board[row, column] == <span class="hljs-string">' '</span>)
       {
         <span class="hljs-comment">// Mark the square with the current player's symbol</span>
         board[row, column] = currentPlayer == Player.X ? <span class="hljs-string">'X'</span> : <span class="hljs-string">'O'</span>;
         <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
        }
      <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
   }
</code></pre>
<p>  This is the core function that checks the win.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">bool</span> <span class="hljs-title">CheckForWin</span>(<span class="hljs-params"></span>)</span>
          {
              <span class="hljs-comment">// Check rows</span>
              <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> r = <span class="hljs-number">0</span>; r &lt; ROWS; r++)
              {
                  <span class="hljs-keyword">if</span> (board[r, <span class="hljs-number">0</span>] == board[r, <span class="hljs-number">1</span>] &amp;&amp; board[r, <span class="hljs-number">1</span>] == board[r, <span class="hljs-number">2</span>] &amp;&amp; board[r, <span class="hljs-number">0</span>] != <span class="hljs-string">' '</span>)
                  {
                      <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
                  }
              }

              <span class="hljs-comment">// Check columns</span>
              <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> c = <span class="hljs-number">0</span>; c &lt; COLUMNS; c++)
              {
                  <span class="hljs-keyword">if</span> (board[<span class="hljs-number">0</span>, c] == board[<span class="hljs-number">1</span>, c] &amp;&amp; board[<span class="hljs-number">1</span>, c] == board[<span class="hljs-number">2</span>, c] &amp;&amp; board[<span class="hljs-number">0</span>, c] != <span class="hljs-string">' '</span>)
                  {
                      <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
                  }
              }

              <span class="hljs-comment">// Check diagonals</span>
              <span class="hljs-keyword">if</span> (board[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] == board[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>] &amp;&amp; board[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>] == board[<span class="hljs-number">2</span>, <span class="hljs-number">2</span>] &amp;&amp; board[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] != <span class="hljs-string">' '</span>)
              {
                  <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
              }
              <span class="hljs-keyword">if</span> (board[<span class="hljs-number">2</span>, <span class="hljs-number">0</span>] == board[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>] &amp;&amp; board[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>] == board[<span class="hljs-number">0</span>, <span class="hljs-number">2</span>] &amp;&amp; board[<span class="hljs-number">2</span>, <span class="hljs-number">0</span>] != <span class="hljs-string">' '</span>)
              {
                  <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
              }

              <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
          }
</code></pre>
<p>  If the board is full (When the game is drawn), This function will help to identify it.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">bool</span> <span class="hljs-title">IsBoardFull</span>(<span class="hljs-params"></span>)</span>
    {
     <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> r = <span class="hljs-number">0</span>; r &lt; ROWS; r++)
     {
       <span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> c = <span class="hljs-number">0</span>; c &lt; COLUMNS; c++)
         {
           <span class="hljs-keyword">if</span> (board[r, c] == <span class="hljs-string">' '</span>)
              {
               <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
              }
         }
     }
    <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
   }
</code></pre>
<p>  The last one will help to switch between the players.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">TogglePlayer</span>(<span class="hljs-params"></span>)</span>
  {
    currentPlayer = currentPlayer == Player.X ? Player.O : Player.X;
  }
</code></pre>
<p>  Now Let's write the <code>main</code> function.</p>
<pre><code class="lang-csharp">  <span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"><span class="hljs-keyword">string</span>[] args</span>)</span>
    {
      InitializeBoard();

       <span class="hljs-keyword">while</span> (<span class="hljs-literal">true</span>)
       {
         PrintBoard();
         Console.WriteLine(<span class="hljs-string">$"Player <span class="hljs-subst">{currentPlayer}</span>, enter your move (row column): "</span>);
         <span class="hljs-keyword">int</span> row = Convert.ToInt32(Console.ReadLine());
         <span class="hljs-keyword">int</span> column = Convert.ToInt32(Console.ReadLine());
         <span class="hljs-keyword">if</span> (MakeMove(row, column))
            {
             <span class="hljs-keyword">if</span> (CheckForWin())
                {
                 PrintBoard();
                 Console.WriteLine(<span class="hljs-string">$"Player <span class="hljs-subst">{currentPlayer}</span> wins!"</span>);
                 <span class="hljs-keyword">break</span>;
                }
              <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (IsBoardFull())
                {
                  PrintBoard();
                  Console.WriteLine(<span class="hljs-string">"It's a draw!"</span>);
                  <span class="hljs-keyword">break</span>;
                }
                 TogglePlayer();
              }
          <span class="hljs-keyword">else</span>
          {
           Console.WriteLine(<span class="hljs-string">"Invalid move, try again."</span>);
          }
       }
  }
</code></pre>
<ul>
<li><p>At first, Board is initialized by <code>InitializeBoard();</code> function.</p>
</li>
<li><p>Then, The while loop is declared.</p>
</li>
<li><p>After that, Board is printed by <code>PrintBoard()</code> function.</p>
</li>
<li><p>Then, Input is taken as row and column and the input given by the user is passed in <code>MakeMove(row,column)</code> the function which checks it and make move if it is valid. if not then returns <code>Invalid move</code>.</p>
</li>
<li><p>After that, <code>CheckForWin()</code> the function is used to find the winner of the game. If it returns true, the current player is declared the winner and game will be ended, if not then <code>IsBoardFull()</code> is triggered to find whether the game board is full or not. if it returns true, then the game will be a draw. If not then, Player is switched by <code>TogglePlayer()</code> function.</p>
<p>  In this way, This game is played.</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h1 id="heading-quick-links">Quick Links🔗</h1>
<p>Source code👉 <a target="_blank" href="https://github.com/utsavbhattarai007/TicTacToe">Click here</a></p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>In this way, We can make the console version of Tic Tac Toe game using c# language.</p>
<p>Thanks for reading🔥</p>
]]></content:encoded></item><item><title><![CDATA[Reflecting on My Journey as a Developer in 2022: A Year of Growth and Adventure]]></title><description><![CDATA[As a developer, 2022 was a year that I will always look back on with fond memories. It was a year filled with exciting projects, new opportunities, and an overwhelming sense of growth and progress. From expanding my technical skills to connecting wit...]]></description><link>https://blog.utsavbhattarai.info.np/reflecting-on-my-journey-as-a-developer-in-2022-a-year-of-growth-and-adventure</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/reflecting-on-my-journey-as-a-developer-in-2022-a-year-of-growth-and-adventure</guid><category><![CDATA[WeMakeDevs]]></category><category><![CDATA[2022 year in review]]></category><category><![CDATA[#2022wrapup]]></category><category><![CDATA[BlogsWithCC]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Tue, 31 Jan 2023 15:00:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1675177161530/19b243e3-f13d-4fd4-9601-9f51a0c4339c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a developer, 2022 was a year that I will always look back on with fond memories. It was a year filled with exciting projects, new opportunities, and an overwhelming sense of growth and progress. From expanding my technical skills to connecting with other like-minded individuals in the tech community, the year was a true adventure.</p>
<p>Let's get started with new energy and intensity!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1675174618249/75fe0ffd-7550-4454-aefd-bd8d26491ba5.gif" alt class="image--center mx-auto" /></p>
<h1 id="heading-overview-a-look-back-at-a-memorable-year">Overview: A Look Back at a Memorable Year</h1>
<p>I started the year with the goal of expanding my knowledge and skill set. I took on new projects that pushed me outside of my comfort zone and forced me to learn new technologies and programming languages. The challenges I faced along the way were difficult, but also incredibly rewarding. As I progressed, I noticed a significant improvement in my coding abilities and a newfound confidence in my abilities.</p>
<p>In addition to this blog, I have created an additional blog that chronicles my progress, milestones, and obstacles.</p>
<p>Blog👉 <a target="_blank" href="https://blog.utsavbhattarai.info.np/meet-my-latest-project-ideao">Click here</a></p>
<blockquote>
<p>This blog has also been selected as a runner-up in the <strong>DevRetro</strong> competition😅</p>
</blockquote>
<h1 id="heading-giving-back-to-the-tech-community">Giving Back to the Tech Community</h1>
<p>In addition to working on my own projects, I also took the time to give back to the tech community. I contributed to open-source projects, participated in coding competitions, and mentored junior developers. These experiences were incredibly fulfilling and helped me not only further my skills but also make a positive impact in the lives of others.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1675174391552/54dcf6ad-f343-43df-9e92-5980de69c106.png" alt class="image--center mx-auto" /></p>
<p>This is my 500+ contribution graph of 2022.</p>
<p>I have also participated in hacktoberfest but due to another project, I was not able to complete it. Anyway, It was worth it to contribute in open-source.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1675172052763/2719f242-cb5a-40d2-84d4-18d36fc85f05.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-projects-developers-art">Projects: Developer's Art</h1>
<p>2022 was a year of productivity and accomplishment for me as a developer. I took on new projects and pushed my skills to the limit, resulting in some truly remarkable achievements. Some of the projects that are crafted throughout this year are show-case below:</p>
<blockquote>
<p>Projects are made mainly for hackathon purposes and some of them are fun projects.</p>
</blockquote>
<div class="hn-table">
<table>
<thead>
<tr>
<td>S.N</td><td>Name</td><td>Type</td><td>Descriptions</td><td>Source Code</td><td>Demo</td><td>Remarks</td></tr>
</thead>
<tbody>
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr>
<td>1.</td><td>Web-Maker</td><td>Website</td><td>This is a learning project which gives basic concepts about reactjs.</td><td><a target="_blank" href="https://github.com/utsavbhattarai007/Webmaker">Click here</a></td><td><a target="_blank" href="https://webmaker-c8226.web.app/">Click here</a></td><td>Nope</td></tr>
<tr>
<td>2.</td><td>ToolKit</td><td>Website</td><td>This is a first hackathon project which helps developer to find the useful tech tools</td><td><a target="_blank" href="https://github.com/utsavbhattarai007/Toolkit">Click here</a></td><td><a target="_blank" href="https://tool-kit.netlify.app/">Click here</a></td><td>Nope</td></tr>
<tr>
<td>3.</td><td>Ideao</td><td>Website</td><td>Ideao is a web platform of exploring, sharing the creativeness in the form of idea.</td><td><a target="_blank" href="https://github.com/utsavbhattarai007/ideao">Click here</a></td><td><a target="_blank" href="https://ideao.netlify.app">Click here</a></td><td>A Hackathon winning project</td></tr>
<tr>
<td>4.</td><td>Mero Room</td><td>Mobile App</td><td>This app helps you to find room or list room for renting.</td><td><a target="_blank" href="https://github.com/utsavbhattarai007/mero-room-app">Click here</a></td><td><a target="_blank" href="https://meroroom.utsavbhattarai.info.np">Click here</a></td><td>A Hackathon winning project</td></tr>
<tr>
<td>5.</td><td>Devport</td><td>Website</td><td>A mini portfolio maker with full customization</td><td><a target="_blank" href="https://github.com/utsavbhattarai007/portfolio-maker">Click here</a></td><td><a target="_blank" href="https://devport.me">Click here</a></td><td>Nope</td></tr>
<tr>
<td>6.</td><td>Shotz</td><td>Website</td><td>A web app to click high quality screenshot</td><td><a target="_blank" href="https://github.com/utsavbhattarai007/shotz">Click here</a></td><td><a target="_blank" href="https://shotzz.netlify.app/">Click here</a></td><td>Nope</td></tr>
<tr>
<td>7.</td><td>Unified Health System</td><td>Website</td><td>A Web app to save your medical report for future purpose</td><td><a target="_blank" href="https://github.com/sushilbhattarai45/unified-health-system">Click here</a></td><td>Nop</td><td>A offline hackathon winning project</td></tr>
</tbody>
</table>
</div><h1 id="heading-conclusion-a-year-of-growth-and-adventure">Conclusion: A Year of Growth and Adventure</h1>
<p>As the year came to a close, I reflected on my journey and was overwhelmed by a sense of gratitude. I am grateful for the opportunities I had to learn and grow, and the connections I made along the way. I am also grateful for the support of my friends, family, and colleagues, who were there to encourage me every step of the way.</p>
<p>In conclusion, 2022 was a year of growth, <em>adventure</em>, and progress for me as a developer. I am excited to see what the future holds and to continue my journey in the tech industry.</p>
<p>I am insanely active on Twitter.</p>
<p>Let's get connected👉<a target="_blank" href="https://twitter.com/utsabdev">@utsabdev</a></p>
<p>Thanks for Reading🔥</p>
]]></content:encoded></item><item><title><![CDATA[What is IOT👨‍💻?]]></title><description><![CDATA[In this blog, We will shortly describe IOT. Let's get started!
Introduction
The Internet of Things (IoT) is a revolutionary technology that is transforming the way we live and work. It refers to the interconnected network of physical devices, vehicle...]]></description><link>https://blog.utsavbhattarai.info.np/what-is-iot</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/what-is-iot</guid><category><![CDATA[WeMakeDevs]]></category><category><![CDATA[iot]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Tue, 31 Jan 2023 06:23:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1675134140995/41b9bdf3-bd59-4c1e-bc91-367ae709ce32.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this blog, We will shortly describe IOT. Let's get started!</p>
<h1 id="heading-introduction">Introduction</h1>
<p>The Internet of Things (IoT) is a revolutionary technology that is transforming the way we live and work. It refers to the interconnected network of physical devices, vehicles, home appliances, and other items embedded with electronics, software, sensors, and network connectivity, which enable these objects to collect and exchange data.</p>
<h1 id="heading-how-iot-works">How IOT works?</h1>
<p>IoT devices collect and exchange data using sensors, connectivity and software</p>
<p>The data collected can be analyzed and used to improve processes, decision-making, and identify opportunities for improvement</p>
<p>IoT devices can also be controlled remotely to automate processes.</p>
<h1 id="heading-benefits-of-iot">Benefits of IOT</h1>
<ul>
<li><p>Increased Efficiency: IoT devices can automate processes and collect real-time data, leading to increased efficiency and reduced costs.</p>
</li>
<li><p>Improved Decision-Making: The data collected by IoT devices can provide valuable insights for informed decision-making.</p>
</li>
<li><p>Convenience: IoT devices can make daily tasks easier and more convenient, such as controlling a smart home system from a smartphone.</p>
</li>
<li><p>Increased Safety and Monitoring: IoT devices can be used for remote monitoring and improved safety, such as in healthcare with remote patient monitoring.</p>
</li>
</ul>
<h1 id="heading-challenges-and-concern">Challenges and concern</h1>
<ul>
<li><p>Privacy and Security: With more devices connected to the internet, there is an increased risk of cyber attacks.</p>
</li>
<li><p>Complexity: IoT is a complex technology that requires integration and collaboration across multiple industries.</p>
</li>
<li><p>Interoperability: The wide range of IoT devices and platforms can lead to interoperability issues.</p>
</li>
<li><p>Cost: Implementing IoT devices and systems can be expensive.</p>
</li>
</ul>
<h1 id="heading-conclusion">Conclusion</h1>
<p>The challenges associated with IoT are significant and must be addressed for it to reach its full potential. It is important to prioritize data privacy, security, interoperability, standardization, scalability, and energy efficiency in the development and deployment of IoT systems and devices.</p>
<p>Connect with me through👉 <a target="_blank" href="https://twitter.com/utsabdev">@utsabdev</a></p>
<p>Thanks for Reading🔥</p>
]]></content:encoded></item><item><title><![CDATA[Code, Conquer, and Create - My Journey as a Developer: Dev Retro 2022]]></title><description><![CDATA[As a developer, I have always been fascinated by the process of creating something from nothing. From the initial idea to the final product, there is something truly magical about bringing an idea to life through code.
Over the years, I have learned ...]]></description><link>https://blog.utsavbhattarai.info.np/code-conquer-and-create-my-journey-as-a-developer-dev-retro-2022</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/code-conquer-and-create-my-journey-as-a-developer-dev-retro-2022</guid><category><![CDATA[#DevRetro2022]]></category><category><![CDATA[Developer]]></category><category><![CDATA[journey]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Wed, 28 Dec 2022 17:54:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1671851017409/8836eb44-5d2a-4ab3-ad9a-0fc4b9728d5b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a developer, I have always been fascinated by the process of creating something from nothing. From the initial idea to the final product, there is something truly magical about bringing an idea to life through code.</p>
<p>Over the years, I have learned a lot about the ups and downs of being a developer. From struggling to learn new languages and technologies to the joy of seeing a project come together, a developer's journey is filled with challenges and rewards.</p>
<p>Through this blog, I want to share my experiences, insights, and achievement with other developers, as well as anyone interested in the world of tech. I will be discussing everything from the latest trends in development to the challenges of working in a constantly evolving field.</p>
<p>So, Join me on this journey, and let's explore the exciting world of development together!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1671856297187/20069e16-e31b-49b7-9c30-bad76d0f5380.gif" alt class="image--center mx-auto" /></p>
<h1 id="heading-about-me">About me👨‍💻</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672249822628/b6e4763d-120d-44ab-bb1a-96c5d89ec1bc.png" alt class="image--center mx-auto" /></p>
<p>Before knowing my tech journey, Let's introduce myself. It's me <strong>Utsav Bhattarai,</strong> a tech student from <strong>Nepal</strong> who loves to play and write about new tech stuff under the unconditional pressure of physics, chemistry, and Math. I am just completing my 12 standard studies. Apart from this side, I am a self-taught full-stack developer with some experience which I can build something that I imagine.</p>
<p>The management of time for study along with coding is much more difficult for an emerging developer like me. But I managed it by hampering my little bit of study thinking that one day the coding passion would be fruitful for me.</p>
<h1 id="heading-challenges">Challenges⚒️</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672249837988/e043c58f-66be-4bee-9e05-07ff4efa7928.png" alt class="image--center mx-auto" /></p>
<p>As a developer, I faced several challenges on my journey. These challenges can be overwhelming at times, but they are also an important part of the learning process and will help you grow as a developer. These challenges are just like a catalyst that boosts and enhances your skills. Some of the key challenges are as follows:</p>
<h2 id="heading-staying-up-to-date-with-the-latest-trends">Staying up to date with the latest trends</h2>
<p>One of the biggest challenges I have faced is staying up to date with industry trends and technologies. The software development industry is constantly evolving and it can be challenging to keep up with the latest trends and technologies. I have had to continuously learn and adapt to stay relevant in the field and ensure that my skills are current.</p>
<h2 id="heading-complex-project-with-a-tight-deadline">Complex Project with a tight deadline</h2>
<p>Another challenge I have faced is working on complex projects with tight deadlines. It can be stressful to work on projects with high stakes and it is important to stay organized and manage my time effectively to ensure that projects are completed on time and to the highest quality. This type of project tests your skills and patience level and grinds us to face big future problems and challenges.</p>
<h2 id="heading-communication-problem">Communication problem</h2>
<p>I have also faced challenges with communicating with team members and clients. It can be difficult to effectively communicate my ideas and work with others, especially if I am working on a large team or with clients from different backgrounds. I have had to work on my communication skills and be confident in my abilities to ensure that projects are completed successfully. This includes clearly expressing my thoughts and ideas, actively listening to others, and collaborating effectively with team members.</p>
<h2 id="heading-balancing-workload-and-personal-life">Balancing workload and personal life</h2>
<p>Finally, I have faced challenges with balancing my workload and personal life. It can be easy to get overwhelmed with the amount of work I have to do, especially if I am working on multiple projects at once. I have had to learn to manage my time effectively and make sure to take breaks and prioritize my tasks to avoid burnout.</p>
<h2 id="heading-dealing-with-project-setbacks-and-failures">Dealing with project setbacks and failures</h2>
<p>It is common for projects to face setbacks or even fail. It is important to stay resilient and adapt to these challenges to find solutions and move forward. It can be frustrating and disappointing when projects don't go as planned, but it is important to stay calm and focused on finding a solution. I had to learn to take a step back and assess the situation objectively, rather than getting caught up in my emotions.</p>
<p>Overall, the journey of a software developer can be challenging, but it is also a rewarding and fulfilling experience. By facing these challenges head-on and working hard, I have been able to grow and succeed in this field.</p>
<h1 id="heading-kick-start">Kick start⚡</h1>
<p>My journey starts with a kick start. When I first started out in this field, I was fresh out of school and had limited experience. I was eager to get my foot in the door and start learning, but I knew that it would be a steep learning curve.</p>
<p>That kickstart was The offline hackathon which was organized by the tech company <strong>InfoTech.</strong> At first, I was not interested in this hackathon but Obeying the suggestion of friends, I finally landed up to participate in this hackathon. It was 6 hours hackathon with the theme of <strong>Visit Nepal 2022.</strong> At that time, I was just learning Html, CSS, and js but with the help of this tech stuff, I built a simple web app in just 6 hours. In this event, I got to know about <strong>MongoDB</strong>, <strong>ReactJs</strong>, and other cool technology from the senior developers.</p>
<p>Finally, My hard work paid off and I landed my first offline hackathon with the second position. It was a huge achievement for me and it was a great feeling to finally put my skills to the test and work on real projects.</p>
<p>That kickstart was essential for my career and it set the stage for my future success. It was the beginning of a long and rewarding journey as a software developer and I am grateful for the opportunity to learn and grow in this field.</p>
<h1 id="heading-projects">Projects🔥</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672249883695/44f2bd59-5e56-481a-9ed9-92ccf13fe7c9.png" alt class="image--center mx-auto" /></p>
<p>I have worked on a variety of projects throughout my career. Some of the projects that I have worked on include:</p>
<h2 id="heading-1-ideao">1. Ideao</h2>
<p><a target="_blank" href="https://ideao.netlify.app">Ideao</a> is an MIT-licensed open-source web app for exploring, and sharing creativeness in the form of ideas. It allows searching the idea which helps you to make awesome things. The main motive of this web app is to make a portal between idea seekers and idea providers. It provides a user-friendly user interface and highly optimized idea search functionality by using RediSearch Module.</p>
<ul>
<li><p><strong>Site👨‍💻:</strong> <a target="_blank" href="https://ideao.netlify.app">Ideao</a></p>
</li>
<li><p><strong>Blog📄:</strong> <a target="_blank" href="https://blog.utsavbhattarai.info.np/meet-my-latest-project-ideao">Click here</a></p>
</li>
<li><p><strong>Source code⚡:</strong> <a target="_blank" href="https://github.com/utsavbhattarai007/ideao">Click here</a></p>
</li>
</ul>
<h2 id="heading-2-devport">2. Devport</h2>
<p><a target="_blank" href="https://devport.me">Devport</a> is also an MIT-licensed open-source project that helps you, especially developers to make stunning dev portfolios with top-notch customization and good-looking UI. You can also switch the status of your portfolio to active or offline. And One last thing, You can also subscribe to our newsletter to get an engagement update on your portfolio.</p>
<ul>
<li><p><strong>Site👨‍💻:</strong> <a target="_blank" href="https://devport.me">devport</a></p>
</li>
<li><p><strong>Blog📄:</strong> <a target="_blank" href="https://dev.to/utsavbhattarai007/mongodb-atlas-hackathon-2022-on-dev-8na">Click here</a></p>
</li>
<li><p><strong>Source code⚡:</strong> <a target="_blank" href="https://github.com/utsavbhattarai007/devport">Click here</a></p>
</li>
</ul>
<h2 id="heading-3-mero-room-app">3. Mero Room App</h2>
<p><strong>Mero room(Your room)</strong> is an open-source mobile application that makes the connection between room owner and room seeker. The main motive of the app is to solve the problem of layman people who suffers while searching for a room and landlord who is seeking to rent their room. This app makes this process seamless and transparent.</p>
<ul>
<li><p><strong>Download url👨‍💻:</strong> <a target="_blank" href="https://meroroom.utsavbhattarai.info.np">meroroom</a></p>
</li>
<li><p><strong>Source code⚡:</strong> <a target="_blank" href="https://github.com/utsavbhattarai007/mero-room-app">Click here</a></p>
</li>
</ul>
<h2 id="heading-4-shotz">4. Shotz</h2>
<p><a target="_blank" href="https://shotzz.netlify.app/">Shotz</a> is an MIT Licensed open source project which helps you to click high-quality screenshots in one click and in less time. You just have to enter the URL of the website on which you wanted to take screenshots and that's It your work has been done. There are also little bit but a useful advanced option that helps you to take a screenshot as you want. And lastly, If you log in, You can save the screenshot and make a collection of it.</p>
<ul>
<li><p><strong>Site👨‍💻:</strong> <a target="_blank" href="https://shotzz.netlify.app">Shotz</a></p>
</li>
<li><p><strong>Blog📄:</strong> <a target="_blank" href="https://blog.reactplay.io/introducing-shotz-a-high-quality-screen-clicker">Click here</a></p>
</li>
<li><p><strong>Source code⚡:</strong> <a target="_blank" href="https://github.com/utsavbhattarai007/shotz">Click here</a></p>
</li>
</ul>
<hr />
<h1 id="heading-what-did-i-learn-from-2022">What did I learn from 2022?</h1>
<p>In this year 2022, I have learned many things and overcome my mistakes. Some of the things that I learned are as follows:</p>
<h3 id="heading-1-collaboration-and-teamwork">1. Collaboration and teamwork</h3>
<p>Working in the software development field often requires collaboration and teamwork. I have learned about the importance of effective communication and how to work effectively with team members to achieve common goals.</p>
<h3 id="heading-2-problem-solving-skills">2. Problem-solving skills</h3>
<p>Developing software often involves solving complex problems. I have learned how to approach problems in a systematic and logical way and how to troubleshoot and debug code when things go wrong.</p>
<h3 id="heading-3-time-management">3. Time management</h3>
<p>As a developer, I have learned how to manage my time effectively in order to meet deadlines and deliver high-quality work. This has included learning how to prioritize tasks, allocate my time effectively, and work efficiently.</p>
<h3 id="heading-4-adaptability">4. Adaptability</h3>
<p>The field of software development is constantly changing and evolving. I have learned to be adaptable and flexible in order to keep up with these changes and to continuously learn and grow as a developer.</p>
<blockquote>
<p>In addition, I have learned about the importance of staying motivated and focused in my work. As a developer, there are often times when projects are challenging or deadlines are tight, and it can be easy to lose motivation. I have learned to stay focused and motivated by setting clear goals, staying organized, and surrounding myself with supportive and motivated colleagues.</p>
</blockquote>
<h1 id="heading-achievement">Achievement🏆</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672249910726/3be15ff7-279c-43c5-a75f-a5629e2ff7a1.png" alt class="image--center mx-auto" /></p>
<p>As a software developer, I had several(Not more but for me they are many) achievements throughout my career. These achievements are the key motivation that motivates me in every step of my journey. Some of the achievements that I am most proud of are as follow:</p>
<ol>
<li><p>Got the Second position in an offline hackathon</p>
</li>
<li><p>Runner up in Redis x Dev.to the hackathon</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672251160303/4e1e1ea1-35be-44ba-b6ee-93efee72925e.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Runner up in not just hackathon for building the Mero room app</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672244411920/145cd394-8f59-4afa-a4d4-342b74e804ca.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Got a participation swag pack for building a valid project using medusa js</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672245116357/361f3d3f-d25f-44e4-8bba-e4432a44676d.jpeg" alt class="image--center mx-auto" /></p>
</li>
<li><p>Got a Certificate for participating in Nasa Space App Hackathon</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672245129376/160466b4-f8c2-4007-82a6-4fb73648a028.jpeg" alt class="image--center mx-auto" /></p>
</li>
<li><p>Got a Certificate for participating in the Steel city code hackathon</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672245139275/166956ab-d725-442c-85eb-d9f6d31a1773.jpeg" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h1 id="heading-blogging-journey">Blogging journey⚡</h1>
<p>For all of the developers including me, Blogging is an integral part of our journey. Blogging has allowed me to share my knowledge and experiences with others, and it has also helped me to learn and grow as a developer.</p>
<p>I started blogging shortly after I entered the software development field. At first, I started blogging through hashnode and it's going on. My first blog was "<strong><mark>My first Blog - How to write Blog</mark>".</strong> Yes, It's sound weird to start first blog with How to blog but Anyway This blog was boosted and I also got good responses from <a class="user-mention" href="https://hashnode.com/@eleftheriabatsou">Eleftheria Batsou</a> (Hashnode community manager) and <a class="user-mention" href="https://hashnode.com/@mszeles">Miki Szeles</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672246535808/107495ff-e144-4c37-9388-58f9da25922d.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672246554892/d4385344-cd74-485c-842f-8d12ef8fcbcf.png" alt class="image--center mx-auto" /></p>
<p>This two appreciation has boosted my blogging journey and made me to hold the keyboard and write anything that I learned. Due to this, Blogging has been a great way for me to document my journey as a developer and reflect on the challenges and successes that I have encountered along the way. It has also been a great way to connect with other developers and share ideas and experiences.</p>
<p>Overall, Blogging has been a valuable and rewarding part of my journey as a software developer and a student. It has allowed me to share my knowledge and experiences with others and has helped me to learn and grow in my career.</p>
<h1 id="heading-future-plans">Future Plans📄</h1>
<p>Looking to the future, I have big plans for my career. They are:</p>
<ol>
<li><p><strong>Continuing to learn and grow</strong></p>
<p> I am always looking for opportunities to learn and grow as a developer. This could include learning new technologies and languages, attending conferences and workshops, or working on new and challenging projects.</p>
</li>
<li><p><strong>Advancing my career</strong></p>
<p> I am always looking for ways to advance my career and take on more responsibilities and leadership roles. This could include seeking out new opportunities with new organizations.</p>
</li>
<li><p><strong>Mentoring other developers</strong></p>
<p> As I have gained more experience and knowledge, I have become interested in sharing my skills and experiences with other developers. I am currently working on finding opportunities to mentor junior developers and help them to grow and succeed in their careers.</p>
</li>
<li><p><strong>Building my own software</strong></p>
<p> I have always been interested in building my own software and have a few ideas for projects that I would like to work on. I am currently working on developing these ideas and building prototypes to see if they are viable.</p>
</li>
</ol>
<h1 id="heading-wrap-up">Wrap up👋</h1>
<p>Overall, My journey as a software developer has been full of challenges and achievements, and I have learned a lot along the way. I am grateful for the opportunity to learn and grow in this field and I am excited to see what the future holds. So, this is my journey as a software developer.</p>
<p><strong>Thank you Hashnode for this awesome event🔥</strong></p>
<p>Thanks for reading👋</p>
]]></content:encoded></item><item><title><![CDATA[What is JWT(Json web token): Part-1]]></title><description><![CDATA[If you are searching for a brief description of JWT then this blog might help you a lot. Let's jump into it!
Overview
Hello folks👋, This is a mini blog series where we learn core things about JWT with a real-world project. In the first sequel, We wi...]]></description><link>https://blog.utsavbhattarai.info.np/what-is-jwtjson-web-token-part-1</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/what-is-jwtjson-web-token-part-1</guid><category><![CDATA[BlogsWithCC]]></category><category><![CDATA[JWT]]></category><category><![CDATA[authentication]]></category><category><![CDATA[authorization]]></category><category><![CDATA[Blogging]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Wed, 26 Oct 2022 06:07:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1666758295534/H4LSKspB7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you are searching for a brief description of JWT then this blog might help you a lot. Let's jump into it!</p>
<h1 id="heading-overview">Overview</h1>
<p>Hello folks👋, This is a mini blog series where we learn core things about JWT with a real-world project. In the first sequel, We will scrape the theory part and In the second sequel, We will implement the stuff that we learned in the first part in a real-world project. After the end of this series, You will have a clearer view and understanding of JWT which helps you to build a top-notch(advanced and secured) authentication system in your real-world project. </p>
<p>So, In this first part, We will discuss about the core stuff about JWT. Let's get started🤩</p>
<h1 id="heading-quick-look">Quick Look</h1>
<p>To increase your interest and excitement, I will showcase what wanna we will build by the end of this series. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1666688519151/wGP6QJTCd.png" alt="quick_look.png" /></p>
<p>This is just a piece of work. We will build a good-looking and functional real-world project.</p>
<h1 id="heading-what-is-jwtjson-web-token">What is JWT(Json web token)?</h1>
<p>A JSON web token(JWT) is JSON Object which is used to securely transfer information over the web(between two parties). It can be used for an authentication system and can also be used for information exchange. The token is mainly composed of a header, payload, and signature. These three parts are separated by dots(.) and represented by </p>
<pre><code>[header].[payload].[signature]
</code></pre><ul>
<li>Header  -&gt; It specifies the algorithm used to encrypt the contents of the token</li>
<li>Payload -&gt; It contains “claims” (information the token securely transmits)</li>
<li>Signature -&gt; It s used to verify the authenticity of the information.</li>
</ul>
<h1 id="heading-structure-of-jwt">Structure of JWT</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1666701911487/DVCtU1m9X.png" alt="jwt_structure.png" /></p>
<h1 id="heading-uses-of-jwt">Uses of JWT</h1>
<ul>
<li><strong>Authentication</strong>: When a user successfully logs in using their credentials, an ID token is returned which helps to authenticate the user in the future. The best and most secure way to use JWT in authentication is by using both access and refresh tokens. </li>
</ul>
<blockquote>
<p><strong>Access token</strong>: It is a short-term JWT token that is used in the header to request the server for authentication, getting access to a protected route, or accessing the resources.</p>
<p><strong>Refresh token</strong>: It is a long-term JWT token that is used to get a new access token when the old access token is expired.</p>
<p>The combo use of the Access token and Refresh token provides secure authentication and seamless user experiences which We will doing in our real project.</p>
</blockquote>
<ul>
<li><p><strong>Authorization</strong>: Once a user is successfully logged in, an application may request to access routes, services, or resources (e.g., APIs) on behalf of that user. To do so, in every request, it must pass an Access Token, which may be in the form of a JWT. </p>
</li>
<li><p><strong>Information exchange</strong>: JWTs are a good way of securely transmitting information between parties because they can be signed, which means you can be sure that the senders are who they say they are. Additionally, the structure of a JWT allows you to verify that the content hasn't been tampered with.</p>
</li>
</ul>
<h1 id="heading-what-is-jwt-authentication">What is JWT authentication?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1666759567001/5pgZnLCJ2.png" alt="img1.png" /></p>
<p>JWT authentication is a token-based stateless authentication mechanism. It is popularly used as a client-side-based stateless session, this means the server doesn’t have to completely rely on a data store (or) database to save session information. The client of this token may use this digital signature to demonstrate ownership in the future. Signed tokens can be used for authentication by verifying the genuineness of the claims they are attached to.</p>
<h1 id="heading-how-does-jwt-authentication-work">How does JWT authentication work?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1666763741867/NXOQXS7Oe.png" alt="workflow.png" /></p>
<ol>
<li><p>At first, The User sign-in using a username and password.</p>
</li>
<li><p>The authentication server verifies the credentials and issues a JWT signed using a private key.</p>
</li>
<li><p>Moving forward, the client will use the JWT to access protected resources by passing the JWT in the HTTP Authorization header.</p>
</li>
<li><p>The resource server then verifies the authenticity of the token using the public key.</p>
</li>
</ol>
<p>The Identity Provider generates a JWT certifying user identity, and the resource server decodes and verifies the authenticity of the token using the public key.</p>
<p>Since the tokens are used for authorization and authentication in future requests and API calls great care must be taken to prevent security issues. These tokens shouldn’t be stored in publicly accessible areas like the browser’s local storage or cookies. In case there are no other choices, then the payload should be encrypted.</p>
<h1 id="heading-benefits-of-jwt">Benefits of JWT</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1666764267460/FlNQY954W.png" alt="img3.png" /></p>
<p>The benefits are:</p>
<h3 id="heading-1-more-compact">1. <strong>More compact</strong></h3>
<p>JSON is less verbose(long) than XML, so when it is encoded, a JWT is smaller than a SAML token. This makes JWT a good choice to be passed in HTML and HTTP environments.</p>
<h3 id="heading-2-more-secure">2. <strong>More secure</strong></h3>
<p>JWTs can use a public/private key pair in the form of an X.509 certificate for signing. A JWT can also be symmetrically signed by a shared secret using the HMAC algorithm.</p>
<h3 id="heading-3-more-common">3. <strong>More Common</strong></h3>
<p>JSON parsers are common in most programming languages because they map directly to objects. This makes it easier to work with JWT.</p>
<h3 id="heading-4-easier-to-process">4. <strong>Easier to process</strong></h3>
<p>JWT is used at the internet scale. This means that it is easier to process on user's devices, especially mobile.</p>
<h1 id="heading-attack-against-jwt">Attack against JWT</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1666764248293/HlI67QhE5.png" alt="img2.png" /></p>
<h3 id="heading-1-tampering-with-the-signing-algorithm">1. Tampering with the Signing Algorithm:</h3>
<p>‘none’ algorithm: JWT supports the usage of ‘none’ algorithm for use-cases where the integrity of the claim within JWT is already verified by other means. This algorithm allows the server to issue a JWT without a signature. The content within a token issued with a ‘none’ algorithm will look like the following:</p>
<pre><code>{<span class="hljs-string">"alg"</span>:<span class="hljs-string">"none"</span>,<span class="hljs-string">"typ"</span>: <span class="hljs-string">"JWT"</span>}.{<span class="hljs-string">"sub"</span>:<span class="hljs-string">"1234567890"</span>,<span class="hljs-string">"name"</span>:<span class="hljs-string">"John Doe"</span>,<span class="hljs-string">"iat"</span>: <span class="hljs-number">1516239022</span>}.
</code></pre><p>Attackers can use this feature to set the algorithm in their token to ‘none’ and provide an empty signature to fool the server into accepting it as a valid token.</p>
<h3 id="heading-2-brute-forcing-hs256">2. Brute-Forcing HS256:</h3>
<p>JWTs signed with HS256 algorithm could be vulnerable to secret-key disclosure. that usually happens through brute-force attacks, especially for weak keys. Since a client does not need to interact with the server to check the validity of secret key after a token is issued by the server, attackers can conduct offline brute-force attacks against the token by using wordlists of possible secret keys.</p>
<h3 id="heading-3-sensitive-information-disclosure">3. Sensitive Information disclosure:</h3>
<p>All the information inside the payload is stored in plain text. It is important not to leak sensitive information such as internal IP addresses through the tokens.</p>
<p>Attacks against JWT arise from bad implementations and using outdated libraries. To benefit from the security features JWT offers, follow the best practices for implementing them, only use up-to-date and secure libraries and choose the right algorithm for your use-case.</p>
<p>Connect me through👉<a target="_blank" href="https://twitter.com/utsavbhatrai007">@utsavbhatrai007</a> </p>
<p>Thanks for Reading💖</p>
]]></content:encoded></item><item><title><![CDATA[Authorization vs Authentication]]></title><description><![CDATA[Overview
When you are starting out in web development, you will likely hear the terms authorization and authentication all the time. They might sound similar but they are totally different from each other. In Simple words, Authentication is the proce...]]></description><link>https://blog.utsavbhattarai.info.np/authorization-vs-authentication</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/authorization-vs-authentication</guid><category><![CDATA[BlogsWithCC]]></category><category><![CDATA[authentication]]></category><category><![CDATA[authorization]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Tue, 11 Oct 2022 05:03:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1665382620574/JRm2ijyAz.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-overview">Overview</h1>
<p>When you are starting out in web development, you will likely hear the terms authorization and authentication all the time. They might sound similar but they are totally different from each other. In Simple words, Authentication is the process of verifying someone's identity, whereas Authorization is the way to provide permission to someone to access particular resources or information. </p>
<p>They are essential and basic security terms that need to be understood thoroughly. So In this blog, We will discuss what authentication and authorization are and how they are differentiated from each other.</p>
<p>Ok, Let's get started!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665383032526/O-Lq0gCtD.gif" alt="Let'SGetStartedGIF.gif" class="image--center mx-auto" /></p>
<h1 id="heading-what-is-authentication">What is Authentication?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665423399345/RiRO4QCNs.png" alt="authentication.png" /></p>
<p>Authentication is the process of identifying or verifying someone's identity by assuring that the person is the same as what he is claiming for. It is used by both clients and servers. The server uses authentication when someone wants to access the information, and the server needs to know who is accessing the data. The client uses it when he wants to know that it is the same server that it claims to be.</p>
<p>Authentication by the server is done mostly by using the username and password. Other ways of authentication by the server can also be done using cards, retina scans, voice recognition, and fingerprints. Authentication does not ensure what tasks one person can do, and what resources he can read and write. It only identifies who the person or system is actually.</p>
<h2 id="heading-methods-of-authentication">Methods of Authentication</h2>
<h3 id="heading-single-factor-authentication">Single-factor Authentication</h3>
<p>Single-factor authentication is the simplest way of authentication. It just needs a username and password to allow a user to access a system. So, It is less secure and mainly used by beginner developers to develop their side projects.</p>
<h3 id="heading-two-factor-authentication">Two-factor Authentication</h3>
<p>As the name suggests, It is a two-level authentication where the user needs to pass two-step verification to authenticate. It does not require only user name or password but also needs certain information that the authenticated user only knows such as birth date, favorite food, school name, and other information. Apart from this, it can also verify the user by sending the OTP or a unique link to the user's registered number or email address.</p>
<h3 id="heading-multi-factor-authentication">Multi-factor Authentication</h3>
<p>This is the most secure and advanced level of authorization. It requires two or more than two levels of security from different and independent categories. This type of authentication is usually used in financial organizations, banks, and law enforcement agencies. This type of authentication protects the system from data miners or hackers.</p>
<h2 id="heading-authentication-techniques">Authentication techniques</h2>
<h3 id="heading-1-password-based-authentication">1. Password-based authentication</h3>
<p>It is the simplest way of authentication. It requires the password for the particular username. If the password matches the username and both details match the system's database, the user will be successfully authenticated.</p>
<h3 id="heading-2-passwordless-authentication">2. Passwordless authentication</h3>
<p>In this technique, the user doesn't need any password; instead, he gets a unique OTP (One-time password) or link on his registered mobile number or phone number. It can also be said OTP-based authentication. It is used to enhance the user experience on the system.</p>
<h3 id="heading-3-single-sign-onsso">3. Single Sign-on(SSO)</h3>
<p>Single Sign-on or SSO is a way to enable access to multiple applications with a single set of credentials. It allows the user to sign in once, and it will automatically be signed in to all other web apps from the same centralized directory.</p>
<h3 id="heading-4-social-authentication">4. Social Authentication</h3>
<p>Social authentication does not require additional security; instead, it verifies the user with the existing credentials for the available social network. It is mainly used authentication which is more secure and does not affect the user experience. Users can authenticate with one click. Mainly used and popular social media credentials(not passwords) are used for this type of authentication.</p>
<h1 id="heading-what-is-authorization">What is Authorization?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665423436444/fI36jeIql.png" alt="authorization.png" /></p>
<p>Authorization is the process of verifying that you're allowed to access an area of an application or perform specific actions, based on certain criteria and conditions put in place by the application. You may also hear it called access control or privilege control.
The authorization usually works with authentication so that the system could know who is accessing the information.</p>
<p>Authorization is not always necessary to access information available over the internet. Some data available over the internet can be accessed without any authorization, such as you can read blogs from <a target="_blank" href="https://blog.utsavbhattarai.info.np/">here</a>.</p>
<h2 id="heading-authorization-techniques">Authorization techniques</h2>
<h3 id="heading-1-role-based-access-control">1. Role-based access control</h3>
<p>The role-based access control technique is given to users as per their role or profile in the organization. It can be implemented for system-system or user-to-system. It ensures the users on the basis of their roles or profile for accessing the particular area or resources of the system.</p>
<h3 id="heading-2-json-web-token">2. JSON web token</h3>
<p>JSON web token or JWT is an open standard used to securely transmit the data between the parties in the form of the JSON object. The users are verified and authorized using the private/public key pair. It is used to access and refresh tokens to authorize the user to access the resources. </p>
<h3 id="heading-3-oauth">3. OAuth</h3>
<p>OAuth is an authorization protocol, which enables the API to authenticate and access the requested resources.</p>
<h3 id="heading-4-openid-authorization">4. OpenID authorization</h3>
<p>It helps the clients to verify the identity of end-users on the basis of authentication.</p>
<h3 id="heading-5-saml">5. SAML</h3>
<p>SAML stands for Security Assertion Markup Language. It is an open standard that provides authorization credentials to service providers. These credentials are exchanged through digitally signed XML documents.</p>
<h1 id="heading-differences-between-authentication-and-authorization">Differences between Authentication and Authorization</h1>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Authentication</td><td>Authorization</td></tr>
</thead>
<tbody>
<tr>
<td>1. Authentication is the process of identifying a user to provide access to a system.</td><td>1. Authorization is the process of giving permission to access the resources.</td></tr>
<tr>
<td>2. It is usually performed before the authorization.</td><td>2. It is usually done once the user is successfully authenticated.</td></tr>
<tr>
<td>3. It requires the login details of the user, such as user name &amp; password, etc.</td><td>3. It requires the user's privilege or security level.</td></tr>
<tr>
<td>4. Authentication credentials can be partially changed by the user as per the requirement.</td><td>4. Authorization The permissions are given to a user by the owner/manager of the system, and he can only change it, User can't change.</td></tr>
<tr>
<td>5. <strong>Example</strong>: Entering Login details is necessary for the employees to authenticate themselves to access the organizational emails or software.</td><td>5. <strong>Example</strong>: After employees successfully authenticate themselves, they can access and work on certain functions only as per their roles and profiles.</td></tr>
</tbody>
</table>
</div><blockquote>
<p>Comparing these processes to a real-world example, when you go through security in an airport, you show your ID to authenticate your identity. Then, when you arrive at the gate, you present your boarding pass to the flight attendant, so they can authorize you to board your flight and allow access to the plane.</p>
</blockquote>
<h1 id="heading-why-should-you-implement-both-authentication-and-authorization">Why Should You Implement Both Authentication and Authorization?</h1>
<p>As you can see, although authentication and authorization are very different, each plays an integral part in the security and integrity of the application or system.</p>
<p>These processes go hand in hand, and without one the other is kind of meaningless. If you can gain access to the Admin area, but do whatever you want once in there, it could lead to big problems.</p>
<p>On the other hand, you can't authorize individuals without knowing who they are! Which is why authentication always comes before authorization.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>As we discussed above, we can say Authentication verifies the user's identity, and Authorization verifies the user's access and permissions. If the user can't prove their identity, they cannot access the system. And if you are authenticated by proving the correct identity, but you are not authorized to perform a specific function, you won't be able to access that. However, both security methods are often used together.</p>
<p>I hope this blog has been insightful and You have now a clearer view and understanding of this term.</p>
<p>Feel free to get in touch via social media.
You can mostly find me at 👉 <a target="_blank" href="https://twitter.com/utsavbhatrai007">@utsavbhatrai007</a></p>
<p>Thanks for reading🔥</p>
<p>Just a minute👇</p>
<pre><code class="lang-js"><span class="hljs-keyword">if</span>( Do you like the blog🤩? ) {
   <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Don't forget to give reactions and your views in the comments😉"</span>)
}
<span class="hljs-keyword">else</span>{
   <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Thanks for reading💖"</span>)
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[How to upload an image through Multer to the backend?]]></title><description><![CDATA[Hey👋, Want to know How to upload an image through Multer to the backend server in React? then This blog might help you to do so. let's get started😉

Overview
Today, We will make a simple image upload system through multer that sends an image from f...]]></description><link>https://blog.utsavbhattarai.info.np/how-to-upload-an-image-through-multer-to-the-backend</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/how-to-upload-an-image-through-multer-to-the-backend</guid><category><![CDATA[BlogsWithCC]]></category><category><![CDATA[development]]></category><category><![CDATA[React]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sat, 08 Oct 2022 10:12:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1665223355210/HpGb_dRmd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey👋, Want to know How to upload an image through Multer to the backend server in React? then This blog might help you to do so. let's get started😉</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665130853507/DvD_jHT-l.gif" alt="LetsGoTheRockGIF.gif" class="image--center mx-auto" /></p>
<h1 id="heading-overview">Overview</h1>
<p>Today, We will make a simple image upload system through multer that sends an image from frontend to backend and gives the image URL. We will use <a target="_blank" href="https://reactjs.org/">ReactJs</a> for frontend, Custom CSS for styling, <a target="_blank" href="https://expressjs.com/">ExpressJs</a> for backend, and <a target="_blank" href="https://www.npmjs.com/package/multer">Multer</a> for File handling.</p>
<hr />
<h1 id="heading-building-process">Building process⚒️</h1>
<p>The building process is pretty simple. At first, We will create the frontend part which will be a file input box that gets an image from the user and sends the image to the server as a response, we get the image URL and then start to make the backend with Node js and ExpressJs. That's it, Our work is done🤣. That's a rough explanation, Let's dive into the deep process.</p>
<h2 id="heading-frontend">Frontend</h2>
<p>There will not be a fancy frontend part😂. There will be a simple file input box with submit button. Our frontend looks like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665157884474/Mhhfu1EXg.png" alt="image.png" /></p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>We will be using:</p>
<p>-&gt; React js (Frontend)</p>
<p>-&gt; Custom CSS (For styling)</p>
<p>-&gt; Vite js (For development tool)</p>
<p>-&gt; Yarn (Package manager)</p>
<p>-&gt; Package: Axios</p>
<h3 id="heading-process">Process</h3>
<p>At first, We will make a directory named as Img Upload by <code>mkdir Img Upload</code> and jump to that directory by <code>cd Img Upload</code> then We will initialize our project by <code>yarn create vite</code>. We will be using vite rather than CRA(create-react-app) due to the optimized development environment.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665159157077/UOAxsU6mF.png" alt="image.png" /></p>
<p>Then we will name the frontend side as a client.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665159490378/UwygoIPGo.png" alt="image.png" /></p>
<p>Then choose the framework as React.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665159571585/uDf65ATVd.png" alt="image.png" /></p>
<p>After that, We will choose the language.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665159646002/kTklofauL.png" alt="image.png" /></p>
<p>That's It, Our project frame has been crafted.</p>
<p>Now, Just clean up the startup template of vite react app then make the file input box and style it. We won't discuss about styling and all other frontend stuff. So, Frontend look like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665201489288/wUy5K1oiy.png" alt="image.png" /></p>
<p>Now, Let's get the image from the user and store it in two different states for previewing and sending the image to the server. For getting the image from the user, We will make an <code>onChange</code> in the file input box and pass the function <code>picUpload</code>. Like this:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"file"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"img"</span> <span class="hljs-attr">onChange</span>=<span class="hljs-string">{picUpload}</span> /&gt;</span>
</code></pre>
<p>Then, In the function <code>picUpload</code>, Let's get the image and set that image in two state <code>pic</code> (preview) and <code>file</code> (for backend work). Like this:</p>
<pre><code class="lang-js">
<span class="hljs-keyword">const</span> [pic, setPic] = useState(<span class="hljs-literal">null</span>);
<span class="hljs-keyword">const</span> [file, setFile] = useState(<span class="hljs-literal">null</span>);

<span class="hljs-keyword">const</span> picUpload = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    <span class="hljs-keyword">const</span> [file] = e.target.files;
    setPic(URL.createObjectURL(file));
    setFile(file);
 };
</code></pre>
<p>Here, <code>URL.createObjectURL()</code> This will create a blob which makes it easy to preview. This new image-picking technique is explained in this blog: Check it out👉 <a target="_blank" href="https://blog.utsavbhattarai.info.np/how-to-display-a-image-selected-from-input-file-in-react">Blog</a></p>
<p>Now, Let's make a preview mechanism like this:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"file"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"img"</span> <span class="hljs-attr">onChange</span>=<span class="hljs-string">{picUpload}</span> /&gt;</span>
{pic ? <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">{pic}</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"pic"</span> /&gt;</span> : <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Upload Image<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>}
</code></pre>
<p>Then pass the function <code>getImgUrl()</code> in submit button to triggered backend work. Final, frontend structure look like this:</p>
<pre><code class="lang-html">
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"input_wrapper"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"img_wrapper"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"img_upload"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"file"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"img"</span> <span class="hljs-attr">onChange</span>=<span class="hljs-string">{picUpload}</span> /&gt;</span>
            {pic ? <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">{pic}</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"pic"</span> /&gt;</span> : <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Upload Image<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>}
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> getImgUrl()}&gt;Send Image to server<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>In <code>getImgUrl</code> function:</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> getImgUrl = <span class="hljs-keyword">async</span>() =&gt; {
    <span class="hljs-keyword">const</span> formData = <span class="hljs-keyword">new</span> FormData();
    formData.append(<span class="hljs-string">"pic"</span>, file);
    <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> axios.post(<span class="hljs-string">"http://localhost:3000/api/upload"</span>, formData, {
      <span class="hljs-attr">headers</span>: {
        <span class="hljs-string">"Content-Type"</span>: <span class="hljs-string">"multipart/form-data"</span>,
      },
    });
    <span class="hljs-keyword">const</span> {msg,imgUrl} = res.data;
    <span class="hljs-built_in">console</span>.log(msg);
    alert(imgUrl);
  };
</code></pre>
<p>At first, formdata instance is created then the <code>file</code> is appended with formdata with the name <code>pic</code> . This <code>pic</code> will be the same as in the backend that we will discuss in the backend part. Then the post request is sent to a server of the endpoint (localhost:3000/api/upload) which we will create later with the formdata as data and header of form-data.</p>
<p>Then the response(res.data) is destructured in <code>msg</code> and <code>imgUrl</code> which is passed from the backend.</p>
<p>Final frontend look:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665210352541/zhv7wxoak.gif" alt="ezgif.com-gif-maker.gif" /></p>
<hr />
<h2 id="heading-backend">Backend</h2>
<p>The backend process will be little bit long because We will discuss in-depth about the backend. Let's get started.</p>
<h3 id="heading-prerequisites-1">Prerequisites</h3>
<p>We will be using:</p>
<p>-&gt; Node js / Express js</p>
<p>-&gt; Yarn (Package manager)</p>
<p>-&gt; Packages:</p>
<ul>
<li><p>Multer (File handler)</p>
</li>
<li><p>Cors (Incoming request manager)</p>
</li>
<li><p>Nodemon (Self Server starter )</p>
</li>
</ul>
<h3 id="heading-process-1">Process</h3>
<p>At first, We will create a server folder in the root directory <code>Img Upload</code> by <code>mkdir server</code> and then jump into that directory by <code>cd server</code>. Then we will initialize the node js project by <code>npm init -y</code> then package.json file is created. Now We will install package like express, nodemon, cors, multer by writing this command in terminal:</p>
<pre><code class="lang-js">yarn add express nodemon cors multer
</code></pre>
<p>Now, We will setup the node js project in package.json file like this:</p>
<pre><code class="lang-js">{
  <span class="hljs-string">"name"</span>: <span class="hljs-string">"img-upload"</span>,
  <span class="hljs-string">"version"</span>: <span class="hljs-string">"1.0.0"</span>,
  <span class="hljs-string">"main"</span>: <span class="hljs-string">"server.js"</span>,
  <span class="hljs-string">"type"</span>: <span class="hljs-string">"module"</span>,
  <span class="hljs-string">"scripts"</span>: {
    <span class="hljs-string">"start"</span>: <span class="hljs-string">"node server.js"</span>,
    <span class="hljs-string">"server"</span>: <span class="hljs-string">"nodemon server.js"</span>
  },
  <span class="hljs-string">"keywords"</span>: [],
  <span class="hljs-string">"author"</span>: <span class="hljs-string">""</span>,
  <span class="hljs-string">"license"</span>: <span class="hljs-string">"ISC"</span>,
  <span class="hljs-string">"dependencies"</span>: {
    <span class="hljs-string">"cors"</span>: <span class="hljs-string">"^2.8.5"</span>,
    <span class="hljs-string">"express"</span>: <span class="hljs-string">"^4.18.1"</span>,
    <span class="hljs-string">"multer"</span>: <span class="hljs-string">"^1.4.5-lts.1"</span>,
    <span class="hljs-string">"nodemon"</span>: <span class="hljs-string">"^2.0.20"</span>
  },
  <span class="hljs-string">"devDependencies"</span>: {},
  <span class="hljs-string">"description"</span>: <span class="hljs-string">""</span>
}
</code></pre>
<p>In <code>name</code> field we will write name of project and In <code>main</code> field we will write the name of main file of the server which will be <code>server.js</code>. Then we will add another field which helps to support ES6 that is:</p>
<pre><code class="lang-js"><span class="hljs-string">"type"</span>:<span class="hljs-string">"module"</span>
</code></pre>
<p>Now, We will create <code>server.js</code> file then we will initialize the express app and listen to the given port <code>3000</code> like this:</p>
<pre><code class="lang-js"><span class="hljs-comment">//Importing dependencies</span>
<span class="hljs-keyword">import</span> express <span class="hljs-keyword">from</span> <span class="hljs-string">"express"</span>;
<span class="hljs-keyword">import</span> multer <span class="hljs-keyword">from</span> <span class="hljs-string">"multer"</span>;
<span class="hljs-keyword">import</span> cors <span class="hljs-keyword">from</span> <span class="hljs-string">"cors"</span>

<span class="hljs-comment">//Making Instances</span>
<span class="hljs-keyword">const</span> app = express();
<span class="hljs-keyword">const</span> port = <span class="hljs-number">3000</span>;

<span class="hljs-comment">//Middlewares</span>
app.use(express.json());
app.use(cors(<span class="hljs-string">"*"</span>));

<span class="hljs-comment">//Routes</span>
app.get(<span class="hljs-string">"/"</span>, <span class="hljs-function">(<span class="hljs-params">req, res</span>) =&gt;</span> res.send(<span class="hljs-string">"Hello World!"</span>));


<span class="hljs-comment">//Listening on port</span>
app.listen(port, <span class="hljs-function">() =&gt;</span> <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Listening on port <span class="hljs-subst">${port}</span>!`</span>));
</code></pre>
<p>Here, In this above code, At first, We imported the dependencies then make the instances of express as <code>app</code> then define the port at <code>3000</code>. After that, We make a middleware for using json data by using <code>express.json()</code> and for managing incoming request by using <code>cors("*")</code>. * means anyone can access the server.</p>
<p>Now, we will set up the storage mechanism of multer by setuping the naming system of images that we store and defining the folder which we want to store images on the server. In our case, The folder will be in the server directory named as <code>uploads</code>.</p>
<p>Let's First make the folder uploads by <code>mkdir uploads</code>.</p>
<p>The code to do so will be like this:</p>
<pre><code class="lang-js"><span class="hljs-comment">// setting up the storage mechanism</span>
<span class="hljs-keyword">const</span> storage = multer.diskStorage({
  <span class="hljs-attr">filename</span>: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">req, file, cb</span>) </span>{
    cb(<span class="hljs-literal">null</span>, <span class="hljs-built_in">Date</span>.now() + <span class="hljs-string">"--"</span> + file.originalname);
  },
  <span class="hljs-attr">destination</span>: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">req, file, cb</span>) </span>{
    cb(<span class="hljs-literal">null</span>, <span class="hljs-string">"./uploads"</span>);
  },
});
</code></pre>
<p>Then we will create the instance of multer with the storage mechanism that we defined above:</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> upload = multer({
  <span class="hljs-attr">storage</span>: storage,
});
</code></pre>
<p>After that, We will create the route for serving the static files from the folder that we made above that is <code>uploads</code>(folder in the client directory).</p>
<pre><code class="lang-js"><span class="hljs-comment">//Serving the static files from the uploads folder. </span>
app.use(<span class="hljs-string">"/uploads"</span>, express.static(<span class="hljs-string">"uploads"</span>));
</code></pre>
<p>Now, This is the core part where we will make the main route of post request of endpoint <code>/api/upload</code>.</p>
<pre><code class="lang-js"><span class="hljs-comment">//Img Url Route</span>
app.post(<span class="hljs-string">"/api/upload"</span>, upload.single(<span class="hljs-string">"pic"</span>), <span class="hljs-keyword">async</span> (req, res) =&gt; {
  <span class="hljs-keyword">try</span> {
    <span class="hljs-keyword">if</span> (req.file === <span class="hljs-literal">undefined</span>)
      <span class="hljs-keyword">return</span> res
        .status(<span class="hljs-number">400</span>)
        .json({ <span class="hljs-attr">error</span>: <span class="hljs-literal">false</span>, <span class="hljs-attr">msg</span>: <span class="hljs-string">"You must select a file."</span> });
    <span class="hljs-keyword">const</span> url =
      req.protocol + <span class="hljs-string">"://"</span> + req.get(<span class="hljs-string">"host"</span>) + <span class="hljs-string">"/uploads/"</span> + req.file.filename;
    res
      .status(<span class="hljs-number">200</span>)
      .json({ <span class="hljs-attr">error</span>: <span class="hljs-literal">false</span>, <span class="hljs-attr">msg</span>: <span class="hljs-string">"File uploaded successfully!"</span>, <span class="hljs-attr">imgUrl</span>: url });
  } <span class="hljs-keyword">catch</span> (error) {
    res.status(<span class="hljs-number">400</span>).json({ <span class="hljs-attr">error</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">msg</span>: <span class="hljs-string">"Img upload failed"</span> });
  }
});
</code></pre>
<blockquote>
<p>Here, <code>upload.single("")</code> act as middleware of multer where the name given inside it should be same as name of formdata that we define in frontend. In our case,The name is <code>pic</code>.</p>
</blockquote>
<p>Now, At first, The incoming file from frontend as request through formdata is checked whether is null or not. After that, the Image url is made by combining the:</p>
<ul>
<li><p>req.protocol -&gt; It gives the name of protocol in which the backend is running that is http or https request.</p>
</li>
<li><p>req.host -&gt; It gives the main backend url. In our case that is <code>localhost:3000</code></p>
</li>
<li><p>/uploads/ -&gt; It is name of folder that we define above for storing image.</p>
</li>
<li><p>req.file.filename -&gt; It gives the name of the file that we made in the storage mechanism step.</p>
</li>
</ul>
<p>In this way, the Image URL is made. Then, The image URL is sent as <code>imgUrl</code> to the frontend as a response with status code 200 and msg : <code>File uploaded successfully!</code>.</p>
<p>If any error occurs in the try-catch block, It sends the response with status code 400 and msg: <code>Img upload failed</code>.</p>
<p>In this way, The backend is coded.</p>
<p>The final top-notch backend code looks like this:</p>
<pre><code class="lang-js"><span class="hljs-comment">//Importing dependencies</span>
<span class="hljs-keyword">import</span> express <span class="hljs-keyword">from</span> <span class="hljs-string">"express"</span>;
<span class="hljs-keyword">import</span> multer <span class="hljs-keyword">from</span> <span class="hljs-string">"multer"</span>;
<span class="hljs-keyword">import</span> cors <span class="hljs-keyword">from</span> <span class="hljs-string">"cors"</span>

<span class="hljs-comment">//Making Instances</span>
<span class="hljs-keyword">const</span> app = express();
<span class="hljs-keyword">const</span> port = <span class="hljs-number">3000</span>;

<span class="hljs-comment">//Middlewares</span>
app.use(express.json());
app.use(cors(<span class="hljs-string">"*"</span>));


<span class="hljs-comment">// setting up the storage mechanism</span>
<span class="hljs-keyword">const</span> storage = multer.diskStorage({
  <span class="hljs-attr">filename</span>: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">req, file, cb</span>) </span>{
    cb(<span class="hljs-literal">null</span>, <span class="hljs-built_in">Date</span>.now() + <span class="hljs-string">"--"</span> + file.originalname);
  },
  <span class="hljs-attr">destination</span>: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">req, file, cb</span>) </span>{
    cb(<span class="hljs-literal">null</span>, <span class="hljs-string">"./uploads"</span>);
  },
});

<span class="hljs-comment">/* Creating an instance of multer with the storage mechanism we defined above. */</span>
<span class="hljs-keyword">const</span> upload = multer({
  <span class="hljs-attr">storage</span>: storage,
});

<span class="hljs-comment">//Routes</span>
app.get(<span class="hljs-string">"/"</span>, <span class="hljs-function">(<span class="hljs-params">req, res</span>) =&gt;</span> res.send(<span class="hljs-string">"Hello World!"</span>));

<span class="hljs-comment">//Serving the static files from the uploads folder. </span>
app.use(<span class="hljs-string">"/uploads"</span>, express.static(<span class="hljs-string">"uploads"</span>));

<span class="hljs-comment">//Img Url Route</span>
app.post(<span class="hljs-string">"/api/upload"</span>, upload.single(<span class="hljs-string">"pic"</span>), <span class="hljs-keyword">async</span> (req, res) =&gt; {
  <span class="hljs-keyword">try</span> {
    <span class="hljs-keyword">if</span> (req.file === <span class="hljs-literal">undefined</span>)
      <span class="hljs-keyword">return</span> res
        .status(<span class="hljs-number">400</span>)
        .json({ <span class="hljs-attr">error</span>: <span class="hljs-literal">false</span>, <span class="hljs-attr">msg</span>: <span class="hljs-string">"You must select a file."</span> });
    <span class="hljs-keyword">const</span> url =
      req.protocol + <span class="hljs-string">"://"</span> + req.get(<span class="hljs-string">"host"</span>) + <span class="hljs-string">"/uploads/"</span> + req.file.filename;
    res
      .status(<span class="hljs-number">200</span>)
      .json({ <span class="hljs-attr">error</span>: <span class="hljs-literal">false</span>, <span class="hljs-attr">msg</span>: <span class="hljs-string">"File uploaded successfully!"</span>, <span class="hljs-attr">imgUrl</span>: url });
  } <span class="hljs-keyword">catch</span> (error) {
    res.status(<span class="hljs-number">400</span>).json({ <span class="hljs-attr">error</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">msg</span>: <span class="hljs-string">"Img upload failed"</span> });
  }
});

<span class="hljs-comment">//Listening on port</span>
app.listen(port, <span class="hljs-function">() =&gt;</span> <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Listening on port <span class="hljs-subst">${port}</span>!`</span>));
</code></pre>
<p>Hope you learned it🙂.</p>
<p>Final folder structure is:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665200850048/hN9PyhGqZ.png" alt="image.png" /></p>
<blockquote>
<p>Did you like the customization of the window terminal? If so Let me know in the comment section. I will try to write a detailed blog about it😉.</p>
</blockquote>
<hr />
<h1 id="heading-testing">Testing</h1>
<p>Let's test the backend API through the Vs code extension named as <a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client">Thunder client</a>.</p>
<p>At first, Let's start the server.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665218876045/6FIQxynzQ.png" alt="image.png" /></p>
<p>Now, In thunder client, Let's define the endpoint and request method of our backend. Like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665219495510/r6uHGomyC.png" alt="test1.png" /></p>
<p>Then,</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665220756422/htyjGH2Y2.png" alt="test2.png" /></p>
<p>The response is seen as:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665221074538/wykaRUDA9.png" alt="test3.png" /></p>
<h1 id="heading-links">Links🔗</h1>
<p>Check it out the source code of frontend and backend👇</p>
<p>Source code: <a target="_blank" href="https://github.com/utsavbhattarai007/Img-Upload">Github</a></p>
<hr />
<h1 id="heading-conclusion">Conclusion</h1>
<p>In this way, We created the image upload system which stores the image from frontend to backend server.</p>
<p>Connect me through: <a target="_blank" href="http://twitter.com/utsabdev">@utsabdev</a></p>
<p>Thanks for reading🔥</p>
]]></content:encoded></item><item><title><![CDATA[Meet my latest project - Ideao💡]]></title><description><![CDATA[Searching for the idea for participating in hackathon or something else? Just chill my friend, Ideao is excited to help you by giving award wining Ideas.

A little backstory
I was just eagerly waiting for the August hackathon on Hashnode. Sadly, This...]]></description><link>https://blog.utsavbhattarai.info.np/meet-my-latest-project-ideao</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/meet-my-latest-project-ideao</guid><category><![CDATA[BlogsWithCC]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[React]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Mon, 03 Oct 2022 06:38:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1662222352122/_jlanDaWs.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Searching for the idea for participating in hackathon or something else? Just chill my friend, <a target="_blank" href="https://ideao.netlify.app/">Ideao</a> is excited to help you by giving award wining Ideas.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662026627936/TYLVCkTtj.gif" alt="LetsGoTheRockGIF.gif" class="image--center mx-auto" /></p>
<h1 id="heading-a-little-backstory">A little backstory</h1>
<p>I was just eagerly waiting for the August hackathon on Hashnode. Sadly, This time there was no hackathon to participate but later on Surprisingly Writeathon (4 Articles in 4 Weeks ) was lift up. So I participate on it but inner me was extremely thirsty to participate on Hackathon where I can build awesome project. So , To end my thirstiness towards hackathon , I started to search for the hackathon. At the first try, I search for the Hackathon keyword on google. The first result was of Redis x Dev.to Hackathon which is organized by the another huge Blogging community called as Dev.to. As following my passion, I started to participate parallelly on Hackathon and Writeathon.</p>
<blockquote>
<p>As a result, Today I am going to explain my latest project named as <a target="_blank" href="https://ideao.netlify.app/">Ideao</a>. </p>
</blockquote>
<hr />
<h1 id="heading-what-is-ideaohttpsideaonetlifyapp">What is <a target="_blank" href="https://ideao.netlify.app/">Ideao</a>🤔?</h1>
<p><a target="_blank" href="https://ideao.netlify.app/">Ideao</a> is just a simple approach is to circulate idea all among the community. Ideao is the web platform for exploring and sharing the creativeness in the form of idea. The main motive of this web app is to make portal between idea seeker and idea provider. It provides the user friendly user interface and highly optimize idea search functionality by RediSearch Module.</p>
<hr />
<h1 id="heading-quick-demo">Quick Demo</h1>
<h2 id="heading-home-page">Home Page</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662135929032/3FYgezmCO.png" alt="homepage-ss.png" /></p>
<h2 id="heading-dashboard-page">Dashboard Page</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662135988682/kSlig87LX.png" alt="app-ss.png" /></p>
<h1 id="heading-overview-video">Overview Video</h1>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/YvnL2nkzs0A">https://youtu.be/YvnL2nkzs0A</a></div>
<blockquote>
<p>I know Video is not good as other but that's my first time🤣.</p>
</blockquote>
<hr />
<h1 id="heading-whats-the-need-of-ideao">What's the need of Ideao?</h1>
<p>As I am a developer, For participating in hackathon or contributing in Open source community or for doing something else tech stuff , Ultimately There is a need of main key idea which is not thinkable instantly. So, Yah Ideao collects the idea given by other people and gives to needy developer.  Thats what Ideao do.</p>
<p>The main core motive to built this web app is to end up the frustration of developer due to unthinkable mindset of awesome  idea by providing them a huge verse of idea where they can search relavant ideas. </p>
<blockquote>
<p>In general, It's core motive is to shortout the shortage of idea.</p>
</blockquote>
<p>#💡What I learned from this project?</p>
<p>To be honest, This project had learnt me many things from the simple css hack to backend related tech stuff like Redis, express and many more in depth. This project had upgraded me further more about reactjs, css and expressjs and introduces a new database called Redis which was worth of learning. Yep, Let me summarize what I learned from above tech stack :</p>
<ul>
<li><p>From ReactJs : In this project, I have learnt more about best way for managing state and routing the app through react-router-dom in ReactJs. Additionally, I have learnt about advance component rendering technique and other simple things for best app optimization. </p>
</li>
<li><p>From Css : Doing frontend is quite wonderful but when bugs comes in it, its sucks. Every time when I code frontend, there will be a hard coding somewhere which frustrate me a lot. So, In this project, I decided enchance my css skills. At the end, I learnt so many styling tricks and hacks which helps me a lot for upcomign future project.</p>
</li>
<li><p>From NodeJs/ExpressJs : As I was familiar with this tech stack, I couldn't learn many things but learn about simple things like best optimization of processing the result and integrating it on API and serving it on the endpoint.</p>
</li>
<li><p>From Redis: I had learnt about different awesome module provided by Redis like RediSearch, RediJson, Redis caching and many mor and I had successfully implemented above module in this project. </p>
</li>
</ul>
<h1 id="heading-what-tech-stack-is-used">What Tech Stack is used?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662144663929/Zehoo9X6c.png" alt="TechStack.png" /></p>
<p>I was quite familiar with Js language. So, I prefer to use JavaScript based framework which makes me easy to build what I want. Ideao is made up using <code>RERN</code> stack which stands for:</p>
<ul>
<li>R -&gt; Redis</li>
<li>E -&gt; ExpressJs</li>
<li>R -&gt; ReactJs</li>
<li>N -&gt; NodeJs</li>
</ul>
<p>Other Stack are:</p>
<ul>
<li><p>For styling : By the help of this project, I want to enhance my css skills, So I prefer to use Custom Css.</p>
</li>
<li><p>For Development tool : I was so amazed about the Vitejs feature. So, I am using ViteJs rather than CRA(create-react-app) in all my recent project due to it's speed⚡.</p>
</li>
</ul>
<h1 id="heading-challenges-i-faced">Challenges I faced💪</h1>
<p>Some of challenges I faced:</p>
<ol>
<li><p>It was my first time using Redis. Although It was easy to use but At the beginning, It was hard to integrate it with Node.js. After 2-3 days brainstorming, I finally find out the NodeJs compatible Redis package called Redis Om and After that It becomes easy to interact with Redis Module.</p>
</li>
<li><p>While Styling, There was lots of designing headache but I managed to solve it.</p>
</li>
<li><p>While managing the state workflow of loading , rendering the component according to the response was little mess-up but after 3-4 hours of struggling It was managed systematically.</p>
</li>
<li><p>At Last While deploying the server in Heroku was a big pain. I think I don't need to explain about it😂.</p>
</li>
</ol>
<h1 id="heading-how-ideaohttpsideaonetlifyapp-works">How <a target="_blank" href="https://ideao.netlify.app/">Ideao</a> works?</h1>
<p>In general, Idea works in the same way that of other RERN or MERN web app works that is all of the workflow is managed through API . That's it, Ideao also works on the based of client requests through API.
The upcoming diagram fully clarifies all the working mechanism in easy way.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662221979405/gR6tmJJw7.png" alt="Architecture.png" /></p>
<h1 id="heading-functions">Functions✨</h1>
<p>The function of Ideao are:</p>
<ol>
<li><p>User can search the idea through idea title, idea description and idea tag by the help highly optimized module called RediSearch.</p>
</li>
<li><p>User can post the idea what they want with title, description and tag.</p>
</li>
<li><p>User can login and can accessed their posted idea</p>
</li>
<li><p>User can delete their idea easily.</p>
</li>
<li><p>At last but not the least, Ideao provides User friendly user interface.(Yah, You might wonder that 🤔 that's a simple thing but main thing is making user easy to interact with our app).</p>
</li>
</ol>
<hr />
<h1 id="heading-building-process">Building process⚒️</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662221961164/lOrXjypp1.png" alt="Building process.png" /></p>
<p>The building process of Ideao is pretty simple. At first, I created the frontend by using React with Vitejs and 
styling with custom CSS. and then started to make backend with ExpressJs and Redis. That's it, Ideao is ready🤣. That's a rough explanation , Let's dive in deep process.</p>
<h3 id="heading-frontend">🏢 Frontend</h3>
<p>I just started creating frontend with the command  <code>yarn create vite</code> and then started to make basic folder structure and I started to make different routes of app like Home route, Dashboard route  with sub-routes like App route, explore route, search route and profile route. After that, I started to make frame of the app and then started to style on it. After a huge styling, The frontend part had been ready. It took 1 week to built it because of college stuff like notes, assignment etc. </p>
<h3 id="heading-backend">🏭 Backend</h3>
<p>Backend part was pretty harder because of new database called Redis (At a first interaction only,  after being familiar I love it ). I started the backend part by the command  <code>node init -y</code> and then started to make folder structure of server file which looks like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662212300462/OFMbRdwWo.png" alt="server_folder.png" /></p>
<p>After completing the folder structure, I just make the express server with simple middlewares which listen on port  <code>3001</code>. Like this:</p>
<pre><code class="lang-js"><span class="hljs-comment">//Importing dependencies</span>
<span class="hljs-keyword">import</span> express <span class="hljs-keyword">from</span> <span class="hljs-string">"express"</span>;
<span class="hljs-keyword">import</span> cors <span class="hljs-keyword">from</span> <span class="hljs-string">"cors"</span>;

<span class="hljs-comment">//Making Instances</span>
<span class="hljs-keyword">const</span> app = express();

<span class="hljs-comment">//MiddleWares</span>
app.use(express.json()); <span class="hljs-comment">// For JSON data</span>
app.use(cors(<span class="hljs-string">"*"</span>)); <span class="hljs-comment">// For incoming request</span>

<span class="hljs-comment">//Api Endpoint</span>
app.get(<span class="hljs-string">"/"</span>, <span class="hljs-function">(<span class="hljs-params">req, res</span>) =&gt;</span> {
  res.json({ <span class="hljs-attr">msg</span>: <span class="hljs-string">"Success✅"</span> });
});

<span class="hljs-comment">//Listening to the port</span>
<span class="hljs-keyword">const</span> PORT = process.env.PORT || <span class="hljs-number">3001</span>;

app.listen(PORT, <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`The server is listening on the port <span class="hljs-subst">${PORT}</span>`</span>);
});
</code></pre>
<p>After that I configure dotenv by importing it.</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> {} <span class="hljs-keyword">from</span> <span class="hljs-string">"dotenv/config"</span>;
</code></pre>
<p>Our .env look like this:</p>
<pre><code class="lang-Js">PORT=
REDIS_URL=
</code></pre>
<p>Then I created different routes by importing from routes on index.js file folder like this:</p>
<pre><code class="lang-js">...
<span class="hljs-comment">//importing routes</span>
<span class="hljs-keyword">import</span> Idea <span class="hljs-keyword">from</span> <span class="hljs-string">"./routes/Idea.js"</span>;
<span class="hljs-keyword">import</span> User <span class="hljs-keyword">from</span> <span class="hljs-string">"./routes/User.js"</span>;
<span class="hljs-keyword">import</span> Stat <span class="hljs-keyword">from</span> <span class="hljs-string">"./routes/Stat.js"</span>;

<span class="hljs-comment">//Routes</span>
app.use(<span class="hljs-string">"/api/idea"</span>, Idea);
app.use(<span class="hljs-string">"/api/user"</span>, User);
app.use(<span class="hljs-string">"/api/stat"</span>, Stat)
...
</code></pre>
<p>Let's setup the Redis connection by:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { Client } <span class="hljs-keyword">from</span> <span class="hljs-string">"redis-om"</span>;
<span class="hljs-keyword">const</span> client = <span class="hljs-keyword">new</span> Client();
<span class="hljs-keyword">const</span> con = <span class="hljs-keyword">await</span> client.open(process.env.REDIS_URL);
<span class="hljs-keyword">if</span>(con){
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Redis connected"</span>);
}
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> client;
</code></pre>
<p>In this above code, At first client instance is created and by the help of that instance connection is established through <code>REDIS_URL</code> which contains the redis connection url in .env file.</p>
<blockquote>
<p>✅Tip: The Redis connection is only initialize on schema file only because by doing this, There is no need to define connection everywhere🙂.</p>
</blockquote>
<p>After that I created the schema of user and idea like this:</p>
<p>Idea schema:</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> ideaSchema = <span class="hljs-keyword">new</span> Schema(
  Idea,
  {
    <span class="hljs-attr">idea_title</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"text"</span>,
    },
    <span class="hljs-attr">idea_des</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"text"</span>,
    },
    <span class="hljs-attr">idea_doc</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"text"</span>,
    },
    <span class="hljs-attr">user_id</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">idea_userImg</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">idea_postedBy</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">idea_tag</span>: { <span class="hljs-attr">type</span>: <span class="hljs-string">"string[]"</span> },
  },
  {
    <span class="hljs-attr">dataStructure</span>: <span class="hljs-string">"JSON"</span>,
  }
);
</code></pre>
<p>User Schema:</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> userSchema = <span class="hljs-keyword">new</span> Schema(
  User,
  {
    <span class="hljs-attr">user_gid</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">user_name</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">user_email</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">user_doc</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
    <span class="hljs-attr">user_pic</span>: {
      <span class="hljs-attr">type</span>: <span class="hljs-string">"string"</span>,
    },
  },
  {
    <span class="hljs-attr">dataStructure</span>: <span class="hljs-string">"JSON"</span>,
  }
);
</code></pre>
<p>And then initialize the schema by making their repository where we can perform different operation like this:</p>
<pre><code class="lang-js"><span class="hljs-comment">//initializing User schema</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> userRepository = client.fetchRepository(userSchema);
<span class="hljs-keyword">await</span> userRepository.dropIndex();
<span class="hljs-keyword">await</span> userRepository.createIndex();

<span class="hljs-comment">//initializing Idea schema</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> ideaRepository = client.fetchRepository(ideaSchema);
<span class="hljs-keyword">await</span> ideaRepository.dropIndex();
<span class="hljs-keyword">await</span> ideaRepository.createIndex();
</code></pre>
<p>After that I started to make Routes of Idea, user and stat(This routes helps to get statistics of the ideao and top contributor). One example of Route is given below</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { Router } <span class="hljs-keyword">from</span> <span class="hljs-string">"express"</span>;
<span class="hljs-keyword">import</span> {
  deleteIdea,
  getAllIdea,
  getMyIdea,
  postIdea,
  searchIdea,
} <span class="hljs-keyword">from</span> <span class="hljs-string">"../controllers/_idea.js"</span>;

<span class="hljs-keyword">const</span> router = Router();

router.route(<span class="hljs-string">"/"</span>).get(getAllIdea);
router.route(<span class="hljs-string">"/:user_id"</span>).get(getMyIdea);
router.route(<span class="hljs-string">"/:idea_id"</span>).delete(deleteIdea);
router.route(<span class="hljs-string">"/search/:srh"</span>).get(searchIdea);
router.route(<span class="hljs-string">"/"</span>).post(postIdea);

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> router;
</code></pre>
<p>Like wise other routes are created and After it, Let's move to different controllers where is the core logic of api. One example of controller of idea which is shown up:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { ideaRepository } <span class="hljs-keyword">from</span> <span class="hljs-string">"../schema/idea.schema.js"</span>;

<span class="hljs-comment">//Api for Getting all idea</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> getAllIdea = <span class="hljs-keyword">async</span> (req, res) =&gt; {
  <span class="hljs-keyword">try</span> {
    <span class="hljs-keyword">const</span> allIdea = <span class="hljs-keyword">await</span> ideaRepository.search().returnAll();
    res.status(<span class="hljs-number">200</span>).send(allIdea);
  } <span class="hljs-keyword">catch</span> (error) {
    <span class="hljs-built_in">console</span>.log(error);
    res.status(<span class="hljs-number">400</span>).send(error);
  }
};

... <span class="hljs-comment">// Other Controllers</span>
</code></pre>
<p>At first, Relevant Schema's Repository is initialize and all operation are performed on it.
Likewise, Other controller are created.</p>
<p>In this way, Ideao backend is created.</p>
<blockquote>
<p>Yah, I know It's bit longer but covering all aspects is helpful for all. </p>
</blockquote>
<h1 id="heading-important-links">Important Links🔗</h1>
<ul>
<li>App : <a target="_blank" href="https://ideao.netlify.app/">Ideao</a></li>
<li>Source Code : <a target="_blank" href="https://github.com/utsavbhattarai007/ideao">Github</a></li>
</ul>
<hr />
<h1 id="heading-conclusion">Conclusion</h1>
<p>After a huge brainstorming with lots of frustrating moment, finally Ideao was created. It's been a worth of learning project which has tested by passion level and enhance my problem solving skill. Doing project, participating in hackathon and contributing in Open source community is best way to be a pro(good) programmer. It should be added on every immersing developer passion. </p>
<p>Thanks for reading🔥 Giving your precious time to read it, It's awesome🤩</p>
<p>Connect me through twitter : <a target="_blank" href="https://twitter.com/utsavbhatrai007">@utsavbhatrai007</a></p>
]]></content:encoded></item><item><title><![CDATA[How to display a image selected from input file in react?]]></title><description><![CDATA[Overview
Sometimes, We want to display image selected from input file in React but we stuck following traditional way to do that. So In this article, We will learn to do so with easy way.
Let's get started⚡

How to do?
To display a image selected fro...]]></description><link>https://blog.utsavbhattarai.info.np/how-to-display-a-image-selected-from-input-file-in-react</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/how-to-display-a-image-selected-from-input-file-in-react</guid><category><![CDATA[React]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[images]]></category><category><![CDATA[BlogsWithCC]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sat, 01 Oct 2022 16:09:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1664640605594/9qS1V_-Le.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-overview">Overview</h1>
<p>Sometimes, We want to display image selected from input file in React but we stuck following traditional way to do that. So In this article, We will learn to do so with easy way.</p>
<p>Let's get started⚡</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1664639371036/ZQ2AldM_k.gif" alt="Let'SGetStartedGIF.gif" /></p>
<h1 id="heading-how-to-do">How to do?</h1>
<p>To display a image selected from file input, we can call the <code>URL.createObjectURL</code> with the selected file object and set the returned value as the value of the <code>src</code> prop of the img element.</p>
<p>For instance, we can write:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> React, { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> [pic, setPic] = useState();

  <span class="hljs-keyword">const</span> getImg = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    <span class="hljs-keyword">const</span> [file] = e.target.files;
    setPic(URL.createObjectURL(file));
  };

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"file"</span> <span class="hljs-attr">onChange</span>=<span class="hljs-string">{getImg}</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">{pic}</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"img"</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );
}
</code></pre>
<p>We define the <code>pic</code> state which we use as the value of the <code>src</code> prop of the img element.</p>
<p>Next, we define the <code>getImg</code> function that takes the file from the <code>e.target.files</code> property via destructuring.</p>
<p>Then we call <code>URL.createObjectURL</code> on the file to return a URL that we can use as the value of <code>pic</code>.</p>
<p>And we call <code>setPic</code> with the returned URL string to set that as the value of  <code>pic</code>.</p>
<p>In this way, We can select the image from input easily🔥.</p>
<p>Connect me through👉 <a target="_blank" href="https://twitter.com/utsavbhatrai007">@utsavbhatrai007</a></p>
<p>Thanks for reading🤩</p>
]]></content:encoded></item><item><title><![CDATA[AI🤖 for writing assistant!]]></title><description><![CDATA[Are you a writer and looking for an AI🤖 writing assistant? Then, you’ve landed in the right place. Just roll it😵‍💫.
Overview
Writing✍️ has always been there from the beginning of human civilizations when languages came into existence. The best way...]]></description><link>https://blog.utsavbhattarai.info.np/ai-for-writing-assistant</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/ai-for-writing-assistant</guid><category><![CDATA[#week4]]></category><category><![CDATA[4articles4weeks]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sun, 11 Sep 2022 16:49:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1662914539540/H2daJ0osT.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Are you a writer and looking for an AI🤖 writing assistant? Then, you’ve landed in the right place. Just roll it😵‍💫.</p>
<h1 id="heading-overview">Overview</h1>
<p>Writing✍️ has always been there from the beginning of human civilizations when languages came into existence. The best way to document history is to write, we know the history of the world because somebody has written it.</p>
<p>From this note, we can understand how important writing is. On this day, writing has become very dynamic and widely used as a medium of communication, documenting history, learning, etc. Whether you are a content writer, an author, a blogger, or anyone related to writing work you need a writing assistant to make your writing efficient.</p>
<p>A writing assistant can help you in many ways such as checking your word spelling, grammatical mistakes, suggestions for it, word counts, etc.</p>
<blockquote>
<p>Yeah, You Thinking of the Replacement of a Content writer with AI. Hmm🤔 Just chill my friend, They are just helping tools for the writer for the enhancement of their content.</p>
</blockquote>
<hr />
<p>But before moving to the compiled list, let’s have a look at what features you should look for while choosing writing assistant software.</p>
<h1 id="heading-features-of-ai-writing-assistant">Features of AI🤖 Writing Assistant</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662914752755/yqAv_izep.png" alt="features.png" /></p>
<h3 id="heading-1-spell-check">1. Spell Check</h3>
<p>Spell check will help to identify the wrong spelled words and give the correct spelling suggestions. This feature is very helpful for new aspiring writers who have just started writing and make spelling mistakes.</p>
<p>We often forgot the spelling of small words or misspelled a word while writing due to typing errors, all of these can be avoided with the help of the writing assistant spell check feature. This simple tool can help you to avoid embarrassment.</p>
<h3 id="heading-2-grammar-check">2. Grammar check</h3>
<p>The next feature every writing assistant should have is a grammar check. This feature is very important even if a good speaker makes mistakes in grammar and that makes perfect sense because proper grammar is not used around us. These things we learn in school and forget after all🤣.</p>
<p>The grammar check will pick out the grammatical mistake and give you a proper suggestion for it. Thus, you can correct it right there. These mistakes become more embarrassing in official communication and create a bad impression.</p>
<h3 id="heading-3-word-count">3. Word count</h3>
<p>The word count feature is also one of the most needed features. The word count tells you about the density of words. It helps you to limit your writing to a certain number of words. The change of paragraphs can be known and We can easily manage word for each paragraph.</p>
<h3 id="heading-4-rich-text-editor">4. Rich Text Editor</h3>
<p>The rich text editor allows us to format the document in an organized manner and we can highlight the heading and subheadings. The rich text editors allow images to be inserted between your paragraphs and have many features. This helps a lot for content writers and bloggers who often use rich media content in the writing process. This gives a good reading experience if the writing is arranged and presented well.</p>
<h3 id="heading-5-autosave">5. AutoSave</h3>
<p>Since we are using computers and laptops for our writing purpose, there are chances to quit the window by mistake, the computer gets shut down, and all your work will be lost if the autosave feature is missing in the writing software. This is a good feature to look for in any writing assistant software hunt.</p>
<hr />
<h1 id="heading-some-ai-writing-assistant-software">Some AI🤖 writing Assistant software</h1>
<h2 id="heading-1-grammarly">1 . Grammarly</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662911330977/qHFfJMVcr.png" alt="grammarly.png" /></p>
<p><a target="_blank" href="https://www.grammarly.com">Grammarly</a> is one of the best writing assistant tools that allow spell check, grammar check, and overall mistake-free writing. This boost your confidence to write error-free communications and impact your writing. Grammarly allows you to integrate with your favorite browsers and help you to correct everything you write on the internet. This is one of the widely used grammar tools and helps millions of users to write with confidence.</p>
<h3 id="heading-key-features-of-grammarly"><strong>Key features of Grammarly</strong></h3>
<ul>
<li><p>Spelling and Grammar check</p>
</li>
<li><p>Plagiarism Checker</p>
</li>
<li><p>Phrase Suggestions</p>
</li>
<li><p>Word counter</p>
</li>
<li><p>Tone detector</p>
</li>
<li><p>Integrates with all popular browsers</p>
</li>
<li><p>Desktop application with AI-powered</p>
</li>
</ul>
<h3 id="heading-pricing"><strong>Pricing</strong></h3>
<p><strong>Free</strong> - Free for spell and grammar checker with limited features.</p>
<p><strong>Premium</strong> - $30/month for style, clarity improvements, and additional advanced corrections.</p>
<h2 id="heading-2-prowritingaid">2 . ProWritingAid</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662911506851/4kH015Whp.png" alt="aid.png" /></p>
<p><a target="_blank" href="https://prowritingaid.com">ProWritingAid</a> is another online software that offers a great writing assistant with spell check, grammar check, and sentence beautification delivered in real-time as you write. This is a great online tool that offers in-depth writing assistance and improves and encourages you to write better than yesterday. You are given hundreds of suggestions and you can choose among them which best suits your writing.</p>
<h3 id="heading-key-features-of-prowritingaid"><strong>Key features of ProWritingAid</strong></h3>
<ul>
<li><p>Spelling and Grammar correction</p>
</li>
<li><p>Phrase generation</p>
</li>
<li><p>15 Different writing reports</p>
</li>
<li><p>Improve style and Strength</p>
</li>
<li><p>Eliminate Embarrassing errors</p>
</li>
<li><p>Integrate with third-party apps</p>
</li>
<li><p>Customizable as per your need</p>
</li>
<li><p>Data visualization for in-depth analysis</p>
</li>
<li><p>Plagiarism checker</p>
</li>
</ul>
<h3 id="heading-pricing-1"><strong>Pricing</strong></h3>
<p><strong>Free</strong> - 7 days free trial</p>
<p><strong>Premium</strong> - $20/month</p>
<blockquote>
<p>Go with yearly plan and save up to 67%</p>
</blockquote>
<h2 id="heading-3-google-docs">3 . Google Docs</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662911827173/qNn2OkpQN.png" alt="google_doc.png" /></p>
<p><a target="_blank" href="https://www.google.com/docs/about/">Google Docs</a> is a simple online tool that offers writing help with its effective features. This is a tool that has features such as spell check, grammar check, word counter, etc. It is the best free writing assistant which provides top notch features.</p>
<p>The automatic saving feature, whenever changes are made to the document. The word counter shows the number of words on the document. This helps authors and writers to stay within the word limit for any sub-part of the document. I had include this goggle product because I have using this for a long time for a documentation purpose, report writing and blog writing.</p>
<h3 id="heading-key-features-of-google-docs"><strong>Key features of Google Docs</strong></h3>
<ul>
<li><p>Rich text Editor</p>
</li>
<li><p>Spell and Grammar Check</p>
</li>
<li><p>Best for Documentation Writing</p>
</li>
<li><p>Word Counter</p>
</li>
<li><p>Language Translator</p>
</li>
<li><p>Voice typing</p>
</li>
<li><p>Dictionary</p>
</li>
</ul>
<h3 id="heading-pricing-2"><strong>Pricing</strong></h3>
<p><strong>Free</strong> - Free with Google account</p>
<hr />
<h1 id="heading-additional-tools">Additional tools</h1>
<h3 id="heading-1-writesonic">1. Writesonic</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662912265857/v5xl5oS4E.png" alt="write.png" /></p>
<p><a target="_blank" href="https://writesonic.com">Writesonic</a> is the AI writer that helps you write SEO-optimized, long-form (up to 1500 words) blog posts &amp; articles in 15 seconds.</p>
<h3 id="heading-2-frase">2. Frase</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662912122352/ZGfsLJLaX.png" alt="frase.png" /></p>
<p><a target="_blank" href="https://www.frase.io">Frase</a> is also a AI powered writing assistant which helps you to research, write, and optimize content that ranks 1st on Google in minutes instead of hours.</p>
<h3 id="heading-3-copy-ai">3. Copy ai</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662912458965/Ix23AMVCp.png" alt="copyai.png" /></p>
<p><a target="_blank" href="https://www.copy.ai">Copy.ai</a> is an AI-powered content writing tool that claims to help people write better content.</p>
<h3 id="heading-4-ai-writer">4. AI Writer</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662912520102/Bndkau6oQ.png" alt="aiwriter.png" /></p>
<p><a target="_blank" href="https://ai-writer.com">AI-Writer</a> is the most accurate content generation platform, using state-of-the-art AI writing models to generate articles from just a headline.</p>
<h3 id="heading-5-hyperwrite">5. Hyperwrite</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662912579005/m_Vfx7ebW.png" alt="hyper.png" /></p>
<p><a target="_blank" href="https://hyperwriteai.com">Hyperwrite</a> is a AI tools that provides suggestions and sentence completions to improve your writing, wherever you write.</p>
<hr />
<h1 id="heading-conclusion">Conclusion</h1>
<p>They are just a tool for enhancing writing skills by correcting spelling, grammar, tone and other aspects which gives a top-notch content reading experience. This is the only AI tools used are made by humans so there is nothing to worry about the replacement of content writers with AI because AI can only detect the error in spelling, grammar and other things but the way of integrating the experience and knowledge by the real content writer cannot be done by AI.</p>
<p>Thanks for Reading🔥</p>
<p>Connect me through Twitter: <a target="_blank" href="https://twitter.com/utsabdev">@utsabdev</a></p>
]]></content:encoded></item><item><title><![CDATA[I stuck😵‍💫? What to do?]]></title><description><![CDATA[Intro
What a wonderful evening, sitting in a comfortable chair in front of the desk and just coding some tech stuff. Suddenly, My brain got stuck and became blank neither I can think nor react. That's a situation sometimes every immersing developer s...]]></description><link>https://blog.utsavbhattarai.info.np/i-stuck-what-to-do</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/i-stuck-what-to-do</guid><category><![CDATA[4articles4weeks]]></category><category><![CDATA[#week2]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Mon, 29 Aug 2022 18:09:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1661796481499/tdMZfAmVq.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-intro">Intro</h1>
<p>What a wonderful evening, sitting in a comfortable chair in front of the desk and just coding some tech stuff. Suddenly, My brain got stuck and became blank neither I can think nor react. That's a situation sometimes every immersing developer suffers a lot but It will become normal after a huge brainstorming😵‍💫.</p>
<p>Let me drop a few quick tips that’ll eventually help you stop wasting your days by surrendering yourself to your overwhelming feelings.</p>
<hr />
<h1 id="heading-when-i-get-stuck-what-do-i-do">When I get stuck What do I do🤔?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661796249089/5_W4erVvD.gif" alt="KruleJohnCReillyGIF.gif" /></p>
<h2 id="heading-console-it">Console it</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662183136199/FYx5H7-F0.gif" alt="ToolKit.gif" /></p>
<p>I am not saying to console the problem in the console. Its meaning is to step back from the problem analyze it from the root and figure out what actually a problem was. Sometimes figuring out the problem may solve the root of the problem.</p>
<hr />
<h2 id="heading-how-do-you-figure-out-what-the-problem-is">How do you figure out what the problem is?</h2>
<p>In the programming, The problem that you faced is already been faced by another developer. That's why Scraping the problem in relevant platform helps you to solve the problem. The Relevant platform are:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662184143625/AkE7nF5nz.png" alt="ToolKit (1).png" /></p>
<ul>
<li><strong>Google</strong> : <code>Googling</code> is one of the most important skills to have as a developer. Because Google has everything you are looking for. The trick is finding exactly what you’re looking for quickly and the best way is by being concise and searching using exact keywords.</li>
</ul>
<hr />
<ul>
<li><strong>Asking questions on Stack Overflow, Quora or discussion forum</strong>: Platform like Stack Overflow, and Quora are built to discuss the problem and solve it. So Asking questions on this platform definitely frees you from getting stuck.</li>
</ul>
<hr />
<ul>
<li><strong>Asking questions with your coding buddy</strong>: Friends are the problem solvers in each and every situation. In the context of programming, problems, bugs and errors are daily life routines. Communicating and collaborating with your coding buddy helps you to solve the problem.</li>
</ul>
<hr />
<ul>
<li><strong>Reading Blog</strong>: A blog is the main source of learning that helps us to understand a specific topic and gives a generic idea about the error that may come in the future or It helps to solve the problem.</li>
</ul>
<hr />
<ul>
<li><strong>YouTube Tutorial</strong>: YouTube tutorial is the last option to solve the programming problem because everyone avoids the tutorial hell. You just need to dig down deeper in the rabbit hole. Search with the right keyword you’ll get the right tutorial that solved your problem easily.</li>
</ul>
<hr />
<h2 id="heading-when-nothing-works-for-you">When nothing works for you?</h2>
<p>Take a deep breath, Take a coffee, rest for 1 day and enjoy the 1 day what you like most By doing this your mind will be rebooted with new energy which helps to solve the problem easily.</p>
<hr />
<h1 id="heading-conclusion">Conclusion</h1>
<p>As a developer, I usually get stuck and spend days and nights solving it. But After solving it it's adrenaline hits differently 🤩. Solving the problem is sometimes frustrating but It enhances our capability, check our passion level and passes problem of problems which we should solve by grinding day and night. At last, That's an instance of time when we finally solved the problem giving goosebumps and unlocking the next hard level of the problem which we will solve in the future.</p>
<p>Problems are the golden key to success (As I reminded you the school day just for fun🤣 ). Problem-solving skills help you to develop cognitive abilities and gain experience with a certain technology.</p>
<p>Thanks for reading🔥</p>
]]></content:encoded></item><item><title><![CDATA[I am a developer. How? why ?🤔]]></title><description><![CDATA[H3llo👋, Just wondering Why I am a developer. Stick with me to know it.
About me
So before knowing Why I am a developer? , You have to know one thing. Who is Utsav? Just like declaring a variable before using it. Let me first initialize myself and my...]]></description><link>https://blog.utsavbhattarai.info.np/i-am-a-developer-how-why</link><guid isPermaLink="true">https://blog.utsavbhattarai.info.np/i-am-a-developer-how-why</guid><category><![CDATA[4articles4weeks]]></category><category><![CDATA[week1]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[Utsav bhattarai]]></dc:creator><pubDate>Sun, 21 Aug 2022 19:07:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1661108461946/tWGLmO1KN.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>H3llo👋, Just wondering Why I am a developer. Stick with me to know it.</p>
<h1 id="heading-about-me">About me</h1>
<p>So before knowing Why I am a developer? , You have to know one thing. Who is Utsav? Just like declaring a variable before using it. Let me first initialize myself and my properties clearly. So that there will not be any runtime errors while your brain complies and runs this content.</p>
<pre><code class="lang-plaintext">let utsav = {
 age : 18,
 personality: "shy",  
 whenFree:{
    exploration: true,
    reading: true,
    gaming: true,
  },
  properties:{
      nature: "friendly", mindSet: "Creative",
      views: "different",  Communication: "Try to speak less"
  },
  varients: {
      programmer: true,
      designer: true,
      traveller: true,
  },
  lovesTo: ["Surfing new tech stuff", "Travelling", "Gaming", "Learning from others", . . . ],
  fearOf: ["error"],  //But After Solving it, It's adrenaline hits different🤩.
}
</code></pre>
<blockquote>
<p>The reason for using <code>let</code> in declaration is: The properties will change throughout life that's a natural process.</p>
</blockquote>
<p>No further delay, Let's dive in!</p>
<h1 id="heading-my-backstory">My Backstory</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661108625568/p-RSyHC2i.png" alt="3.png" /></p>
<p>It's the story of a shy boy who used to play mobile games, later on, started playing with tech stuff and it's going. He started this tech journey from 6 standard. At that time, He touched the computer for the first time realizing the power of this tool, He was so amazed that He just started to explore it. As we know, Anyone who enters to this digital verse never comes back again. As time passes, the boy goes on trying new things, thinking of How to solve errors and bugs, and after solving it enjoying that moment. The boy makes this process as a passion.</p>
<p>As for the programming aspect, He started learning basic programming from the Nine standard that are included in the education syllabus. As we know, school knowledge is not enough for the developer. He started to learn and scraped new things. He had an interest in building a good user interface. Since He already knew HTML and CSS, he slowly moved into learning JavaScript.</p>
<p>Even though learning JavaScript was a bit of a pain, He fell in love with this language once He became familiar with it. And now it's his favorite programming language and the one that He uses the most. After becoming somewhat comfortable with JS, He decided to move into React To be honest, He fell even more in love with React and JavaScript in general. From that onwards He started building a few side projects. and He jumped to app development and started learning react native, might be thinking why react native as He was a Js background developer, He chose the relatable framework. After learning all this tech stuff, He started to contribute to Open source.</p>
<h1 id="heading-what-triggered-me-to-be-a-developer">What triggered me to be a developer?</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661108649391/vg_3IZ9l9.png" alt="4.png" /></p>
<p>As I am a technical student, I chose this stream because I love it but the main reason to dive into it is when I was in 9 standard handling the load of syllabus, suddenly inter-school web hackathon was organized. To be honest, At first, I was heisted to participate but my friend assisted me to joined on it. The main core theme of the hackathon was Visit Nepal 2020 and it was a duo team hackathon. The hackathon was 5 hours long. As the hackathon started, My hand started vibrating but I managed myself and we started building it. We had built the website which was pretty simple but for me, it was like a big project. After the completion of it, We are asked to present what we built. It was my first formal presentation. I managed to present all aspects of what we built. After that, The organizer showcased the result. Luckily, we got the second position. That moment🤩 triggered me to be a developer.</p>
<h1 id="heading-my-passion-for-programming">My passion for programming</h1>
<p>So, why did I go through the trouble of learning all these? Well, to be honest, I did it because it was pretty fun and enjoyable. Now, I know what you're thinking, "Coding for fun is not just enough". Yes! I agree, but this fun slowly became an irresistible passion for programming. Although there are times when I face annoying bugs and I think to myself that programming is very difficult, but fixing these bugs and finding solutions to different problems, drives my craze for programming to an even higher level.</p>
<p>But, if you ask some people why they would want to become developers, they might give one of these two answers or sometimes both. Either they say that it is because you get a high-paying job or that it is an important job that offers a career path with endless progression. These are some solid reasons you would want to be a developer and I too consider these, but there's a majority of developers who became developers because they just love coding and enjoy the process and their passion is coding.</p>
<p>I'll tell you why. As you might already know, I'm an 18-year-old and I have been into programming for about 4 years. That means that I started my journey when I was around 14 years old. At that time, I didn't know or care about getting a high-paying job. All I wanted was to enjoy the process of coding. So I did, and here I am, writing to you about why I am a developer. And in my opinion, if you want to become or achieve something, you've got to have a passion for it. Because if you don't, you'll stop halfway through the journey. Now, this is not to say that I don't want a high-paying job or and good career path, instead, my enthusiasm for programming is what motivates me to achieve great heights or build amazing software. A good example of this is the Open Source Community. Developers all over the world build and contribute to open-source software just to provide some value to the developer community, expecting nothing in return. I'm speechless to describe the open source community and I'm happy to be a part of it🙂.</p>
<p>Okay Let's wrap it up, The main reason Why I want to be a developer is passion, excitement and adrenaline which come after learning new tech stuff, solving errors, contributing to open source and completing projects.</p>
<p>Thanks for reading🔥</p>
<p>Connect with me through <a target="_blank" href="https://twitter.com/utsabdev">@utsabdev</a></p>
]]></content:encoded></item></channel></rss>