<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harsh3305</title>
    <description>The latest articles on DEV Community by Harsh3305 (@harsh3305).</description>
    <link>https://dev.to/harsh3305</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F952668%2F8c20dfe0-4d1a-4a67-b1ac-faf92746fd66.jpeg</url>
      <title>DEV Community: Harsh3305</title>
      <link>https://dev.to/harsh3305</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/harsh3305"/>
    <language>en</language>
    <item>
      <title>HRV-Mart</title>
      <dc:creator>Harsh3305</dc:creator>
      <pubDate>Mon, 08 May 2023 03:22:37 +0000</pubDate>
      <link>https://dev.to/hrv-mart/hrv-mart-4jc5</link>
      <guid>https://dev.to/hrv-mart/hrv-mart-4jc5</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;HRV-Mart is an open-source e-commerce platform. &lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;Wacky Wildcards&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;Currently, front-end of application in not ready. Therefore, I am sharing GitHub link of project. &lt;a href="https://www.github.com/HRV-Mart/HRV-Mart"&gt;HRV-Mart-Frontend&lt;/a&gt;&lt;br&gt;
You can find app link in &lt;code&gt;about section&lt;/code&gt; of above repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Home Page
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LVLaydLf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9xovq8enupucobaecjp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LVLaydLf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9xovq8enupucobaecjp.png" alt="Home Page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Login Page
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8XIVO3Vm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6f5o31t0f9onbmnrtcx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8XIVO3Vm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6f5o31t0f9onbmnrtcx.png" alt="Login Page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Product page
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ec1_iwsy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3iyhsheqzkt94a3gzlr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ec1_iwsy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3iyhsheqzkt94a3gzlr.png" alt="Product page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Response to Add To Cart
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yjocRIfZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1n36lmjd452uqh5wt4s6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yjocRIfZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1n36lmjd452uqh5wt4s6.png" alt="Response to Add To Cart" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;A platform where you can browse different products, add them in your cart and buy them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.github.com/HRV-Mart/"&gt;HRV-Mart GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.apache.org/licenses/"&gt;Apache License&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Most of popular e-commerce platform out in market are closed-source and are not transparent. Because of which I decided to create a open-source and transparent e-commerce platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;p&gt;In order to create a scalable back-end I use micro-service architecture. Current version of HRV-Mart back-end consist of &lt;a href="https://github.com/HRV-Mart/Backend-Product"&gt;Product-Microservice&lt;/a&gt;, &lt;a href="https://github.com/HRV-Mart/Backend-User"&gt;User-Microservice&lt;/a&gt;, &lt;a href="https://github.com/HRV-Mart/Backend-Auth"&gt;Auth-Microservice&lt;/a&gt;, &lt;a href="https://github.com/HRV-Mart/Backend-Order"&gt;Order-Microservice&lt;/a&gt;, &lt;a href="https://github.com/HRV-Mart/Backend-Cart"&gt;Cart-Microservice&lt;/a&gt;, &lt;a href="https://github.com/HRV-Mart/Backend-Like"&gt;Like-Micorservice&lt;/a&gt; and &lt;a href="https://github.com/HRV-Mart/API-Gateway"&gt;API-Gateway&lt;/a&gt;. Above micro-services are loosely couple and communication between them happens via &lt;a href="https://kafka.apache.org/"&gt;Apache Kafka&lt;/a&gt;. In order to make them more secure, I added unit tests. The &lt;code&gt;master&lt;/code&gt; branch is protected via &lt;a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches"&gt;branch protection rules&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BNpoQq-E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92ngq8uw86k22affm59q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BNpoQq-E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92ngq8uw86k22affm59q.png" alt="Branch Protection Rules" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In protection rules, I added &lt;code&gt;build workflow&lt;/code&gt; in &lt;code&gt;Require status checks to pass before merging&lt;/code&gt;. This is to ensure that before merging code in &lt;code&gt;master&lt;/code&gt; branch, build should run successfully. I also added &lt;a href="https://www.jacoco.org/jacoco/"&gt;Jacoco Code Coverage&lt;/a&gt; to make sure that enough unit tests are available in project and &lt;a href="https://detekt.dev/"&gt;Detekt&lt;/a&gt; to make sure that code in project is readable. I added them in &lt;code&gt;build&lt;/code&gt; configuration. Even if one of them gives error, build will fail. Whenever, someone push code in pull request, build action will run and check if build is running successfully or not.&lt;/p&gt;

