<?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: Eralp</title>
    <description>The latest articles on DEV Community by Eralp (@eralpozcan).</description>
    <link>https://dev.to/eralpozcan</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%2F208747%2Ffa99f512-d328-49b4-8220-6bdb3d388131.jpeg</url>
      <title>DEV Community: Eralp</title>
      <link>https://dev.to/eralpozcan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eralpozcan"/>
    <language>en</language>
    <item>
      <title>How to Improve Our GitHub? How to Prepare a Profile? How to Write a README?</title>
      <dc:creator>Eralp</dc:creator>
      <pubDate>Fri, 29 Nov 2024 07:19:45 +0000</pubDate>
      <link>https://dev.to/eralpozcan/how-to-improve-our-github-how-to-prepare-a-profile-how-to-write-a-readme-386h</link>
      <guid>https://dev.to/eralpozcan/how-to-improve-our-github-how-to-prepare-a-profile-how-to-write-a-readme-386h</guid>
      <description>&lt;h2&gt;
  
  
  How to Improve Our GitHub? How to Prepare a Profile? How to Write a README?
&lt;/h2&gt;

&lt;p&gt;Hello everyone! In this article, I will cover how to make our &lt;strong&gt;GitHub/GitLab&lt;/strong&gt; profiles, repositories, and &lt;strong&gt;README&lt;/strong&gt; files more effective and professional. Additionally, I’ll explain why these elements are so important. Instead of focusing on questions like &lt;strong&gt;What is GitHub? / What is GitLab?&lt;/strong&gt;, we’ll dive into often-overlooked but globally significant details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F10654%2F0%2Ac-owjZs79fZcg82o" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F10654%2F0%2Ac-owjZs79fZcg82o" alt="Photo by [Roman Synkevych](https://unsplash.com/@synkevych?utm_source=medium&amp;amp;utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral)" width="800" height="522"&gt;&lt;/a&gt;&lt;em&gt;Photo by &lt;a href="https://unsplash.com/@synkevych?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Roman Synkevych&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is GitHub? What is GitLab?
&lt;/h2&gt;

&lt;p&gt;I won’t go into these topics in detail, but for those who are curious, here are some excellent resources to check out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://tugceakin.medium.com/git-github-gitlab-nedir-git-komutlar%C4%B1-aa1df62d2637" rel="noopener noreferrer"&gt;What is Git, GitHub, GitLab? Git Commands — Tuğçe Akın&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://engineering.teknasyon.com/git-nedir-github-kullan%C4%B1m%C4%B1-ve-temel-seviye-komutlar-182786c2d218" rel="noopener noreferrer"&gt;What is Git? GitHub Usage and Basic Commands — İrem Ateş&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Are GitHub or GitLab Profiles Important?
&lt;/h2&gt;

&lt;p&gt;The answer is straightforward: &lt;strong&gt;Your profile is your digital CV in the software world.&lt;/strong&gt; Whether you’re applying for a corporate position or working as a freelancer, your CV or portfolio is one of the most critical tools to showcase your skills and experience. In the software industry, the most effective form of this portfolio is your &lt;strong&gt;GitHub or GitLab profile&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Moreover, GitHub’s ability to connect you with job opportunities globally makes the content of your profile even more crucial. Thus, not only should your profile be well-organized and professional, but the repositories you direct people to should also be structured, clear, and user-friendly. Your profile and repositories are the most powerful tools to represent you and reflect your skills.&lt;/p&gt;

&lt;h3&gt;
  
  
  So, How Do You Do This?
&lt;/h3&gt;

&lt;p&gt;If your GitHub profile looks similar to the example below, you probably haven’t created a &lt;strong&gt;README.md&lt;/strong&gt; file or a repository with your username. Let’s create a repository using your GitHub username together! 😊&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfry6hojcdioc7y5tgnd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfry6hojcdioc7y5tgnd.png" alt="Default GitHub Profile View" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can proceed just like creating a normal repository. Enter your &lt;strong&gt;GitHub username&lt;/strong&gt; in the repository name field. GitHub will automatically recognize this as a special profile repository. Then, select &lt;strong&gt;Add a README file&lt;/strong&gt; and create the repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fez5yti4q9hu2hlap9200.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fez5yti4q9hu2hlap9200.png" alt="Repository Creation Stage" width="800" height="581"&gt;&lt;/a&gt;&lt;em&gt;Repository Creation Stage&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wsxkon4hqq72bece0xf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wsxkon4hqq72bece0xf.png" alt="Repository View" width="800" height="354"&gt;&lt;/a&gt;&lt;em&gt;Repository View&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fliwc2x3hzc4aze2vjhey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fliwc2x3hzc4aze2vjhey.png" alt="Profile View" width="800" height="461"&gt;&lt;/a&gt;&lt;em&gt;Profile View&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After creating the repository, your repository will look like the one on the left in the image, and your profile will resemble the one on the right.&lt;/p&gt;

&lt;p&gt;Now, it’s time to fill out and enhance your profile &lt;strong&gt;README&lt;/strong&gt;. But how do you do it? Coming up with something from scratch might seem difficult, but there are tools to make this process easier. 😎&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can I Improve My GitHub Profile?
&lt;/h2&gt;

&lt;p&gt;There are plenty of tools to help with this, so there’s no need to worry. Even if you think your profile doesn’t look great right now, there are websites and ideas to guide you toward improvement. Here are a few tools you can use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://rahuldkjain.github.io/gh-profile-readme-generator/" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub Profile README Generator&lt;/strong&gt;&lt;/a&gt;: This is one of the simplest and most well-known tools. Created by &lt;strong&gt;Rahuldkjain&lt;/strong&gt;, this excellent open-source project helps you design your profile by selecting a few options and filling out basic information. Initially, it worked with standard templates, but now it even allows you to integrate your Medium or Dev.to posts automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://profilinator.rishav.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;Profilinator&lt;/strong&gt;&lt;/a&gt;: Developed by &lt;strong&gt;Rishav&lt;/strong&gt;, this tool lets you modify styles and layouts via a simple editor. For example, you can divide your page into three sections. It also supports automatic integration of Medium and Dev.to posts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gprm.itsvg.in/" rel="noopener noreferrer"&gt;&lt;strong&gt;GPRM&lt;/strong&gt;&lt;/a&gt;: Unlike Rahul’s tool, this one offers easier customization of styles and features, helping you create a unique design language for your profile.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you prefer not to use a tool and want to design it yourself:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fio62qxkj7q1n5upprv8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fio62qxkj7q1n5upprv8t.png" alt="Awesome GitHub Profile" width="800" height="760"&gt;&lt;/a&gt;&lt;em&gt;Awesome GitHub Profile&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://zzetao.github.io/awesome-github-profile/" rel="noopener noreferrer"&gt;&lt;strong&gt;Awesome GitHub Profile&lt;/strong&gt;&lt;/a&gt;: This platform showcases various developer profiles, allowing you to explore different styles and adapt them to your own.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Are GitHub Repositories Important?
&lt;/h2&gt;

&lt;p&gt;Repositories play a crucial role in showcasing the technologies, projects, and even small &lt;strong&gt;Proof of Concept&lt;/strong&gt; (PoC) work you’ve done. They demonstrate your knowledge, coding quality, structural skills, and at least your familiarity with a subject. For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In a job interview, saying, “&lt;em&gt;I know Framework A&lt;/em&gt;” is very different from saying, “&lt;em&gt;I have several projects using Framework A.&lt;/em&gt;” It shows that you’ve gained hands-on experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repositories also highlight your adherence to standards. Most companies, regardless of their level, have some development standards that you’ll need to follow. For example:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Writing meaningful commit messages following the &lt;a href="https://www.conventionalcommits.org/en/v1.0.0-beta.2/" rel="noopener noreferrer"&gt;&lt;strong&gt;Conventional Commits&lt;/strong&gt;&lt;/a&gt;structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using &lt;a href="https://semver.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;Semantic Versioning&lt;/strong&gt;&lt;/a&gt; for version control.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Can We Improve the Look of Our GitHub Repositories?
&lt;/h2&gt;

&lt;p&gt;One of the most important elements for making a good impression with a project is the &lt;strong&gt;README file&lt;/strong&gt;. A well-crafted README makes it easier to understand and use your project. The following headings serve as a guide to making your README more effective:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project Name:&lt;/strong&gt; This represents the identity of your project and creates the first impression. Choose a short and clear title that defines your project. For example, “&lt;strong&gt;Weather Forecast Application&lt;/strong&gt;.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project Purpose:&lt;/strong&gt; Briefly explain what your project does, the problem it solves, or the need it fulfills. For instance, &lt;em&gt;“This project aims to provide users with real-time weather information. It offers city-based forecasts through a simple and user-friendly interface.”&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project Features:&lt;/strong&gt; List the main features of your project. This section helps users understand what your project offers:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- City-based weather forecasts
- Real-time updates
- User-friendly interface
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setup Instructions:&lt;/strong&gt; Provide a step-by-step guide on how to set up and run your project. Create a simple manual suitable for users with varying technical expertise.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Clone the repository:
  `git clone https://github.com/username/project-name.git`
2. Install dependencies:
  `npm install`
3. Run the application:
  `npm run dev`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Usage Guide:&lt;/strong&gt; Explain how to use your project. In this section, you can share example screenshots or commands. For instance: &lt;em&gt;“You can view the weather by selecting a city from the homepage.”&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Contributing:&lt;/strong&gt; Explain how users can contribute to your project. Provide a guide to help users get involved in the development.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛠 Fork the repository.&lt;/li&gt;
&lt;li&gt;Make changes.&lt;/li&gt;
&lt;li&gt;Submit a pull request.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;License:&lt;/strong&gt; Specify the license for your project. This clarifies how users can use and modify your project. For example: &lt;em&gt;“This project is licensed under the MIT License. For more information, please refer to the LICENSE file.”&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;A typical &lt;strong&gt;README&lt;/strong&gt; file is structured around 7–8 main sections, though the number of sections may vary depending on the level of detail you want to include in your project. Even if you don’t have Markdown knowledge, you can use the following tools to make your repositories more clear and visually appealing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;For those who want simplicity:&lt;/strong&gt; If you prefer to quickly create a structure with just a few clicks, the CLI-based &lt;a href="https://github.com/kefranabg/readme-md-generator" rel="noopener noreferrer"&gt;&lt;strong&gt;Readme MD Generator&lt;/strong&gt;&lt;/a&gt; is perfect for you! This tool helps you fill in basic details to generate a README file in no time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;For drag-and-drop users:&lt;/strong&gt; If you’re looking for a more visual and practical solution, &lt;a href="https://readme.so" rel="noopener noreferrer"&gt;&lt;strong&gt;readme.so&lt;/strong&gt;&lt;/a&gt; might be exactly what you need. It allows you to update your information and create a sleek README in minutes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;For those who like to do it all themselves:&lt;/strong&gt; If you’re more of a “hands-on” person who prefers to write everything from scratch, &lt;a href="https://www.makeareadme.com" rel="noopener noreferrer"&gt;&lt;strong&gt;makeareadme.com&lt;/strong&gt;&lt;/a&gt; is an ideal resource. It not only explains the importance of a &lt;strong&gt;README&lt;/strong&gt;but also provides an editor to assist in the writing process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;For inspiration from other projects:&lt;/strong&gt; If you’re curious about how other developers approach their READMEs, &lt;a href="https://github.com/matiassingers/awesome-readme" rel="noopener noreferrer"&gt;&lt;strong&gt;Awesome README&lt;/strong&gt;&lt;/a&gt; is a great place to start. You can explore examples from various projects, including NASA’s OGMA project, and draw inspiration for your own.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Ensure Simplicity and Organization in Your GitHub Repositories?
&lt;/h2&gt;

&lt;p&gt;Having a well-organized and aesthetically pleasing GitHub repository not only enhances its visual appeal but also makes it easier for others to understand and use your project. Here’s a step-by-step guide to achieving simplicity and organization in your repositories:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Edit Repository Details
&lt;/h3&gt;

&lt;p&gt;As shown in Images 1–2, you can edit your repository details by navigating to the “&lt;strong&gt;Settings&lt;/strong&gt;” tab at the top of the page and filling in the necessary fields.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Write a short sentence explaining the purpose of your project. (e.g., “Weather Forecast Application”).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; Add a link to your project’s demo or documentation if available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Topics:&lt;/strong&gt; Include relevant categories for your project (e.g., vue3, gpt-4) to improve visibility in search results.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Is This Important?&lt;/strong&gt;&lt;br&gt;
These details help users visiting your project page quickly understand its purpose. Additionally, a well-crafted description enhances your repository’s discoverability on search engines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgpxoprqxaaetynoi131q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgpxoprqxaaetynoi131q.png" alt="Edit Repository Details" width="637" height="493"&gt;&lt;/a&gt;&lt;em&gt;Edit Repository Details&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qk0zdjf0dxbdbwgs8v0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qk0zdjf0dxbdbwgs8v0.png" alt="Edit Repository Details Screen 2" width="639" height="487"&gt;&lt;/a&gt;&lt;em&gt;Edit Repository Details Screen 2&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Disable Unnecessary Features
&lt;/h3&gt;

&lt;p&gt;If your project doesn’t use &lt;strong&gt;Releases&lt;/strong&gt;, &lt;strong&gt;Packages&lt;/strong&gt;, or &lt;strong&gt;Deployments&lt;/strong&gt;, you can disable these features (as shown in Images 1–2).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;“Edit repository details”&lt;/strong&gt; menu and check or uncheck the relevant boxes to disable unnecessary features.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Is This Important?&lt;/strong&gt;&lt;br&gt;
Unused or empty sections can make your repository look cluttered. Keeping only actively used features visible adds simplicity and professionalism to your project.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Customize Wiki, Issues, and Projects Settings
&lt;/h3&gt;

&lt;p&gt;As shown in Images 3 and 4, you can enable or disable &lt;strong&gt;Wiki&lt;/strong&gt;, &lt;strong&gt;Issues&lt;/strong&gt;, and &lt;strong&gt;Projects&lt;/strong&gt; based on your project’s requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wiki:&lt;/strong&gt; Keep this open if you need a space for project documentation. Restrict editing to collaborators by enabling the &lt;strong&gt;“Restrict editing to collaborators only”&lt;/strong&gt; option.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Issues:&lt;/strong&gt; Enable this feature to allow contributions and bug tracking. You can also add an &lt;strong&gt;Issue Template&lt;/strong&gt; for structured feedback.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Projects:&lt;/strong&gt; Use this section to manage project-specific tasks and timelines. Enable it if task management within the repository is necessary.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Is This Important?&lt;/strong&gt;&lt;br&gt;
Managing these features according to your project’s needs keeps the repository organized and focused. Disabling unused features prevents unnecessary clutter and enhances the repository’s usability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkmthr67d0zj9gsun6rx8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkmthr67d0zj9gsun6rx8.png" alt="Screen-3" width="800" height="47"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Screen-3&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgcyjhynxiu1w1pfgn95.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgcyjhynxiu1w1pfgn95.png" alt="Screen-4" width="800" height="859"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Screen-4&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Fill in Required Fields
&lt;/h3&gt;

&lt;p&gt;Empty or missing details in your repository’s &lt;strong&gt;About&lt;/strong&gt; section (e.g., Description, Topics) can make the repository appear incomplete and unappealing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Fill in all required fields.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use a description and tags that align with your project to achieve a professional appearance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Is This Important?&lt;/strong&gt;&lt;br&gt;
Incomplete information makes it harder for users to understand your project and can make the repository seem amateurish.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Language Usage and Visuals
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Languages&lt;/strong&gt; section in your repository reflects the programming languages used, giving users insights into your code structure. Additionally, enhancing your README file with effective visuals can make your project more appealing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Add screenshots or diagrams in the README file to explain the project’s structure and usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Include code snippets with usage instructions to provide clear guidance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Is This Important?&lt;/strong&gt;&lt;br&gt;
Both textual and visual explanations help users quickly grasp the project and encourage contributions.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Conclusion: A More Unique and Streamlined Repository
&lt;/h3&gt;

&lt;p&gt;By following these steps, you can simplify and refine your GitHub repository, making it more professional and user-friendly. A well-organized and up-to-date project page is crucial for users looking to evaluate the quality and relevance of your project. Simplicity and functionality not only attract users but also motivate potential contributors.&lt;/p&gt;

&lt;p&gt;A polished repository is the most effective way to showcase your project and engage the community!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remember, a well-designed repository is the most effective way to present your project and capture the community’s interest! — ChatGPT&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article, I focused on the importance of GitHub/GitLab profiles and README files, sharing key points and tools to help you improve them.&lt;/p&gt;

&lt;p&gt;If you have any questions or suggestions, feel free to reach out to me via my &lt;a href="https://www.linkedin.com/in/eralpozcan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; profile. You can also find me on &lt;a href="https://bento.me/eralpozcan" rel="noopener noreferrer"&gt;Bento.me/eralpozcan&lt;/a&gt;or &lt;a href="https://eralpozcan.dev" rel="noopener noreferrer"&gt;eralpozcan.dev&lt;/a&gt;. 🤖&lt;/p&gt;

&lt;p&gt;Don’t forget to follow me on &lt;a href="https://github.com/eralpozcan" rel="noopener noreferrer"&gt;GitHub &lt;/a&gt;and drop your GitHub profiles in the comments 🎁&lt;/p&gt;

&lt;p&gt;See you in the next article! 📩&lt;/p&gt;

</description>
      <category>career</category>
      <category>github</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Github’ımız Nasıl Daha İyi Hale Getirilir? Profil Nasıl Hazırlanır? README Nasıl Yazılır?</title>
      <dc:creator>Eralp</dc:creator>
      <pubDate>Fri, 29 Nov 2024 00:21:03 +0000</pubDate>
      <link>https://dev.to/eralpozcan/githubimiz-nasil-daha-iyi-hale-getirilir-profil-nasil-hazirlanir-readme-nasil-yazilir-11ap</link>
      <guid>https://dev.to/eralpozcan/githubimiz-nasil-daha-iyi-hale-getirilir-profil-nasil-hazirlanir-readme-nasil-yazilir-11ap</guid>
      <description>&lt;h3&gt;
  
  
  Github’ımız Nasıl Daha İyi Hale Getirilir? Profil Nasıl Hazırlanır? README Nasıl Yazılır?
&lt;/h3&gt;

&lt;p&gt;Herkese merhaba! Bu yazıda, &lt;strong&gt;GitHub/GitLab&lt;/strong&gt; profillerimizi, repolarımızı ve &lt;strong&gt;README&lt;/strong&gt; dosyalarımızı nasıl daha etkili ve profesyonel hale getirebileceğimizi ele alacağım. Bunun yanı sıra, neden bu kadar önemli olduklarına dair bilgiler paylaşacağım. &lt;strong&gt;GitHub Nedir? / GitLab Nedir?&lt;/strong&gt; gibi temel soruların ötesine geçerek, birçok kişinin gözden kaçırdığı ancak global ölçekte oldukça önemsenen noktalara değineceğim.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5uy1upi7qht0jebdes1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5uy1upi7qht0jebdes1k.png" alt="Source: Roman Synkevyc" width="800" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Github Nedir? Gitlab Nedir?
&lt;/h3&gt;

&lt;p&gt;Bu konulara detaylıca değinmeyeceğim, ancak merak edenler için birkaç kaynağı aşağıya bırakıyorum:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tugceakin.medium.com/git-github-gitlab-nedir-git-komutlar%C4%B1-aa1df62d2637" rel="noopener noreferrer"&gt;Git, GitHub, GitLab Nedir? Git Komutları — Tuğçe Akın&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://engineering.teknasyon.com/git-nedir-github-kullan%C4%B1m%C4%B1-ve-temel-seviye-komutlar-182786c2d218" rel="noopener noreferrer"&gt;Git Nedir? GitHub Kullanımı ve Temel Seviye Komutlar — İrem Ateş&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GitHub veya GitLab Profilimiz Neden Önemli?
&lt;/h3&gt;

&lt;p&gt;Bu sorunun cevabı oldukça basit: &lt;strong&gt;Profiliniz, yazılım dünyasındaki dijital CV’nizdir.&lt;/strong&gt; Günümüzde, ister kurumsal bir işe başvuruyor olun ister freelance çalışıyor olun, sunduğunuz &lt;strong&gt;CV (özgeçmiş)&lt;/strong&gt; veya &lt;strong&gt;portföy&lt;/strong&gt;, yeteneklerinizi ve deneyimlerinizi sergilemenin en önemli araçlarından biri. Yazılım dünyasında ise, bu portföyün en etkili hali &lt;strong&gt;GitHub&lt;/strong&gt; veya &lt;strong&gt;GitLab&lt;/strong&gt; profilinizdir.&lt;/p&gt;