&lt;p&gt;To deploy these services, I use docker. Docker images are created with help help of GitHub Action. When someone want to deploy their code in Production, they need to create a new release. In that release, they need to specify &lt;code&gt;tag name&lt;/code&gt;, &lt;code&gt;version&lt;/code&gt; and &lt;code&gt;change logs&lt;/code&gt;. After they clink on &lt;code&gt;Publish Release&lt;/code&gt;, &lt;code&gt;docker-image&lt;/code&gt; Action start running. It first build project and then build a docker image. That docker image is then publish on both &lt;code&gt;Docker Hub&lt;/code&gt; and &lt;code&gt;GitHub Packages&lt;/code&gt; by the workflow itself. After that, docker image from Docker Hub is pulled by &lt;code&gt;Azure Container Apps&lt;/code&gt; where we also have &lt;code&gt;Kafka Container&lt;/code&gt; running.&lt;/p&gt;

&lt;p&gt;In HRV-Mart organisation, their are some libraries created which are meant to use by multiple micro-services. For example, &lt;a href="https://github.com/HRV-Mart/Custom-Pageable"&gt;Custom-Pageable&lt;/a&gt; is use to add pagination in Backend-Product, Backend-Order, Backend-Like and Backend-Cart, &lt;a href="https://github.com/HRV-Mart/cart-response"&gt;Cart-Response&lt;/a&gt; contains cart model, &lt;a href="https://github.com/HRV-Mart/product"&gt;Product-library&lt;/a&gt; which contains product model, &lt;a href="https://github.com/HRV-Mart/user-library"&gt;user-library&lt;/a&gt; is use to receive &lt;code&gt;create user request&lt;/code&gt; from &lt;code&gt;auth micro-service&lt;/code&gt; and &lt;a href="https://github.com/HRV-Mart/order-library"&gt;order-library&lt;/a&gt; is use to receive order request. Both of them receive requests via Kafka. Both Cart-library and Product-library are use to calculate total cost of cart. They get data from &lt;code&gt;REST-endpoint&lt;/code&gt; of Cart and Product respectively by using &lt;a href="https://github.com/HRV-Mart/API-Call"&gt;API-Call&lt;/a&gt; library.&lt;/p&gt;

&lt;p&gt;Here you can find the workflow templates which I used in above repositories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/HRV-Mart/Backend-Product/blob/master/.github/workflows/build.yml"&gt;build.yml&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HRV-Mart/API-Call/blob/master/.github/workflows/publish.yml"&gt;publish.yml&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HRV-Mart/Backend-Product/blob/master/.github/workflows/docker_image.yml"&gt;docker-image.yml&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

&lt;p&gt;Managing so many repository by a single person without any help is a nightmare. Because of which, I use &lt;code&gt;GitHub project&lt;/code&gt; to manage these repositories. I also integrated them with &lt;code&gt;Discord&lt;/code&gt; using &lt;a href="https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks"&gt;web-hooks&lt;/a&gt;. I use GitHub Issues and GitHub Pull Request a lot to keep track of the tasks which I have to do. &lt;/p&gt;

</description>
      <category>githubhack23</category>
      <category>microservices</category>
      <category>githubactions</category>
      <category>kafka</category>
    </item>
    <item>
      <title>How to create a programming project</title>
      <dc:creator>Harsh3305</dc:creator>
      <pubDate>Wed, 02 Nov 2022 15:28:28 +0000</pubDate>
      <link>https://dev.to/harsh3305/how-to-create-a-programming-project-59bh</link>
      <guid>https://dev.to/harsh3305/how-to-create-a-programming-project-59bh</guid>
      <description>&lt;p&gt;In this article, I will explain how to create a project that can quickly scale up, have low latency and high performance within less time. If you are a beginner, you can also go through this article, as it does not require any prerequisite.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;Step-1&lt;/u&gt; 📝 Write down all necessary functions of project
&lt;/h2&gt;

&lt;p&gt;It would help if you wrote down all the necessary functionalities which define your project. In case of a complex project, first, create a &lt;a href="https://en.wikipedia.org/wiki/Minimum_viable_product"&gt;MVP (Minimum Viable Product)&lt;/a&gt; and note down all features. For example, if you want to create an e-commerce platform, the key features are: &lt;br&gt;
1) &lt;strong&gt;Login/Sign up&lt;/strong&gt;&lt;br&gt;
2) &lt;strong&gt;Display Products&lt;/strong&gt;&lt;br&gt;
3) &lt;strong&gt;Add Product to Cart&lt;/strong&gt;&lt;br&gt;
4) &lt;strong&gt;Place order&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;u&gt;Step-2&lt;/u&gt; 🧑‍🔧 Choose Technologies to create project
&lt;/h2&gt;