&lt;p&gt;Dahası, &lt;strong&gt;GitHub&lt;/strong&gt; üzerinden iş bulma imkanları, profillerinizin içeriklerini çok daha önemli hale getiriyor. Bu nedenle, sadece profilinizin değil, yönlendirdiğiniz repoların da düzenli, anlaşılır ve profesyonel bir yapıda olması gerekiyor. Profiliniz ve repolarınız, sizi tanıtan ve yeteneklerinizi yansıtan en güçlü araçlardır.&lt;/p&gt;

&lt;h3&gt;
  
  
  Peki bunu nasıl yapacağım?
&lt;/h3&gt;

&lt;p&gt;Öncelikle, GitHub profiliniz aşağıdakine benzer bir yapıda ise daha önce profiliniz için bir &lt;a href="https://en.wikipedia.org/wiki/README" rel="noopener noreferrer"&gt;README.md&lt;/a&gt; dosyası, yani kendi kullanıcı adınızla bir repository oluşturulmamış demektir. Şimdi, birlikte kendi kullanıcı adımızla bir repository oluşturalım. :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fniio5hqnsh35btb3b8z7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fniio5hqnsh35btb3b8z7.png" alt="Varsayılan Github Profile Görünümü" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Varsayılan Github Profile Görünümü&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Normal bir repository oluşturur gibi işlem yapıyoruz. Repository name alanına &lt;strong&gt;GitHub&lt;/strong&gt; kullanıcı adımızı yazıyoruz. &lt;strong&gt;GitHub&lt;/strong&gt;, bu adı algılayarak bize özel bir profil repository’si oluşturacağımızı otomatik olarak tanıyor. Ardından, alt seçeneklerden Add a &lt;strong&gt;README&lt;/strong&gt; file seçeneğini işaretleyerek repository’yi oluşturuyoruz.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fer63juhgmn38ceb7b1wb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fer63juhgmn38ceb7b1wb.png" alt="Create Repository" width="800" height="581"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Repository Oluşturma Aşaması&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frk6mku2j7d49f9cy4r5k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frk6mku2j7d49f9cy4r5k.png" alt="Readme Oluşturulmuş Repository Görünümü" width="800" height="355"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Readme Oluşturulmuş Repository Görünümü&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6fykoxbqyxm485sxg33l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6fykoxbqyxm485sxg33l.png" alt="Readme Oluşturulmuş Profil Görünümü&amp;lt;br&amp;gt;
" width="800" height="461"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Readme Oluşturulmuş Profil Görünümü&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Repository’yi oluşturduktan sonra, repository’niz görseldeki gibi (Sol) bir yapıya sahip olacaktır. Profiliniz ise görseldeki gibi (Sağ) bir görünüm kazanacaktır.&lt;/p&gt;

&lt;p&gt;Artık profil &lt;strong&gt;README&lt;/strong&gt;’nizi doldurma ve güzelleştirme zamanı geldi. Peki, bunu nasıl yapacağız? Hemen bir şeyler yaratmak zor olabilir, ancak bunu kolaylaştıracak araçlar mevcut. 😎&lt;/p&gt;

&lt;h3&gt;
  
  
  Github Profilimi Nasıl İyi Hale Getiririm? Nasıl doldurabilirim?
&lt;/h3&gt;

&lt;p&gt;Aslında bunun için bir çok araç olduğundan yazının yukarısında bahsetmiştim. Bu yüzden endişe edeceğimiz bir durum yok. Hatta kötü olduğunu düşünüyorsanız bile iyi yapacak fikirler için bile websiteler mevcut. Bu araçlara gelecek olursak ;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://rahuldkjain.github.io/gh-profile-readme-generator/" rel="noopener noreferrer"&gt;&lt;strong&gt;Github Profile Readme Generator&lt;/strong&gt;&lt;/a&gt;: Belki de en basit, kullanımı kolay ve en çok bilinen araçlardan biri olduğunu söyleyebilirim. &lt;a href="https://github.com/rahuldkjain" rel="noopener noreferrer"&gt;Rahuldkjain&lt;/a&gt; tarafından geliştirilen bu güzel açık kaynak proje, seçimlerinizi yaparak ve birkaç temel bilgiyi doldurarak profilinizi oluşturmanızı sağlıyor. Proje, ilk başlarda standart şablonlar üzerinde çalışıyordu, ancak günümüzde &lt;a href="https://medium.com/" rel="noopener noreferrer"&gt;Medium&lt;/a&gt; veya &lt;a href="http://dev.to/"&gt;Dev.to&lt;/a&gt; yazılarınızı bile otomatik olarak profilinize eklemenizi sağlayan bir eklenti ile birlikte geliyor.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://profilinator.rishav.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;Profilinator&lt;/strong&gt;&lt;/a&gt;: Rishav’ın geliştirdiği bu araç ise basit bir editor aracılıyla yapmış olduğunu stili ve tasarımları değiştirebiliyorsunuz. Örneğin sayfayı 3’e bölmek gibi. Yine burada &lt;a href="https://medium.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Medium&lt;/strong&gt;&lt;/a&gt; veya &lt;a href="http://dev.to/"&gt;&lt;strong&gt;Dev.to&lt;/strong&gt;&lt;/a&gt; yazılarınızı otomatik olarak ekleyebilirsiniz.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gprm.itsvg.in/" rel="noopener noreferrer"&gt;&lt;strong&gt;GPRM&lt;/strong&gt;&lt;/a&gt;: Rahul’un yaptığından farklı olarak bu aracımızda bazı stillemeler ve özellikleri daha kolay olarak seçerek tercih edebiliyor farklı bir tasarım dili ortaya çıkartabiliyorsunuz.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Eğer ki araç kullanmak istemiyorum. Stilleri merak ediyorum kendim de ona göre yapacağım derseniz;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsabjztvnq225jsledlb1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsabjztvnq225jsledlb1.png" alt="Awesome Github Profile" width="800" height="760"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Awesome Github Profile&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://zzetao.github.io/awesome-github-profile/" rel="noopener noreferrer"&gt;&lt;strong&gt;Awesome Github Profile&lt;/strong&gt;&lt;/a&gt;: Burada ise farklı yazılım geliştiricilerin kendi sayfalarını paylaştığı ve stil tarz anlamında farkılıkları görebileceğiniz ve esinlenip kendinize uyarlayabileceğiniz mükemmel bir site.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Github Repolarımız Neden Önemli?
&lt;/h3&gt;

&lt;p&gt;Repolarımız bizim yapmış olduğumuz öğrendiğimiz her teknolojinin, her projenin veya yapmış olduğumuz küçük &lt;strong&gt;PoC&lt;/strong&gt;(Proof of Concept)’ler barındırması dolayısıyla önem arz ediyor. Çünkü burada yapmış olduğumuz projeler bir konu hakkında bilgimizi, kod yazma kalitemizi, yapısal bilgilerimizi veya en azından o konu ile alakalı aşinalığımızı ispatlar nitelikte olmuş oluyor. Örneğin; Bir mülakatta “&lt;em&gt;A Framework’ünü kullanmayı biliyorum&lt;/em&gt;” demeniz ile “&lt;em&gt;A Framework’ü ile bir kaç temel projeye sahibim&lt;/em&gt;” demeniz arasında dağlar kadar fark var. En basit haliyle size devamında gelecek sorular genellikle hakim olduğunuz yerlerden olacaktır. Çünkü klasik tabir ile elinizi hamura buladınız.&lt;/p&gt;

&lt;p&gt;Bu repoların bir diğer önemi, projelerinizin hangi standartlara uygun olarak geliştirildiğini göstermesidir. Hangi şirkete giderseniz gidin, belirli standartlara uyum sağlamanız beklenecektir. Örneğin, git commit mesajlarınızın anlamlı ve belli bir yapı çerçevesinde olması beklenir. Çoğu açık kaynak projede &lt;a href="https://www.conventionalcommits.org/en/v1.0.0-beta.2/" rel="noopener noreferrer"&gt;Conventional Commits&lt;/a&gt; yapısı tercih edilir ve siz de commit mesajlarınızı bu standartlara uygun hale getirebilirsiniz. Ayrıca, versiyonlama için &lt;a href="https://semver.org/" rel="noopener noreferrer"&gt;Semantic Versioning&lt;/a&gt; gibi bir yapıyı öğrenmek ve uygulamak da oldukça faydalı olacaktır. Bu tür yaklaşımlar, projenize verdiğiniz önemi ve profesyonelliğinizi yansıtır.&lt;/p&gt;

&lt;h3&gt;
  
  
  Github Repolarımızın Görünümü Nasıl İyi Yapabiliriz?
&lt;/h3&gt;

&lt;p&gt;Bir projenin iyi bir izlenim bırakması için en önemli unsurlardan biri &lt;strong&gt;README dosyasıdır&lt;/strong&gt;. İyi bir README dosyası, projeyi anlamayı ve kullanmayı kolaylaştırır. Aşağıdaki başlıklar, README’nizi daha etkili hale getirmek için bir rehber niteliğindedir:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Proje Adı&lt;/strong&gt;: Projenin kimliğidir ve ilk izlenimi oluşturur. Projenizi tanımlayan kısa ve anlaşılır bir başlık seçin. Örneğin, “&lt;strong&gt;Hava Durumu Tahmin Uygulamas&lt;/strong&gt;ı” gibi.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Projenin Amac&lt;/strong&gt;ı: Projenizin ne işe yaradığını, hangi sorunu çözdüğünü veya hangi ihtiyacı karşıladığını kısa ve öz bir şekilde açıklayın. “&lt;em&gt;Bu proje, kullanıcılara gerçek zamanlı hava durumu bilgileri sağlamayı amaçlamaktadır. Basit ve kullanıcı dostu bir arayüzle şehir bazlı tahminlere ulaşabilirsiniz.&lt;/em&gt;”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Projenin Özellikleri:&lt;/strong&gt; Projenizin temel özelliklerini listeleyin. Kullanıcılar bu bölümde projenizin neler sunduğunu öğrenebilir.Şehir bazlı hava durumu tahminiGerçek zamanlı güncellemelerKullanıcı dostu arayüz&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kurulum Talimatları:&lt;/strong&gt; Projenizin nasıl kurulacağını ve çalıştırılacağını adım adım açıklayın. Teknik bilgi seviyesi farklı olan kullanıcılar için basit bir rehber oluşturun.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Depoyu klonlayın:
  `git clone &amp;lt;https://github.com/kullaniciadi/proje-adi.git&amp;gt;`
2. Gerekli bağımlılıkları yükleyin:
  `npm install`
3. Uygulamayı başlatın:
  `npm run dev`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kullanım Kılavuzu&lt;/strong&gt;: Projenizin nasıl kullanılacağını açıklayın. Bu bölümde örnek ekran görüntüleri veya komutlar paylaşabilirsiniz. &lt;em&gt;“Ana sayfadan bir şehir seçerek hava durumunu görüntüleyebilirsiniz.”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Katkıda Bulunma :&lt;/strong&gt; Projenize nasıl katkıda bulunulabileceğini açıklayın. Kullanıcıların projeye dahil olması için rehberlik sunun.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- 🛠 Bu projeyi fork edin
- Değişikliklerinizi yapın
- Bir pull request gönderin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lisans:&lt;/strong&gt; Projenizin lisansını belirleyin. Bu, kullanıcıların projenizi nasıl kullanabileceğini ve değiştirebileceğini açıklar. Örneğin: “”Bu proje MIT Lisansı ile lisanslanmıştır. Daha fazla bilgi için LICENSE dosyasına bakabilirsiniz.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Genel olarak bir README dosyası 7–8 ana başlık altında yapılandırılır, ancak bu başlık sayısı, projenizde vermek istediğiniz detaylara göre değişiklik gösterebilir. Markdown bilginiz olmasa bile, aşağıda paylaştığım birkaç kullanışlı araç sayesinde repolarınızı daha anlaşılır ve estetik hale getirebilirsiniz:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Detaylarla uğraşmak istemeyenler için:&lt;/strong&gt; Eğer sadece birkaç tuşlama ile hazır bir yapı oluşturmak istiyorsanız, CLI tabanlı bir araç olan &lt;a href="https://github.com/kefranabg/readme-md-generator" rel="noopener noreferrer"&gt;&lt;strong&gt;Readme MD Generator&lt;/strong&gt;&lt;/a&gt; tam size göre! Bu araç, temel bilgileri doldurarak hızlıca bir &lt;strong&gt;README&lt;/strong&gt; oluşturmanızı sağlar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sürükle-bırak yöntemiyle çalışanlar için:&lt;/strong&gt; Eğer daha görsel ve pratik bir çözüm arıyorsanız, &lt;a href="https://readme.so/" rel="noopener noreferrer"&gt;&lt;strong&gt;readme.so&lt;/strong&gt;&lt;/a&gt;, ihtiyacınızı karşılayabilir. Sadece bilgilerinizi güncelleyerek kısa sürede şık bir &lt;strong&gt;README&lt;/strong&gt; oluşturabilirsiniz.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Her şeyi kendisi yapmayı sevenler için:&lt;/strong&gt; Eğer “Ben old school’um, her şeyi kendim yaparım, &lt;strong&gt;README&lt;/strong&gt;’mi de kendim yazarım” diyorsanız, &lt;a href="https://www.makeareadme.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;makeareadme.com&lt;/strong&gt;&lt;/a&gt; sizin için ideal bir kaynak. Burada &lt;strong&gt;README&lt;/strong&gt; yazmanın neden önemli olduğunu öğrenebilir ve yazım sürecini destekleyecek bir editör kullanabilirsiniz.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Farklı projelerden ilham almak isteyenler için:&lt;/strong&gt; Eğer “&lt;em&gt;Diğer projeler bunu nasıl yapıyor?&lt;/em&gt;” diye merak ediyorsanız, &lt;a href="https://github.com/matiassingers/awesome-readme" rel="noopener noreferrer"&gt;&lt;strong&gt;Awesome README&lt;/strong&gt;&lt;/a&gt; tam da bu ihtiyaca yönelik. NASA’nın OGMA projesi gibi birçok farklı projeden örnek &lt;strong&gt;README&lt;/strong&gt; dosyalarını inceleyerek ilham alabilirsiniz.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GitHub Repository’lerinizde Sadelik ve Düzen Nasıl Sağlanır?
&lt;/h3&gt;

&lt;p&gt;GitHub projelerinizin hem estetik hem de işlevsel açıdan daha düzenli görünmesi, diğer kullanıcıların projeyi anlamasını ve kullanmasını kolaylaştırır. Aşağıda bu süreci adım adım açıklıyorum.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Repository Detaylarını Düzenleyin
&lt;/h3&gt;

&lt;p&gt;Görsel 1-2'de olduğu gibi, repository bilgilerinizi düzenlemek için üst kısımdaki &lt;strong&gt;“Settings”&lt;/strong&gt; sekmesine giderek detayları doldurabilirsiniz.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eylemler:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Description (Açıklama):&lt;/strong&gt; Kısa bir cümle ile projenizin amacını yazın. (Örn: “Hava Durumu Uygulaması”)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website:&lt;/strong&gt; Eğer projenize ait bir demo veya dökümantasyon linki varsa buraya ekleyin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Topics:&lt;/strong&gt; Projenizin kategorilerini (örn: vue3, gpt-4) ekleyerek arama sonuçlarında daha görünür hale getirin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Neden Önemli?&lt;/strong&gt;Bu bilgiler, proje sayfasını ziyaret eden kullanıcıların proje hakkında hızlıca bilgi edinmesini sağlar. Ayrıca doğru doldurulmuş bir açıklama, arama motorlarında projenizin daha kolay bulunmasına katkı sunar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbay7pl4l9vnl72bmnakm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbay7pl4l9vnl72bmnakm.png" alt="Görsel 1" width="637" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmnw5vj6lmvd408zy5en5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmnw5vj6lmvd408zy5en5.png" alt="Görsel 2" width="639" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Gereksiz Alanları Kapatın
&lt;/h3&gt;