&lt;p&gt;In the case of an e-commerce application, you can divide the app into front-end, back-end and database. There are many tech stacks available for you to create projects like &lt;a href="https://www.mongodb.com/mern-stack"&gt;MERN stack&lt;/a&gt;, &lt;a href="https://www.mongodb.com/mean-stack"&gt;MEAN stack&lt;/a&gt;, and many more. I love to use &lt;a href="https://spring.io"&gt;Spring Boot&lt;/a&gt; for the back end, &lt;a href="https://nextjs.org"&gt;Next-js&lt;/a&gt; as the front end and &lt;a href="https://www.mongodb.com"&gt;Mongo-DB&lt;/a&gt; as the database. You can also use Next-js to create the back-end as well. Nevertheless, it is your call to pick a tech stack.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;u&gt;Step-3&lt;/u&gt; 🖇️ Break down project into small tasks
&lt;/h2&gt;

&lt;p&gt;Before going to programming stuff, you need to divide your project into small tasks which are easy to achieve. For example, create data classes (like the user, product, and cart classes), define endpoints for applications, and many more. I often use &lt;a href="https://www.atlassian.com/software/jira"&gt;Jira&lt;/a&gt; to organise my task.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;u&gt;Step-4&lt;/u&gt; 🧪 Test application
&lt;/h2&gt;

&lt;p&gt;Testing an application is very crucial. Make sure that while testing an application, you cover every corner case. In the case of a complex project, testing the entire application is very scary. To do this in a very effective way, you need to divide testing into stages. In the case of back-end development, I know a couple of testing stages which are unit testing (to test a small piece of code or feature), integration testing (first combining different modules and then testing them), and performance testing(It checks the overall performance of the product by creating mock traffic and calculating performance like latency). You can also use software like &lt;a href="https://www.postman.com"&gt;Postman&lt;/a&gt; to check the response of API calls on different-different parameters.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;u&gt;Step-5&lt;/u&gt; 👨‍💻 Maintain code-base
&lt;/h2&gt;

&lt;p&gt;To maintain your code, you can use &lt;a href="https://git-scm.com"&gt;Git&lt;/a&gt;. After that, you can push your code to platforms like &lt;a href="https://github.com/"&gt;Github&lt;/a&gt; or &lt;a href="https://about.gitlab.com/"&gt;Gitlab&lt;/a&gt;. These platforms will help you to maintain code, set up CICD(going to talk about this later), integrate with Jira, and many more.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;u&gt;Step-6&lt;/u&gt; 🌐 Deployment
&lt;/h2&gt;

&lt;p&gt;Deployment is significant, and sometimes it is tough to deploy your project at the last moment. Previously, deployment was a nightmare for me as I faced tons of errors, and due to this, I spent days deploying even simple applications. However, now I use CI/CD to deploy applications on platforms like Azure, Heroku and many more. CI/CD (or Continuous Integration Continuous Deployment) is an automation which deploys an application to a given server or groups of servers, and this is a one-time process; you have to define rules like if you push code or merge a branch into the master/main then deploy given code to production server else deploy code to preview server. To deploy the spring boot project, I use Azure and setup up &lt;a href="https://github.com/features/actions"&gt;Github Actions&lt;/a&gt; to deploy the project to production. You can use GitHub actions to do more than that. Before merging a PR(Pull Request) to master/main, you need to check whether the application is passing all tests and can build without an error; you can set up an action to do so.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;u&gt;Step-6&lt;/u&gt; 🔒 Security
&lt;/h2&gt;

&lt;p&gt;Creating a secure application is essential, primarily when your application handles sensitive data like email, passwords, credit cards or payment details. Also, it would be best if you made sure that it is not storing any secrets like database credentials or API keys in any version control system. While storing sensitive details on a database, first encrypt them so that even if someone gets access to your database, they should not be able to get your users' sensitive information.&lt;br&gt;
These are some basic steps which can make your project development journey more simple. Please let me know if I missed any information or wrote something wrong. &lt;br&gt;
Thanks&lt;br&gt;
Harsh Verma&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__user ltag__user__id__952668"&gt;
    &lt;a href="/harsh3305" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EwkdbMR2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--KMMsD2Rw--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/952668/8c20dfe0-4d1a-4a67-b1ac-faf92746fd66.jpeg" alt="harsh3305 image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/harsh3305"&gt;Harsh3305&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/harsh3305"&gt;Exploring different tools and technologies.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>devops</category>
      <category>security</category>
    </item>
  </channel>
</rss>