&lt;p&gt;Eğer projenizde bir &lt;strong&gt;Release&lt;/strong&gt;, &lt;strong&gt;Package&lt;/strong&gt; ya da &lt;strong&gt;Deployment&lt;/strong&gt; kullanımı yoksa, bunları devre dışı bırakabilirsiniz (&lt;em&gt;Görsel 1–2&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eylemler:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Edit repository details” menüsünden ilgili kutucukları işaretleyerek ya da kaldırarak gereksiz özellikleri kapatın.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Neden Önemli?&lt;/strong&gt;Boş veya kullanılmayan alanlar, repository’nin gereksiz kalabalık görünmesine neden olabilir. Sadece aktif olarak kullanılan özellikleri açık bırakmak, projenize sadelik ve profesyonellik katar.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Özelleştirme için Wiki, Issues ve Projects Ayarları
&lt;/h3&gt;

&lt;p&gt;Görsel 3 ve Görsel 4'da gösterildiği gibi, &lt;strong&gt;Wiki&lt;/strong&gt;, &lt;strong&gt;Issues&lt;/strong&gt; ve &lt;strong&gt;Projects&lt;/strong&gt; özelliklerini projenizin ihtiyaçlarına göre açıp kapatabilirsiniz.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eylemler:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wiki:&lt;/strong&gt; Eğer proje için dökümantasyon yazmak istiyorsanız açık bırakın. Sadece proje ekibinin düzenlemesine izin vermek için &lt;strong&gt;“Restrict editing to collaborators only”&lt;/strong&gt; seçeneğini işaretleyin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issues:&lt;/strong&gt; Eğer projeye katkı sağlanmasını istiyorsanız bu alanı açık bırakın. Ayrıca, düzenli takip için bir &lt;strong&gt;Issue Template&lt;/strong&gt; ekleyebilirsiniz.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Projects:&lt;/strong&gt; Projeye özel görevlerinizi ve takvimlerinizi burada yönetmek istiyorsanız açık bırakabilirsiniz.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Neden Önemli?&lt;/strong&gt;Bu alanların ihtiyaçlara göre yönetilmesi, repository’nin daha düzenli ve hedef odaklı olmasını sağlar. Kullanılmayan özellikler, gereksiz karmaşaya neden olur.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8up96d7hhrwbukpehqqx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8up96d7hhrwbukpehqqx.png" alt="Görsel-3" width="800" height="47"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkqxsqt284gbm0ey51am.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkqxsqt284gbm0ey51am.png" alt="Görsel-4" width="800" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Doldurulması Gereken Alanları Atlamayın
&lt;/h3&gt;

&lt;p&gt;Repository’nizin &lt;strong&gt;About&lt;/strong&gt; bölümündeki boşluklar veya eksik bilgiler (örneğin &lt;em&gt;Description&lt;/em&gt;, &lt;em&gt;Topics&lt;/em&gt;) repository’nin eksik ve ilgisiz görünmesine yol açabilir.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eylemler:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tüm gerekli alanları doldurun.&lt;/li&gt;
&lt;li&gt;Projenizle uyumlu bir açıklama ve etiketler kullanarak profesyonel bir görünüm elde edin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Neden Önemli?&lt;/strong&gt;Eksik bilgiler, kullanıcıların proje hakkında bilgi edinmesini zorlaştırır ve repository’nin amatör görünmesine neden olabilir.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. Dil Kullanımı ve Görsellik&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Repository’nizde kullanılan programlama dillerini temsil eden &lt;strong&gt;Languages&lt;/strong&gt; kısmı, projeyi inceleyen kişilere kod yapınız hakkında bilgi verir. Ayrıca &lt;strong&gt;README&lt;/strong&gt;’nizi etkili görsellerle destekleyerek projenizi daha çekici hale getirin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eylemler:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;README&lt;/strong&gt; dosyasına proje yapısını ve kullanımını anlatan ekran görüntüleri ekleyin.&lt;/li&gt;
&lt;li&gt;Kod snippet’leriyle örnek kullanım talimatlarını gösterin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Neden Önemli?&lt;/strong&gt;Hem yazılı hem görsel açıklamalar, kullanıcıların projeyi daha hızlı anlamasına yardımcı olur ve katkıda bulunmalarını teşvik eder.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Sonuç: Daha Özgün ve Sade Bir Repository
&lt;/h3&gt;

&lt;p&gt;Bu adımları uygulayarak, &lt;strong&gt;GitHub&lt;/strong&gt; repository’nizi gereksiz detaylardan arındırabilir, daha profesyonel ve kullanıcı dostu bir görünüm kazandırabilirsiniz. Düzenli ve güncel bir proje sayfası, projenizin genel görünümünü ve kalitesini hızlıca değerlendirmek isteyen kullanıcılar için büyük önem taşır. Sadelik ve işlevsellik, hem kullanıcıların ilgisini çeker hem de katkı sağlamak isteyenler için motive edici bir etki yaratır.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unutmayın, iyi tasarlanmış bir repository, projenizi anlatmanın ve topluluğun ilgisini çekmenin en etkili yoludur! — ChatGPT&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bu yazıda, GitHub/GitLab profillerinin ve README dosyalarının önemine odaklanarak, bunları nasıl daha iyi hale getirebileceğinizle ilgili önemli noktaları ve araçları paylaştım.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sorularınız veya önerileriniz varsa, &lt;a href="https://www.linkedin.com/in/eralpozcan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; hesabımdan bana ulaşabilirsiniz. Diğer hesaplarıma ise &lt;a href="https://bento.me/eralpozcan" rel="noopener noreferrer"&gt;Bento.me/eralpozcan&lt;/a&gt; veya &lt;a href="https://eralpozcan.dev/" rel="noopener noreferrer"&gt;eralpozcan.dev&lt;/a&gt; üzerinden erişebilirsiniz.&lt;/strong&gt; 🤖&lt;/p&gt;

&lt;p&gt;Beni &lt;a href="https://github.com/eralpozcan" rel="noopener noreferrer"&gt;Githubdan&lt;/a&gt; takip etmeyi ve yorumlara Github adreslerinizi bırakmayı unutmayın 🎁&lt;/p&gt;

&lt;p&gt;Bir sonraki yazıda görüşmek üzere! 📩&lt;/p&gt;

</description>
      <category>github</category>
      <category>tutorial</category>
      <category>career</category>
    </item>
    <item>
      <title>How to Use Object Recognition with TensorFlow.js and Vue 3?</title>
      <dc:creator>Eralp</dc:creator>
      <pubDate>Fri, 02 Feb 2024 00:43:41 +0000</pubDate>
      <link>https://dev.to/eralpozcan/how-to-use-object-recognition-with-tensorflowjs-and-vue-3-3glb</link>
      <guid>https://dev.to/eralpozcan/how-to-use-object-recognition-with-tensorflowjs-and-vue-3-3glb</guid>
      <description>&lt;p&gt;In recent years, artificial intelligence and its products have become increasingly active and are starting to take their place in our lives, with their numbers steadily rising. We all have the question in mind of how we can use this in our daily lives. In this article, we will create a simple application together using &lt;strong&gt;TensorFlow.js&lt;/strong&gt;, where we will use &lt;strong&gt;ImageNet&lt;/strong&gt; classes and the &lt;strong&gt;MobileNet-v2&lt;/strong&gt; model to recognize and add an object/item to the cart. This way, we will implement a scenario similar to the basic working principle of &lt;a href="https://www.amazon.com/b?ie=UTF8&amp;amp;node=16008589011" rel="noopener noreferrer"&gt;Amazon Go&lt;/a&gt;. Let's get started 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is TensorFlow? What is TensorFlow.js?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bhp0dzv74xeqem0ugg0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bhp0dzv74xeqem0ugg0.png" alt="TensorFlow.js" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TensorFlow&lt;/strong&gt; is an open-source machine learning and deep learning library developed by Google. Widely supported by a large community, &lt;strong&gt;TensorFlow&lt;/strong&gt; is a powerful tool used for artificial intelligence applications and large-scale data processing projects. It is extensively used in both research and industrial projects, featuring a flexible and modular structure with the capability to run on different devices such as computers, mobile devices, and IoT devices. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TensorFlow.js&lt;/strong&gt; is the JavaScript version of &lt;strong&gt;TensorFlow&lt;/strong&gt;, enabling the training and execution of machine learning models in the browser. This makes it a suitable tool for &lt;em&gt;web applications and browser-based&lt;/em&gt; artificial intelligence projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installations
&lt;/h3&gt;

&lt;p&gt;Firstly, let's create our Vue 3 project. You can use either Vue CLI or Vite for this. I will prefer Vite for the installation here, but you can choose Vue CLI for a simplified setup with other tools.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm create vite@latest tf-js-with-vue &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--template&lt;/span&gt; vue
&lt;span class="c"&gt;# yarn&lt;/span&gt;
yarn create vite my-vue-app &lt;span class="nt"&gt;--template&lt;/span&gt; vue
&lt;span class="c"&gt;# If you choice Vue CLI Commands&lt;/span&gt;
npm create vue@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;📌 Optional Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to use a UI or CSS library, I recommend installing it at this stage. In this example project, I used &lt;em&gt;TailwindCSS&lt;/em&gt; and &lt;em&gt;DaisyUI&lt;/em&gt;. If you want to follow the same structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/guides/vite#vue" rel="noopener noreferrer"&gt;TailwindCSS with Vite-Vue&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://daisyui.com/docs/install/" rel="noopener noreferrer"&gt;DaisyUI Install&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After completing the installations, go to the project directory and run &lt;strong&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;npm run dev&lt;/code&gt;&lt;/strong&gt; to run our empty project. If you don't encounter any issues or errors, you can proceed to add &lt;strong&gt;TensorFlow.js&lt;/strong&gt; to your project by visiting &lt;a href="https://www.tensorflow.org/js/tutorials/setup" rel="noopener noreferrer"&gt;TensorFlow.js Installation&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @tensorflow/tfjs
&lt;span class="c"&gt;# yarn&lt;/span&gt;
yarn add @tensorflow/tfjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📌 &lt;strong&gt;How to Use TensorFlow.js?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExNTU3MnRoNmY5eWo0cmkzOHp1ajd1ZTM1djZ6MWlyM3BkaGs4MHdlaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/MZQkUm97KTI1gI8sUj/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExNTU3MnRoNmY5eWo0cmkzOHp1ajd1ZTM1djZ6MWlyM3BkaGs4MHdlaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/MZQkUm97KTI1gI8sUj/giphy.gif" width="440" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To use &lt;strong&gt;TensorFlow.js&lt;/strong&gt;, create a file named &lt;strong&gt;&lt;code&gt;tensorflowImageClassifier.js&lt;/code&gt;&lt;/strong&gt; under a utils folder. Inside this file, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;tf&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@tensorflow/tfjs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;labels&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;labelsArray&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we imported &lt;strong&gt;TensorFlow.js&lt;/strong&gt; with the alias "&lt;em&gt;tf&lt;/em&gt;". We then defined the variables &lt;em&gt;model&lt;/em&gt;, &lt;em&gt;labels&lt;/em&gt;, and &lt;em&gt;labelsArray&lt;/em&gt;, which will contain the organized labels.&lt;/p&gt;

&lt;h3&gt;
  
  
  📌 &lt;strong&gt;Loading the Model and Labels&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After these definitions, create a function named &lt;strong&gt;&lt;code&gt;loadModel&lt;/code&gt;&lt;/strong&gt;. In this function, we will load our model and labels into the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadModel&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loadGraphModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://www.kaggle.com/models/google/mobilenet-v2/frameworks/TfJs/variations/035-128-classification/versions/3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fromTFHub&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nx"&gt;labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://storage.googleapis.com/download.tensorflow.org/data/ImageNetLabels.txt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
  &lt;span class="nx"&gt;labelsArray&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Firstly, we load our model using &lt;strong&gt;&lt;code&gt;tf.loadGraphModel&lt;/code&gt;&lt;/strong&gt; from &lt;a href="https://www.kaggle.com/models/google/mobilenet-v2/frameworks/TfJs/variations/035-128-classification/versions/3" rel="noopener noreferrer"&gt;Kaggle-MobileNet-v2 by Google&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;At this stage, we fetch the labels of the ImageNet data and convert it into a text format.&lt;/li&gt;
&lt;li&gt;Finally, we transform this text data into an array and assign it to the variable &lt;strong&gt;&lt;code&gt;labelsArray&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Function Explanations:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tf.loadGraphModel&lt;/code&gt;&lt;/strong&gt;: TensorFlow.js model loading function. It loads the model from the specified URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;fetch&lt;/code&gt;&lt;/strong&gt;: Fetches data from the specified URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;labels.split('\n')&lt;/code&gt;&lt;/strong&gt;: Splits the labels by new lines and converts them into an array.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;map(label =&amp;gt; label.trim())&lt;/code&gt;&lt;/strong&gt;: Removes leading and trailing spaces for each label in the array.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;filter(label =&amp;gt; label !== '')&lt;/code&gt;&lt;/strong&gt;: Filters out empty labels.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📌 &lt;strong&gt;Image Classification Function&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now, let's create the following function to classify an image using the loaded model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;classifyImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// 1. Convert Input Image to Tensor and Preprocess&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;imgTensor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromPixels&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// Convert the image to a Tensor&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resizeNearestNeighbor&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;// Resize the image to 128x128 dimensions&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFloat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="c1"&gt;// Convert Tensor values to floating-point numbers&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;div&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;scalar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;// Normalization: Scale pixel values from [0, 255] to [0, 1]&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;expandDims&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;// Expand the Tensor dimension&lt;/span&gt;

  &lt;span class="c1"&gt;// 2. Classify the Image with the Model&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;predictions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;imgTensor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Classify the image using the model&lt;/span&gt;

  &lt;span class="c1"&gt;// 3. Determine and Sort the Top Probability Classes&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;topPredictions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;predictions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dataSync&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;// Convert from Tensor to JavaScript array&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;probability&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;probability&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;labelsArray&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]}))&lt;/span&gt;  &lt;span class="c1"&gt;// Match probability and label for each class&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;probability&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;probability&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// Sort by probability&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Select the top three classes with the highest probabilities&lt;/span&gt;

  &lt;span class="c1"&gt;// 4. Return the Results&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;topPredictions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// Return an array containing the top probable classes&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function takes an image, converts it to the &lt;strong&gt;TensorFlow.js&lt;/strong&gt; tensor format, and applies necessary preprocessing steps. Then, it classifies the image using the model and returns an array containing the top three classes with the highest probabilities.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tf.browser.fromPixels(image)&lt;/code&gt;&lt;/strong&gt;: Converts the input image to the &lt;strong&gt;TensorFlow.js&lt;/strong&gt; tensor format.&lt;/li&gt;
&lt;li&gt;Applies some preprocessing on the tensor. Resizes the image to 128x128 dimensions, normalizes pixel values, and expands the tensor dimension.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;model.predict(imgTensor)&lt;/code&gt;&lt;/strong&gt;: Uses the TensorFlow.js model to classify the preprocessed image and obtains a tensor containing probabilistic results.&lt;/li&gt;
&lt;li&gt;Converts the obtained results to a JavaScript array, matches the probability and label for each class, sorts by probability, and selects the top three classes with the highest probabilities.&lt;/li&gt;
&lt;li&gt;Finally, the function returns an array containing the labels and probabilities of the top three classes. This array represents the classification results.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  📌 &lt;strong&gt;Creating Mockup Data&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Since we have a shopping cart scenario in the project, we need to retrieve the classified items from the database. However, to keep dependencies minimal, we will read our mockup data from a JSON file and return the necessary information.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, create a folder named &lt;strong&gt;&lt;code&gt;services&lt;/code&gt;&lt;/strong&gt; under the &lt;strong&gt;&lt;code&gt;src&lt;/code&gt;&lt;/strong&gt; directory.&lt;/li&gt;
&lt;li&gt;Then, create a file named &lt;strong&gt;&lt;code&gt;data.json&lt;/code&gt;&lt;/strong&gt; inside the &lt;strong&gt;&lt;code&gt;services&lt;/code&gt;&lt;/strong&gt; folder and open it. I added four pieces of data as an example based on ImageNet labels, but you can increase this as needed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1a23bc45-678d-90ef-ghij-klmnopqrstuv&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;background&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;10.99&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2b34cd56-789e-01fg-hijk-lmnopqrstuvi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tench&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;15.99&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3c45de67-890f-12gh-ijkl-mnopqrstuvij&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;French loaf &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;8.99&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3c45de67-890f-12gh-ijkl-mn423rstuvij&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bread&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;12.99&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After completing this stage, we will create a simple code structure to read our data and return product information based on the result of the classification.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a file named &lt;strong&gt;&lt;code&gt;productService.js&lt;/code&gt;&lt;/strong&gt;. Import the mockup data into this file using &lt;strong&gt;&lt;code&gt;import mockupData from './data.json'&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Since we will perform a simple search on our data, create a function named &lt;strong&gt;&lt;code&gt;searchByName&lt;/code&gt;&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;mockupData&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./data.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;searchByName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lowerCaseQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;mockupData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lowerCaseQuery&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;searchByName&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📌 &lt;strong&gt;Vue.js Image Recognition with TensorFlow&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the previous stages of the tutorial, we prepared &lt;strong&gt;TensorFlow.js&lt;/strong&gt; and the necessary requirements. Now, let's move on to the easier part, the Front End. We will create three main components. You can also create them as a single component if you prefer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Components&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ImageUpload.vue&lt;/li&gt;
&lt;li&gt;ResultDisplay.vue&lt;/li&gt;
&lt;li&gt;SimpleBasket.vue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HomeView.vue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Firstly, we create a component named &lt;strong&gt;&lt;code&gt;ImageUpload.vue&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We design it with the essential functionalities. Feel free to add extra details or functions. You can also break it down into sub-components for more efficient code 😛&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXEyZzVpcm9icDh4dXRhZmg2cGhvc2JzejdpZm90eXQwOHgwZjdqaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/zqy40c38GcW2LLmAf8/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXEyZzVpcm9icDh4dXRhZmg2cGhvc2JzejdpZm90eXQwOHgwZjdqaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/zqy40c38GcW2LLmAf8/giphy.gif" width="480" height="360"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"indicator"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;v-if&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"loadingImage"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"indicator-item indicator-center indicator-middle badge badge-primary"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Uploading Image...&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"previewImage"&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Input Image"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"w-96 h-96 my-2 rounded"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"file"&lt;/span&gt; &lt;span class="na"&gt;accept&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"image/*"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"file-input w-full max-w-xs mb-2"&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Image Input"&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;change&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"handleImageUpload"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"btn btn-primary w-32"&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"processImage"&lt;/span&gt; &lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="na"&gt;disabled&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"!isImageSelected"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Classify or Recognize&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we will take an image from the user and trigger its classification/recognition through a button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExb29mbnh3eDY0eWd1Mm5kb3Q2cXdrNWN5ejBkdTNwcDNiOTQxNm55bCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/26tn33aiTi1jkl6H6/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExb29mbnh3eDY0eWd1Mm5kb3Q2cXdrNWN5ejBkdTNwcDNiOTQxNm55bCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/26tn33aiTi1jkl6H6/giphy.gif" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this stage, instead of explaining the code step by step, I'll share the entire code with you and explain its functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;computed&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Import the classifyImage and loadModel functions from the tensorflowImageClassifier module&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;classifyImage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;loadModel&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/utils/tensorflowImageClassifier&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Create a reactive array to hold image classification results&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;classificationResults&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;
&lt;span class="c1"&gt;// Create a reactive variable to hold the preview image URL, initially set with a placeholder URL&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;previewImage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://placehold.co/600x600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Create a reactive boolean variable to track the loading status of the image&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;loadingImage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Define custom events to be used within the component using the defineEmits function of Vue.js&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;emit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defineEmits&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getResult&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getProducts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="c1"&gt;// Create a computed property to check whether the user has selected an image&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isImageSelected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;previewImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://placehold.co/600x600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Event handler function triggered when the user selects a file&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleImageUpload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// Get the selected file&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Create a new HTML image element&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FileReader&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Create a FileReader for file reading operations&lt;/span&gt;

  &lt;span class="c1"&gt;// When the file reading process starts&lt;/span&gt;
  &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onloadstart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;previewImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;previewImage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Set the preview image (this line seems to have no correct function)&lt;/span&gt;
    &lt;span class="nx"&gt;loadingImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Set the image loading status to true&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="c1"&gt;// When the file reading process is completed&lt;/span&gt;
  &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onloadend&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;loadingImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Set the image loading status to false&lt;/span&gt;
    &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Set the source of the image element with the read data&lt;/span&gt;
    &lt;span class="nx"&gt;previewImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Set the preview image with the read data&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="c1"&gt;// Start the reading process by converting the file to base64 format&lt;/span&gt;
  &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readAsDataURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Event handler function that initiates image classification&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;processImage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;previewImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// If a preview image is available&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Create a new HTML image element&lt;/span&gt;
    &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;previewImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Set the source of the image element with the preview image URL&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;loadModel&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Load the TensorFlow model&lt;/span&gt;
    &lt;span class="nx"&gt;classificationResults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;classifyImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Classify the image and assign the results to classificationResults&lt;/span&gt;
    &lt;span class="nf"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getResult&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;classificationResults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Trigger the 'getResult' event and pass the results to upper-level components&lt;/span&gt;
    &lt;span class="nf"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getProducts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;classificationResults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Trigger the 'getProducts' event and pass the results to upper-level components&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;classificationResults&lt;/code&gt;&lt;/strong&gt;: An array holding the results of image classification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;previewImage&lt;/code&gt;&lt;/strong&gt;: A string holding the URL of the user-uploaded or selected image for preview. Initially starts with a placeholder URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;loadingImage&lt;/code&gt;&lt;/strong&gt;: A boolean variable indicating the loading status of the image. Initially set to &lt;strong&gt;&lt;code&gt;false&lt;/code&gt;&lt;/strong&gt; and updated within the function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;isImageSelected&lt;/code&gt;&lt;/strong&gt;: A computed property checking whether the user has selected an image, determining the enable/disable status of the "&lt;em&gt;Classify&lt;/em&gt;" button. It checks if the preview URL is different from the placeholder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;handleImageUpload&lt;/code&gt;&lt;/strong&gt;: This function is triggered when the user selects a file. It reads the content of the selected file and converts it into an image for preview. It also shows a loading element while the image is being loaded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;processImage&lt;/code&gt;&lt;/strong&gt;: This function initiates the image classification process. If a preview image is available, it loads a pre-trained model and classifies the image. The results are stored in &lt;strong&gt;&lt;code&gt;classificationResults&lt;/code&gt;&lt;/strong&gt;, and events (&lt;em&gt;getResult&lt;/em&gt; and &lt;em&gt;getProducts&lt;/em&gt;) are emitted to pass the results to upper-level components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;ResultDisplay.vue&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
defineProps(&lt;span class="si"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;
&lt;span class="si"&gt;}&lt;/span&gt;);
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"bg-white-800 dark:bg-gray-800 p-4 my-2 rounded shadow-md"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-2xl text-slate-600 dark:text-slate-400 font-bold mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Classification Result&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="na"&gt;v-for&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"(result, index) in labels"&lt;/span&gt; &lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"index"&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mb-2 p-2 border rounded"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold text-slate-600 dark:text-slate-400"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; - &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;probability&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this component, we will display the top 3 probabilities on the screen. The reason for having 3 probabilities is that in our &lt;strong&gt;&lt;code&gt;classifyImage&lt;/code&gt;&lt;/strong&gt; function, we use &lt;strong&gt;&lt;code&gt;slice(0,3)&lt;/code&gt;&lt;/strong&gt; to take the top 3 probabilities. For example, if it were &lt;strong&gt;&lt;code&gt;slice(0,5)&lt;/code&gt;&lt;/strong&gt;, we would see the top 5 probabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SimpleBasket.vue&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
defineProps(&lt;span class="si"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;products&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;
&lt;span class="si"&gt;}&lt;/span&gt;);
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mx-auto bg-white-800 dark:bg-gray-800 rounded p-4 mt-2 shadow-md"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-xl font-semibold mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Product Basket&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex justify-between items-center border-b pb-4 mb-4"&lt;/span&gt; &lt;span class="na"&gt;v-for&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"product in products"&lt;/span&gt; &lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"product.id"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-lg text-balance font-medium"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;1x &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-slate-600 dark:text-slate-400 font-semibold"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Price: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this component, we handle the scenario of finding the product and adding it to the basket after our basic scenario. Here, in our upper layer, which is the &lt;strong&gt;&lt;code&gt;HomeView.vue&lt;/code&gt;&lt;/strong&gt; layer, we find the product, send its information to this component, and display it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HomeView.vue&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
import &lt;span class="si"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="si"&gt;}&lt;/span&gt; from 'vue'
import ImageUpload from '@/components/ImageUpload.vue'
import ResultDisplay from '@/components/ResultDisplay.vue'
import SimpleBasket from '@/components/SimpleBasket.vue'

const classificationResults = ref([])
const products = ref([])

const getResult = (result) =&amp;gt; &lt;span class="si"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;classificationResults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="si"&gt;}&lt;/span&gt;
const getProducts = (result) =&amp;gt; &lt;span class="si"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;products&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;
&lt;span class="si"&gt;}&lt;/span&gt;;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ImageUpload&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;getResult&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"getResult"&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;getProducts&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"getProducts"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ResultDisplay&lt;/span&gt; &lt;span class="na"&gt;v-if&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"classificationResults.length &amp;gt; 0"&lt;/span&gt; &lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"classificationResults"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SimpleBasket&lt;/span&gt; &lt;span class="na"&gt;v-if&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"classificationResults.length &amp;gt; 0"&lt;/span&gt; &lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="na"&gt;products&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"products"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;template&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After calling our components in &lt;strong&gt;&lt;code&gt;HomeView.vue&lt;/code&gt;&lt;/strong&gt;, we obtain the appearance in our visualization. If there are any differences or missing parts in your view, you can check &lt;a href="https://github.com/Eralpozcan/TF.js-with-Vue3" rel="noopener noreferrer"&gt;TF.js-with-Vue3&lt;/a&gt; for the repository. Alternatively, you can download it directly to your computer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuadg8q8m4qv67mggdi8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuadg8q8m4qv67mggdi8.png" alt="TensorFlowjs-Preview" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have completed all these stages, let's move on to testing our project. As an example, I chose one of the images that appear when searching for "&lt;em&gt;French Loaf&lt;/em&gt;" on Google because it is available within the &lt;strong&gt;ImageNet&lt;/strong&gt; labels. We have also defined its classification in our Mockup Data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fps83g5s2gmw14k5tado1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fps83g5s2gmw14k5tado1.png" alt="TensorFlow-Classify" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After selecting and uploading our image, we press the "Classify-Recognize" button. We then display the top 3 predictions with high probabilities and automatically add the item to our basket.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jznwfrml88bx9v15z1z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jznwfrml88bx9v15z1z.png" alt="TensorFlowjs-Results" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see, we implemented a simple &lt;strong&gt;Object Recognition&lt;/strong&gt; and Add to Cart scenario using &lt;strong&gt;TensorFlow.js&lt;/strong&gt; in the project. Through this, we explored how we can easily integrate artificial intelligence and tools into our projects or daily scenarios.&lt;/p&gt;

&lt;p&gt;In this article, I tried to explain the usage and installation of &lt;strong&gt;TensorFlow.js&lt;/strong&gt; with examples of how it can be beneficial in a simple scenario.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;After reading my post, feel free to reach out to me on &lt;a href="https://www.linkedin.com/in/eralpozcan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; if you have any questions or suggestions.For my other accounts, you can visit &lt;a href="//Bento.me/eralpozcan%20%F0%9F%A4%96"&gt;Bento.me/eralpozcan 🤖&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;See you in the next article! 📩&lt;/p&gt;

</description>
      <category>tensorflow</category>
      <category>vue</category>
      <category>objectrecognition</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Use Sentry with Vue 3?</title>
      <dc:creator>Eralp</dc:creator>
      <pubDate>Mon, 17 Jul 2023 17:54:02 +0000</pubDate>
      <link>https://dev.to/eralpozcan/how-to-use-sentry-with-vue-3-2bi2</link>
      <guid>https://dev.to/eralpozcan/how-to-use-sentry-with-vue-3-2bi2</guid>
      <description>&lt;p&gt;Don’t we often encounter errors and find it difficult to identify them? One of the error and performance monitoring tools is Sentry. In this article, I will explain how to set up Sentry and make improvements with performance monitoring. Are you ready? Let’s get started! 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Sentry?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Sentry&lt;/strong&gt; can be described as an error monitoring and reporting platform for many of our applications if we need to provide a general definition. We can even add that it is a performance reporting platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sentry&lt;/strong&gt; enables developers to monitor application errors in real time, receive and analyze error reports, and quickly diagnose issues.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;key features&lt;/em&gt; of Sentry include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Error Tracking&lt;/strong&gt;: Sentry tracks and captures errors in applications. It can detect various types of errors such as exceptions, error messages, errors in the user interface, and more.&lt;br&gt;
&lt;strong&gt;Real-time Monitoring&lt;/strong&gt;: Sentry monitors application errors in real-time and sends notifications promptly. This allows developers to quickly notice mistakes and take action.&lt;br&gt;
&lt;strong&gt;Error Reporting&lt;/strong&gt;: Sentry reports errors in detail. Error reports provide crucial information about when, where, and under what conditions the error occurred. This helps developers diagnose and fix errors.&lt;br&gt;
&lt;strong&gt;Integrations&lt;/strong&gt;: Sentry supports many popular programming languages and various platforms. This allows it to integrate with different types of applications and systems.&lt;br&gt;
&lt;strong&gt;Performance Monitoring&lt;/strong&gt;: Sentry can monitor the performance of applications and detect performance issues. With performance monitoring features, developers can optimize the performance of their applications and enhance the user experience. We’ll even provide an example in this regard 😉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additionally&lt;/strong&gt;, in addition to the basic explanation provided here, I recommend &lt;em&gt;reading Onur Dayıbaş’s&lt;/em&gt; Medium article titled “&lt;a href="https://medium.com/frontend-development-with-js/sentrydeki-baz%C4%B1-kavramlar-project-env-release-ve-sourcemap-2a041395c43b" rel="noopener noreferrer"&gt;Some Concepts in Sentry&lt;/a&gt;”&lt;/p&gt;


&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Firstly, I will support the steps we will take here with visuals. Sentry itself will also provide us with sufficient assistance in this regard.&lt;/p&gt;

&lt;p&gt;📌 Go to &lt;a href="https://sentry.io/" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt;’s website and create an account if you don’t have one, or log in if you already have an account.&lt;/p&gt;

&lt;p&gt;📌 If you’re logging in for the first time, you’ll be prompted to create an organization. One of the main reasons for this is to enable collaboration with your team members. In this example, I’ll skip this step by creating an organization named “&lt;em&gt;Example&lt;/em&gt;”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmm99xticd85azu6vps7f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmm99xticd85azu6vps7f.jpg" alt="Create a New Organization in Sentry" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📌 We are presented with a screen where we can choose the platform we want to set up. Here, we select &lt;strong&gt;Vue&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nw6o952qn5eebigda65.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nw6o952qn5eebigda65.jpg" alt="Choose Platform with Vue" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📌 Here, we select the alert frequency. We can adjust this setting later, but for now, we select the option “&lt;em&gt;Alert me on every new issue.&lt;/em&gt;” Then, we proceed to the next step, where we create our project and choose our team. If you don’t have a team, by default, it will use the name of your organization as the team. If you want to create a different team, you can click on the “+” sign to create one. Finally, we click on “&lt;em&gt;Create Project.&lt;/em&gt;”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3b2x1fageca97uhtnex2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3b2x1fageca97uhtnex2.jpg" alt="Create a Project with alert frequency" width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📌 Here, Sentry provides us with instructions. It automatically adjusts settings based on three main scenarios. Some important points to understand are as follows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Error Monitoring&lt;/strong&gt;: This is our error monitoring setting. It is selected by default, and we cannot disable it because that’s our primary goal 😉&lt;br&gt;
&lt;strong&gt;Performance Monitoring&lt;/strong&gt;: Here, we measure the performance of our page load. If we don’t want this option, we can remove it.&lt;br&gt;
&lt;strong&gt;Session Replay&lt;/strong&gt;: This is actually one of the features we love. It provides a small video snippet showing how errors occurred. However, it is not recommended to collect these data at high rates. It’s sufficient to enable it only for errors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0r2z9mcvc4pqv81tf5ed.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0r2z9mcvc4pqv81tf5ed.jpg" alt="Install Configure" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s move on to the installation process. As shown in the screenshot above, we install the Sentry package in our project using either “&lt;em&gt;npm&lt;/em&gt;” or “&lt;em&gt;yarn&lt;/em&gt;” depending on our preference. Then, we directly copy the Vue3 sample code and paste it into our “&lt;em&gt;main.js&lt;/em&gt;” file. Of course, you may have a different “&lt;em&gt;main.js&lt;/em&gt;” file in your project. The important point here is to include the portion starting with &lt;code&gt;Sentry.init({])&lt;/code&gt; (&lt;em&gt;Don’t forget to import it&lt;/em&gt;). The key settings and their meanings in this configuration are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;App&lt;/code&gt;&lt;/strong&gt;: It is used to specify the application object, which is the application we created with createApp or the application we want to monitor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/strong&gt;: The address of the Sentry server where error reports will be sent. I recommend keeping this address in a secure manner, such as using a .env file. Exposing this address can lead to potential security issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;integrations&lt;/code&gt;&lt;/strong&gt;: It is used to configure Sentry integrations. In this example, &lt;strong&gt;&lt;code&gt;Sentry.BrowserTracing&lt;/code&gt;&lt;/strong&gt; and **&lt;code&gt;Sentry.Replay&lt;/code&gt; **integrations are used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tracesSampleRate&lt;/code&gt;&lt;/strong&gt;: Performance monitoring sample rate. It is expressed as a percentage, and in this example, it is set to &lt;strong&gt;&lt;code&gt;100%&lt;/code&gt;&lt;/strong&gt;. It is recommended to lower this rate in real production environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;replaysSessionSampleRate&lt;/code&gt;&lt;/strong&gt;: Session replay sample rate. It is expressed as a percentage, and in this example, it is set to &lt;strong&gt;&lt;code&gt;10%&lt;/code&gt;&lt;/strong&gt;. During development, it can be set &lt;strong&gt;&lt;code&gt;100%&lt;/code&gt;&lt;/strong&gt; for better analysis, while in production, a lower sampling rate can be used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;replaysOnErrorSampleRate&lt;/code&gt;&lt;/strong&gt;: Sample rate for sessions with errors. If you are not already sampling sessions, you can set the sampling rate for sessions with errors to &lt;strong&gt;&lt;code&gt;100%&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more advanced configuration options that are not shown in the screenshot, you can refer to the &lt;a href="https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/" rel="noopener noreferrer"&gt;Sentry Basic Options&lt;/a&gt; in the documentation to make detailed adjustments. Essentially, we have completed the basic installation process here. Now, let’s see how we can capture our &lt;strong&gt;first error&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  Issues
&lt;/h2&gt;

&lt;p&gt;After completing the installations,** Sentry** automatically redirects us to a page like the one below and expects us to send our errors. In fact, we will see or track all the errors here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9dc5p5uqderas2iige5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9dc5p5uqderas2iige5.jpg" alt="Sentry Issues Page" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How can we send this error or different data to Sentry? 🤔&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;👩‍💻We are creating a simple button and function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button @click="sendSentryData"&amp;gt;Click me&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function sendSentryData() {
   Sentry.captureMessage('Button clicked');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you haven’t imported and initialized &lt;strong&gt;Sentry&lt;/strong&gt; when creating this function, you will receive the error shown in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvm0n6m3wme1mduegsp70.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvm0n6m3wme1mduegsp70.jpg" alt="Sentry ReferenceError" width="800" height="43"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExMGJ2NXJuNmllNDlicG9obGV4dmNybDFvaXNyendxMXdmenlmbDZzdyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/JqDeI2yjpSRgdh35oe/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExMGJ2NXJuNmllNDlicG9obGV4dmNybDFvaXNyendxMXdmenlmbDZzdyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/JqDeI2yjpSRgdh35oe/giphy.gif" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsz0hl76tux3uthv0gpsl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsz0hl76tux3uthv0gpsl.jpg" alt="Show Reference Error in Issues" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;We encountered our first error! So how did this happen?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Because we encountered a reference error at its core, and since our &lt;strong&gt;&lt;code&gt;replaysOnErrorSampleRate&lt;/code&gt;&lt;/strong&gt; value is set to &lt;strong&gt;&lt;code&gt;100%&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;Sentry&lt;/strong&gt; detected it and sent it to us directly. By clicking on its content, we can learn more about the occurrence of the error or get detailed information. However, to keep it brief, I won’t go into that here. We received the error because we hadn’t defined Sentry. To resolve this, we add the code &lt;strong&gt;&lt;code&gt;import * as Sentry from '@sentry/vue'&lt;/code&gt;&lt;/strong&gt; to our script and click the button again. 🖱️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pgr9vglodd3lismuol8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pgr9vglodd3lismuol8.jpg" alt="Issues" width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, we can also view the message we sent. One important aspect here is that we can see how many times this error occurred and how many users experienced it. The “&lt;em&gt;Events&lt;/em&gt;” count shows how many times the error occurred, while the “&lt;em&gt;Users&lt;/em&gt;” count indicates how many different users encountered this issue. By clicking into the error, we can access more detailed information. Essentially, we have successfully performed a basic error and data reporting process. Now, let’s move on to performance analysis.&lt;/p&gt;




&lt;h2&gt;
  
  
  Performance Monitoring
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaW5iMGx1dXQ5ZXByN2p3dXdxcmkyODZ0MXlzNGh0aTB1YjRuYzEwZSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/rM0wxzvwsv5g4/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaW5iMGx1dXQ5ZXByN2p3dXdxcmkyODZ0MXlzNGh0aTB1YjRuYzEwZSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/rM0wxzvwsv5g4/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you know, one of the important aspects for all of us is the page loading speed, in other words, the performance of our project. We mentioned that with &lt;em&gt;Sentry&lt;/em&gt;, it is possible to analyze this performance. If we selected the &lt;strong&gt;&lt;code&gt;Performance Monitoring&lt;/code&gt;&lt;/strong&gt; option during the installation process, we actually gain some speed in the setup phase. When we return to our “&lt;em&gt;main.js&lt;/em&gt;” file, we will see thee &lt;strong&gt;&lt;code&gt;BrowserTracing&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;tranceSampleRate&lt;/code&gt;&lt;/strong&gt; values. In &lt;strong&gt;BrowserTracing&lt;/strong&gt;, the adjustments we make involve entering the addresses of our domains. “&lt;em&gt;localhost&lt;/em&gt;” is set as the default. Additionally, we need to add the address of the deployed application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhyt9kitrvf3tm1js7iw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhyt9kitrvf3tm1js7iw.jpg" alt="Tracing URL Settings" width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have added the example “&lt;a href="https://moviepal.vercel.app" rel="noopener noreferrer"&gt;https://moviepal.vercel.app&lt;/a&gt;" as you mentioned. This way, I will be able to measure its performance even in the deployed state.&lt;/p&gt;

&lt;p&gt;Another value we have is &lt;strong&gt;&lt;code&gt;tranceSampleRate&lt;/code&gt;&lt;/strong&gt;, and it is recommended to lower this value in production environments. However, if you are doing local development, it is recommended to set this value to &lt;strong&gt;1.0&lt;/strong&gt;. This way, you will be able to analyze all page reloads.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How will performance monitoring be beneficial for us? Let’s see it in practice.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZGMwMXE1eWxkamY4eXoycTg0aTlhOHpzcHVvMzMxN3pzZDd3dTRyZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/2IudUHdI075HL02Pkk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZGMwMXE1eWxkamY4eXoycTg0aTlhOHpzcHVvMzMxN3pzZDd3dTRyZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/2IudUHdI075HL02Pkk/giphy.gif" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In fact, while working on this project, I was monitoring the performance metrics. And then I realized that the page loading was taking longer due to the images. I was using &lt;strong&gt;UseImage&lt;/strong&gt; for this purpose, thinking it would be effective, but it doesn’t seem to be the case.&lt;/p&gt;

&lt;p&gt;📌 I have shared the development examples I made here on &lt;a href="https://gist.github.com/Eralpozcan/ae1f7d40b16b8420d4ab3f0ac6b6b430" rel="noopener noreferrer"&gt;Gist&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fska0oqzji2u12im06xah.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fska0oqzji2u12im06xah.jpg" alt="Performance Result" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📌 The first thing I did here was to remove &lt;strong&gt;UseImage&lt;/strong&gt; and use a regular Img tag to observe the situation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9n7tfernq5ayhzn0yvwp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9n7tfernq5ayhzn0yvwp.jpg" alt="Performance Result" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📌 As you can see, there is some improvement in our metrics. Although the CLS value has increased, other parameters show a decrease of over 50%. Next, I enable the lazy loading feature of Swiper and the lazy attribute of the img tag. This leads to a significant decrease in our TTFB value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqkk4qljnu4arxa70p9x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqkk4qljnu4arxa70p9x.jpg" alt="Performance Result" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📌 Then, as observed in the images, I notice that CSS files are being repeatedly imported and loaded within the components. I address this by globally importing them into the root directory of our project. This way, there will be no need to load them repeatedly on this page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcyfseewezhymy46xx716.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcyfseewezhymy46xx716.jpg" alt="Performance Result" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You can find a table below that shows the processes we do in a more comparable way.👇&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Swiper CSS Imported*&lt;/th&gt;
&lt;th&gt;Event Duration&lt;/th&gt;
&lt;th&gt;CLS&lt;/th&gt;
&lt;th&gt;FCP&lt;/th&gt;
&lt;th&gt;FP&lt;/th&gt;
&lt;th&gt;LCP&lt;/th&gt;
&lt;th&gt;TTFB&lt;/th&gt;
&lt;th&gt;Gist&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Swiper with UseImage&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;2.93s&lt;/td&gt;
&lt;td&gt;0.226&lt;/td&gt;
&lt;td&gt;733.4ms&lt;/td&gt;
&lt;td&gt;733.4ms&lt;/td&gt;
&lt;td&gt;1.207s&lt;/td&gt;
&lt;td&gt;80.20ms&lt;/td&gt;
&lt;td&gt;&lt;a href="https://gist.github.com/Eralpozcan/ae1f7d40b16b8420d4ab3f0ac6b6b430#file-swiper1useimage-vue" rel="noopener noreferrer"&gt;Gist&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swiper with Img Tag&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;2.67s&lt;/td&gt;
&lt;td&gt;0.392&lt;/td&gt;
&lt;td&gt;383.4ms&lt;/td&gt;
&lt;td&gt;383.4ms&lt;/td&gt;
&lt;td&gt;1.157s&lt;/td&gt;
&lt;td&gt;35.60ms&lt;/td&gt;
&lt;td&gt;&lt;a href="https://gist.github.com/Eralpozcan/ae1f7d40b16b8420d4ab3f0ac6b6b430#file-swiper2img-vue" rel="noopener noreferrer"&gt;Gist&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swiper with Img and Lazy&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;2.06s&lt;/td&gt;
&lt;td&gt;0.253&lt;/td&gt;
&lt;td&gt;391ms&lt;/td&gt;
&lt;td&gt;391ms&lt;/td&gt;
&lt;td&gt;791.5ms&lt;/td&gt;
&lt;td&gt;18.60ms&lt;/td&gt;
&lt;td&gt;&lt;a href="https://gist.github.com/Eralpozcan/ae1f7d40b16b8420d4ab3f0ac6b6b430#file-swiper3imglazy-vue" rel="noopener noreferrer"&gt;Gist&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swiper with Img and Lazy&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;1.78s&lt;/td&gt;
&lt;td&gt;0.218&lt;/td&gt;
&lt;td&gt;312.9ms&lt;/td&gt;
&lt;td&gt;312.9m&lt;/td&gt;
&lt;td&gt;693.7ms&lt;/td&gt;
&lt;td&gt;8ms&lt;/td&gt;
&lt;td&gt;&lt;a href="https://gist.github.com/Eralpozcan/ae1f7d40b16b8420d4ab3f0ac6b6b430#file-swiper4imglazycss-vue" rel="noopener noreferrer"&gt;Gist&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Swiper CSS Imported&lt;/strong&gt;: Indicates whether the Swiper CSS is being reloaded within the page. If the value is “No”, it means that it has been imported into the project’s root directory as well.&lt;/p&gt;

&lt;p&gt;If you feel that your knowledge about abbreviations and metrics is not sufficient, Google web.dev can be helpful for you.&lt;/p&gt;

&lt;p&gt;As has seen, we created a simple example using Sentry’s Performance Monitoring tool and optimized our code. Of course, there are different optimization methods available, but here we made some basic improvements and significantly increased our page loading speed through Sentry.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;With these optimizations, we were able to increase our page loading speed by approximately 60%.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article, I have tried to explain the usage and installation of &lt;strong&gt;Sentry&lt;/strong&gt; and how it can be beneficial to us by providing examples.&lt;/p&gt;

&lt;p&gt;After reading my post, feel free to reach out to me on my &lt;a href="https://www.linkedin.com/in/eralpozcan/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; account if you have any questions or suggestions.&lt;/p&gt;

&lt;p&gt;See you in my next article! 📩&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyh60ti1grxxhpqeg8ni7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyh60ti1grxxhpqeg8ni7.png" alt="Contact QR Code" width="148" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>frontend</category>
      <category>monitoring</category>
      <category>sentry</category>
    </item>
  </channel>
</rss>
