<?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: Rifki Andriyanto</title>
    <description>The latest articles on DEV Community by Rifki Andriyanto (@rifkiandriyanto).</description>
    <link>https://dev.to/rifkiandriyanto</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%2F964629%2Fba6bf6c3-235c-4d3c-bc58-4f003b8d9877.jpeg</url>
      <title>DEV Community: Rifki Andriyanto</title>
      <link>https://dev.to/rifkiandriyanto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rifkiandriyanto"/>
    <language>en</language>
    <item>
      <title>10 Spring Boot REST API Best Practices That'll Save Your Sanity</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Wed, 09 Jul 2025 03:39:30 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/10-spring-boot-rest-api-best-practices-thatll-save-your-sanity-5386</link>
      <guid>https://dev.to/rifkiandriyanto/10-spring-boot-rest-api-best-practices-thatll-save-your-sanity-5386</guid>
      <description>&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%2Fbadql39mpqwt8yj1g9ro.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%2Fbadql39mpqwt8yj1g9ro.png" alt=" " width="613" height="613"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey developers! 👋&lt;/p&gt;

&lt;p&gt;So you're building REST APIs with Spring Boot? Cool! But are you doing it &lt;em&gt;right&lt;/em&gt;? I've seen way too many APIs that work but... let's just say they could be better. A lot better.&lt;/p&gt;

&lt;p&gt;Today I'm sharing 10 best practices that'll make your Spring Boot APIs cleaner, more maintainable, and actually enjoyable to work with. Let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Use Consistent and RESTful Resource Naming
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;❌ Don't do this:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/user"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Singular? Nope!&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Do this instead:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/users"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Always plural!&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@GetMapping&lt;/span&gt; &lt;span class="c1"&gt;// Just this, no "/getAllUsers"&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;getAllUsers&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getAllUsers&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@PostMapping&lt;/span&gt; &lt;span class="c1"&gt;// Not "/createUser"&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt; Keep it simple and follow REST conventions. Your API consumers will thank you.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Return the Correct HTTP Status Codes
&lt;/h2&gt;

&lt;p&gt;Stop returning &lt;code&gt;200 OK&lt;/code&gt; for everything! Here's what you should actually return:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HttpStatus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;CREATED&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// 201, not 200!&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Quick reference:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;200&lt;/code&gt; - OK (for successful GET, PUT)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;201&lt;/code&gt; - Created (for successful POST)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;204&lt;/code&gt; - No Content (for successful DELETE)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;400&lt;/code&gt; - Bad Request (validation errors)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;404&lt;/code&gt; - Not Found&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;500&lt;/code&gt; - Internal Server Error&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Never Expose Your Entities (Use DTOs!)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;❌ This is dangerous:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// DON'T!&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;save&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why? Because you might accidentally expose sensitive data like passwords!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Use DTOs instead:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Request DTO&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="nf"&gt;UserRequest&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt;

&lt;span class="c1"&gt;// Response DTO&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="nf"&gt;UserResponse&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="nc"&gt;Integer&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;
    &lt;span class="c1"&gt;// No password here!&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt;

&lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;UserResponse&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Use Bean Validation (Stop Writing If Statements!)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;❌ Please don't do this:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getName&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;isBlank&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;IllegalArgumentException&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Name is required"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getEmail&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;isBlank&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;IllegalArgumentException&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Email is required"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// More if statements... 😵&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Use validation annotations:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="nf"&gt;UserRequest&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="nd"&gt;@NotBlank&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Name is required"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;

    &lt;span class="nd"&gt;@NotBlank&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Email is required"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nd"&gt;@Email&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Invalid email format"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;

    &lt;span class="nd"&gt;@Size&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Password must be at least 8 characters"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt;

&lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Valid&lt;/span&gt; &lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Validation happens automatically!&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Separate Your Concerns (Controller → Service → Repository)
&lt;/h2&gt;

&lt;p&gt;Don't put business logic in your controllers!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/users"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;UserService&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Inject service&lt;/span&gt;

    &lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Valid&lt;/span&gt; &lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;UserResponse&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HttpStatus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;CREATED&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;@Service&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserService&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;UserRepository&lt;/span&gt; &lt;span class="n"&gt;userRepository&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Inject repository&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;UserResponse&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Business logic goes here&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;user&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;User&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="n"&gt;savedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;userRepository&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;save&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;UserResponse&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;savedUser&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getId&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;savedUser&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getName&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;savedUser&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getEmail&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Always Use Pagination
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Never&lt;/strong&gt; return all records at once. Seriously, never.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@GetMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Page&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;UserResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;getAllUsers&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Pageable&lt;/span&gt; &lt;span class="n"&gt;pageable&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getAllUsers&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pageable&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your API calls will look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /users?page=0&amp;amp;size=10&amp;amp;sort=name,asc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Centralize Exception Handling
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;❌ Don't handle exceptions everywhere:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@PostMapping&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;createUser&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@RequestBody&lt;/span&gt; &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;badRequest&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Something went wrong"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Use @ControllerAdvice:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@ControllerAdvice&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;GlobalExceptionHandler&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@ExceptionHandler&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MethodArgumentNotValidException&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;handleValidationErrors&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MethodArgumentNotValidException&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;errors&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;HashMap&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;();&lt;/span&gt;
        &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getBindingResult&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;getFieldErrors&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;forEach&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; 
            &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;put&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getField&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getDefaultMessage&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt;
        &lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;badRequest&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@ExceptionHandler&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UserNotFoundException&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;handleUserNotFound&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UserNotFoundException&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;notFound&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Implement Security (Don't Skip This!)
&lt;/h2&gt;

&lt;p&gt;I'm not going to implement it here, but &lt;strong&gt;please&lt;/strong&gt; secure your APIs! Options include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JWT tokens&lt;/li&gt;
&lt;li&gt;OAuth2&lt;/li&gt;
&lt;li&gt;Basic authentication&lt;/li&gt;
&lt;li&gt;API keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use Spring Security – it's your friend.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Version Your APIs
&lt;/h2&gt;

&lt;p&gt;Always version your APIs from day one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/api/v1/users"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Version it!&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you need to make breaking changes, create &lt;code&gt;/api/v2/users&lt;/code&gt; and keep v1 running until everyone migrates.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Document Your APIs
&lt;/h2&gt;

&lt;p&gt;Use tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Swagger/OpenAPI&lt;/strong&gt; (most popular)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spring REST Docs&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Postman Collections&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your future self (and your teammates) will thank you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus Tip: Test Your APIs!
&lt;/h2&gt;

&lt;p&gt;Write integration tests for your endpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@SpringBootTest&lt;/span&gt;
&lt;span class="nd"&gt;@AutoConfigureTestDatabase&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserControllerTest&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Autowired&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;TestRestTemplate&lt;/span&gt; &lt;span class="n"&gt;restTemplate&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@Test&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;shouldCreateUser&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;UserRequest&lt;/span&gt; &lt;span class="n"&gt;request&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;UserRequest&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"John"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"john@example.com"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"password123"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="nc"&gt;ResponseEntity&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;UserResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;restTemplate&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;postForEntity&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
            &lt;span class="s"&gt;"/api/v1/users"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;UserResponse&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;assertThat&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getStatusCode&lt;/span&gt;&lt;span class="o"&gt;()).&lt;/span&gt;&lt;span class="na"&gt;isEqualTo&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HttpStatus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;CREATED&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;assertThat&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getBody&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;()).&lt;/span&gt;&lt;span class="na"&gt;isEqualTo&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"John"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;These practices might seem like "extra work" at first, but trust me – they'll save you hours of debugging and refactoring later. Your APIs will be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ More maintainable&lt;/li&gt;
&lt;li&gt;✅ Easier to test&lt;/li&gt;
&lt;li&gt;✅ More secure&lt;/li&gt;
&lt;li&gt;✅ Better documented&lt;/li&gt;
&lt;li&gt;✅ Actually enjoyable to work with&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's your biggest Spring Boot API pain point?&lt;/strong&gt; Drop a comment below – I'd love to help!&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>backend</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why Pay for IntelliJ? Supercharge Java Dev with FREE VSCode!</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Fri, 04 Jul 2025 07:09:53 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/why-pay-for-intellij-supercharge-java-dev-with-free-vscode-11jh</link>
      <guid>https://dev.to/rifkiandriyanto/why-pay-for-intellij-supercharge-java-dev-with-free-vscode-11jh</guid>
      <description>&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%2F7bn7xbvxkv5ecfia2iuc.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%2F7bn7xbvxkv5ecfia2iuc.jpg" alt="Image description" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey there, fellow code warriors! 👋 Tired of seeing that IntelliJ Ultimate paywall every time you want to do some serious Java development? Well, grab your coffee ☕ and let me show you how to turn VSCode into a Java powerhouse that'll make you forget you ever needed that expensive IDE.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why VSCode for Java? 🤔
&lt;/h2&gt;

&lt;p&gt;Look, I get it. IntelliJ IDEA Ultimate is like the Ferrari of Java IDEs. But sometimes you just need a reliable Honda that gets you from point A to point B without breaking the bank. VSCode is free, lightweight, and with the right extensions, it's surprisingly capable for Java development.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Magic Extensions Setup ✨
&lt;/h2&gt;

&lt;h3&gt;
  
  
  One-Command Installation (For the Lazy Developers) 🚀
&lt;/h3&gt;

&lt;p&gt;Copy and paste this bad boy into your terminal, and you'll have everything you need for Java/Spring development:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Java Core Extensions&lt;/span&gt;
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-java-pack
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; redhat.java
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-java-debug
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-java-test
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-java-dependency

&lt;span class="c"&gt;# Build Tools&lt;/span&gt;
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-maven
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-gradle

&lt;span class="c"&gt;# Spring Boot Magic&lt;/span&gt;
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vmware.vscode-boot-dev-pack
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vmware.vscode-spring-boot
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vmware.vscode-spring-boot-dashboard

&lt;span class="c"&gt;# Supporting Cast&lt;/span&gt;
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; redhat.vscode-xml
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; redhat.vscode-yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Or the Ultra-Lazy One-Liner 😎
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-java-pack &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-maven &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vscjava.vscode-gradle &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; vmware.vscode-boot-dev-pack &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; redhat.vscode-xml &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; redhat.vscode-yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What Each Extension Does:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Java Essentials:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extension Pack for Java&lt;/strong&gt; (&lt;code&gt;vscjava.vscode-java-pack&lt;/code&gt;) - The mothership that includes most Java essentials&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language Support for Java&lt;/strong&gt; (&lt;code&gt;redhat.java&lt;/code&gt;) - IntelliSense, syntax highlighting, the works&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugger for Java&lt;/strong&gt; (&lt;code&gt;vscjava.vscode-java-debug&lt;/code&gt;) - Step-through debugging like a boss&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Runner for Java&lt;/strong&gt; (&lt;code&gt;vscjava.vscode-java-test&lt;/code&gt;) - JUnit testing made simple&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maven for Java&lt;/strong&gt; (&lt;code&gt;vscjava.vscode-maven&lt;/code&gt;) - Maven integration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradle for Java&lt;/strong&gt; (&lt;code&gt;vscjava.vscode-gradle&lt;/code&gt;) - Gradle support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Spring Boot Goodies:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot Extension Pack&lt;/strong&gt; (&lt;code&gt;vmware.vscode-boot-dev-pack&lt;/code&gt;) - Everything Spring in one package&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot Tools&lt;/strong&gt; (&lt;code&gt;vmware.vscode-spring-boot&lt;/code&gt;) - Smart auto-completion for Spring&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot Dashboard&lt;/strong&gt; (&lt;code&gt;vscjava.vscode-spring-boot-dashboard&lt;/code&gt;) - Manage your Spring apps visually&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Supporting Cast:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;XML&lt;/strong&gt; (&lt;code&gt;redhat.vscode-xml&lt;/code&gt;) - For those Maven pom.xml files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YAML&lt;/strong&gt; (&lt;code&gt;redhat.vscode-yaml&lt;/code&gt;) - Spring Boot loves YAML configs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started (The Fun Way) 🚀
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the installation commands above&lt;/strong&gt; - Let the magic happen&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restart VSCode&lt;/strong&gt; - Give it a moment to process all that awesomeness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up your JDK&lt;/strong&gt; - VSCode will usually find it, but you can configure it in settings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a new Java project&lt;/strong&gt; - Use &lt;code&gt;Ctrl+Shift+P&lt;/code&gt; and type "Java: Create Java Project"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose your adventure&lt;/strong&gt; - Maven, Gradle, or plain old Java&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Pro Tips That'll Make You Look Smart 🧠
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. The Command Palette is Your Best Friend
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Ctrl+Shift+P&lt;/code&gt; (or &lt;code&gt;Cmd+Shift+P&lt;/code&gt; on Mac) opens up a world of possibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Java: Organize Imports" - Clean up those messy imports&lt;/li&gt;
&lt;li&gt;"Java: Reload Projects" - When things get weird&lt;/li&gt;
&lt;li&gt;"Spring Boot: Run" - Launch your Spring app instantly&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Debugging Like a Pro
&lt;/h3&gt;

&lt;p&gt;Set breakpoints by clicking the left margin, then hit &lt;code&gt;F5&lt;/code&gt;. VSCode's debugger is surprisingly good - you can inspect variables, step through code, and even modify values on the fly.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Testing Made Easy
&lt;/h3&gt;

&lt;p&gt;Right-click on any test method and select "Run Test" or "Debug Test". No need to remember complex Maven/Gradle commands.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Spring Boot Dashboard Magic
&lt;/h3&gt;

&lt;p&gt;Check out that Spring Boot Dashboard in your sidebar - it shows all your Spring Boot apps and lets you start/stop them with a single click.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Miss (And What You Won't) 😅
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;You'll Miss:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some advanced refactoring tools&lt;/li&gt;
&lt;li&gt;Built-in database tools&lt;/li&gt;
&lt;li&gt;That fancy UML diagram generator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;You Won't Miss:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The hefty price tag&lt;/li&gt;
&lt;li&gt;The occasional sluggishness&lt;/li&gt;
&lt;li&gt;Having to justify the expense to your manager&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Bottom Line 💰
&lt;/h2&gt;

&lt;p&gt;VSCode for Java development is like discovering that store-brand cereal tastes just as good as the name brand. Sure, IntelliJ Ultimate has some bells and whistles, but for 90% of Java development tasks, VSCode gets the job done beautifully.&lt;/p&gt;

&lt;p&gt;Plus, you get to keep that $150 in your pocket for more important things... like coffee. Lots and lots of coffee.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Setup Checklist ✅
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Run the extension installation commands&lt;/li&gt;
&lt;li&gt;[ ] Restart VSCode&lt;/li&gt;
&lt;li&gt;[ ] Configure JDK path&lt;/li&gt;
&lt;li&gt;[ ] Create your first Java/Spring project&lt;/li&gt;
&lt;li&gt;[ ] Set up auto-save because life's too short for Ctrl+S&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy coding, and welcome to the VSCode Java club! 🎉&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. - If you're still not convinced, remember: some of the world's best developers use Vim. If they can build amazing things with that, you can definitely rock Java development with VSCode!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>java</category>
      <category>springboot</category>
      <category>programming</category>
    </item>
    <item>
      <title>Key Takeaways from The Effective Engineer</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Thu, 23 Jan 2025 07:08:58 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/key-takeaways-from-the-effective-engineer-68k</link>
      <guid>https://dev.to/rifkiandriyanto/key-takeaways-from-the-effective-engineer-68k</guid>
      <description>&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;p&gt;In this section, I would like to share important notes from the book "The Effective Engineer" taken from Rondy. These notes include key points that can help us understand and apply the principles taught in the book. For more details, you can access the complete notes through the following link: &lt;a href="https://gist.githubusercontent.com/rondy/af1dee1d28c02e9a225ae55da2674a6f/raw/f014346c93b7c6af6353ea5d05cf62d47276ef86/Effective_Engineer.md" rel="noopener noreferrer"&gt;Effective Engineer Notes by Rondy&lt;/a&gt;. These notes not only summarize the content of the book but also provide useful insights for engineers who want to enhance their effectiveness in daily work. By applying the points from these notes, we can accelerate our professional growth and achieve our career goals more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's an Effective Engineer?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;They are the people who get things done. Effective Engineers produce results. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Adopt the Right Mindsets
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Focus on High Leverage Activities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Leverage = Impact Produced / Time Invested&lt;/li&gt;
&lt;li&gt;Use Leverage as Your Yardstick for Effectiveness&lt;/li&gt;
&lt;li&gt;80% of the impact comes from 20% of the work.&lt;/li&gt;
&lt;li&gt;Focus on high leverage and not just easy wins.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Optimize for Learning
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Change jobs if you have to. &lt;/li&gt;
&lt;li&gt;Optimizing for learning is high leverage. &lt;/li&gt;
&lt;li&gt;Adopt a growth mindset. 

&lt;ul&gt;
&lt;li&gt;Talk to people. Become good at telling stories. It gets better with time. &lt;/li&gt;
&lt;li&gt;Those with a growth mindset believe that they can cultivate and grow their intelligence and skills through effort.&lt;/li&gt;
&lt;li&gt;Own your story.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Invest in the rate of learning

&lt;ul&gt;
&lt;li&gt;Learning compounds. Compounding leads to exponential growth. Earlier the compounding starts, the better. &lt;/li&gt;
&lt;li&gt;Working on unchallenging tasks is a huge opportunity cost. You missed out on compounded learning. &lt;/li&gt;
&lt;li&gt;Prioritize learning over profitability.&lt;/li&gt;
&lt;li&gt;Invest your time in activities with the highest learning rate.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Seek Work Environments Conducive to Learning

&lt;ul&gt;
&lt;li&gt;Fast Growth: Companies where #problems &amp;gt;&amp;gt; #resources. Opportunity to choose high impact work.&lt;/li&gt;
&lt;li&gt;Make sure you are working on high priority projects. &lt;/li&gt;
&lt;li&gt;Openness: Look for culture with curiosity, where everyone is encouraged to ask questions.&lt;/li&gt;
&lt;li&gt;Fast Paced. &lt;/li&gt;
&lt;li&gt;People smarter than you.&lt;/li&gt;
&lt;li&gt;Autonomy: Freedom to choose what to work on. Smaller companies =&amp;gt; More autonomy. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;While on Job

&lt;ul&gt;
&lt;li&gt;Make a daily habit of acquiring new skills.&lt;/li&gt;
&lt;li&gt;Read code written by brilliant engineers. &lt;/li&gt;
&lt;li&gt;Jump fearlessly into code you don't know.&lt;/li&gt;
&lt;li&gt;Always be learning. Invest in skills that are in high demand.&lt;/li&gt;
&lt;li&gt;Read Books. Attend Conferences.&lt;/li&gt;
&lt;li&gt;Build and maintain strong relationships.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Prioritize Regularly
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Opportunity cost of working on wrong ideas can set back growth by years.&lt;/li&gt;
&lt;li&gt;Prioritize tasks based on ROI.&lt;/li&gt;
&lt;li&gt;Regular prioritization is high leverage activity.&lt;/li&gt;
&lt;li&gt;On TODO Lists:

&lt;ul&gt;
&lt;li&gt;Maintain a 'single' todo lists where all tasks are listed. &lt;/li&gt;
&lt;li&gt;Don't try to remember stuff. Brain is bad at remembering. It's rather good at processing. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Ask yourself regularly: Is this the most important thing I should be working on?&lt;/li&gt;

&lt;li&gt;Focus on what directly produces value. &lt;/li&gt;

&lt;li&gt;Learn to say no.&lt;/li&gt;

&lt;li&gt;Focus on the important and non-urgent.&lt;/li&gt;

&lt;li&gt;Find ways to get into flow. “A state of effortless concentration so deep that they lose their sense of time, of themselves, of their problems.”&lt;/li&gt;

&lt;li&gt;When possible, preserve larger blocks of focused time in your schedule.&lt;/li&gt;

&lt;li&gt;Limit the amount of Work in Progress.

&lt;ul&gt;
&lt;li&gt;Cost of context switching is high.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Prioritizing is difficult. &lt;/li&gt;

&lt;li&gt;Prioritization is high leverage. It has huge impact on your ability to get right things done.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Invest in Iteration Speed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Continuous Deployment is high leverage.

&lt;ul&gt;
&lt;li&gt;Will save a lot of time in manual deployment of code. They are the people who get things done. Effective Engineers produce results. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Move fast to learn fast.

&lt;ul&gt;
&lt;li&gt;Move fast and break things.&lt;/li&gt;
&lt;li&gt;Moving fast enables us to build more things and learn at faster rate. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Invest in time saving tools.

&lt;ul&gt;
&lt;li&gt;If you have to do something more than twice, write a tool the third time. &lt;/li&gt;
&lt;li&gt;Tools are multipliers that allow your to scale your impact beyond the confines of a day.&lt;/li&gt;
&lt;li&gt;Faster tools get used more often.&lt;/li&gt;
&lt;li&gt;Faster tools can enable new workflows that previously weren't possible.&lt;/li&gt;
&lt;li&gt;Productivity skyrockets with tools.&lt;/li&gt;
&lt;li&gt;Time saving property of tools also scale with team adoption.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Shorten your debugging and validation Loops.

&lt;ul&gt;
&lt;li&gt;Extra time spent in optimizing debugging workflow can help you fix annoying bugs with less headache.&lt;/li&gt;
&lt;li&gt;Debugging is hard. It's time consuming. Upfront investments to shorten debugging loops are worth it. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;High test coverage to reduce build and site breakages.&lt;/li&gt;

&lt;li&gt;Fast unit tests to encourage people to run them.&lt;/li&gt;

&lt;li&gt;Fast and incremental compiles and reloads to reduce development time.&lt;/li&gt;

&lt;li&gt;Master you programming environment.

&lt;ul&gt;
&lt;li&gt;One editor. One high level language. Shell. Keyboard &amp;gt; Mouse. Automate manual workflows. Use interactive shell. Make running specific tests easy.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Faster you can iterate, faster you can learn.&lt;/strong&gt; &lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Measure what you want to Improve
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use metric to drive progress.

&lt;ul&gt;
&lt;li&gt;If you can't measure it, you can't improve it.&lt;/li&gt;
&lt;li&gt;Good metric. &lt;/li&gt;
&lt;li&gt;Helps you focus on right things.&lt;/li&gt;
&lt;li&gt;Drives forward progress.&lt;/li&gt;
&lt;li&gt;Helps you guard against future regressions. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance ratcheting&lt;/strong&gt;: Any change should strictly improve the metric.
&lt;/li&gt;
&lt;li&gt;Bad metric can lead to unwanted behavior.&lt;/li&gt;
&lt;li&gt;Examples: 

&lt;ul&gt;
&lt;li&gt;#hours worked &amp;lt; productivity.&lt;/li&gt;
&lt;li&gt;click through rates &amp;lt; long click through rates.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Metric you choose influences your decisions and behavior.&lt;/li&gt;

&lt;li&gt;Look for metric that, when optimized, maximizes impact for the team.&lt;/li&gt;

&lt;li&gt;Actionable metric - Whose movement can be casually explained by team's effort.&lt;/li&gt;

&lt;li&gt;Responsive metric - Updates quickly to give back feedback whether a given change was =ve or -ive.&lt;/li&gt;

&lt;li&gt;Choosing a metric is high leverage.&lt;/li&gt;

&lt;li&gt;Dedicate time to pick right metric. &lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Instrument everything to understand what's going on. 

&lt;ul&gt;
&lt;li&gt;Measure anything, measure everything. &lt;/li&gt;
&lt;li&gt;Graphite, statsd. A single line of code lets you define a new counter or timer on the fly. &lt;/li&gt;
&lt;li&gt;Measuring goals you want to achieve is high leverage.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Internalize useful numbers.

&lt;ul&gt;
&lt;li&gt;Knowledge of useful numbers provide a valuable shortcut for knowing where to invest efforts to maximize gains.&lt;/li&gt;
&lt;li&gt;Need upfront work. Need not be accurate, ballpark idea suffices.&lt;/li&gt;
&lt;li&gt;Knowing useful numbers enables you to do back of the envelope calculations to quickly estimate the performance properties of a design without actually building it.&lt;/li&gt;
&lt;li&gt;Internalizing useful number help you spot anomalies.
Be skeptical about data integrity.&lt;/li&gt;
&lt;li&gt;Log data liberally.&lt;/li&gt;
&lt;li&gt;Build tools to iterate on data accuracy sooner.&lt;/li&gt;
&lt;li&gt;Examine data sooner.&lt;/li&gt;
&lt;li&gt;When numbers look off, dig in to it sooner.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;✔️ Measure your progress. Carefully choose your top-level metric. Instrument your system. Know your numbers. Prioritize data integrity. &lt;/p&gt;

&lt;h3&gt;
  
  
  Validate your ideas early and often.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Not validating early leads to wasted efforts.&lt;/li&gt;
&lt;li&gt;Don't delay get feedback. &lt;/li&gt;
&lt;li&gt;Find low effort ways to validate work. &lt;/li&gt;
&lt;li&gt;Power of small batches. Helps you avoid making a big mistake by stopping the flow.&lt;/li&gt;
&lt;li&gt;Approach problem iteratively. &lt;/li&gt;
&lt;li&gt;No large implementations.&lt;/li&gt;
&lt;li&gt;Working solo? Be wary. Be extra vocal and get feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Improve project estimation skills.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Beware of mythical man month. Communication overhead is significant. &lt;/li&gt;
&lt;li&gt;Reduce risk early.&lt;/li&gt;
&lt;li&gt;Rewrite projects - almost always fail. &lt;/li&gt;
&lt;li&gt;Additional hours hurt productivity. Causes burnout. &lt;/li&gt;
&lt;li&gt;Do the riskiest task first. &lt;/li&gt;
&lt;li&gt;Allow buffer room for the unknown.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Balance Quality with Pragmatism
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;High code quality. Code readability.&lt;/li&gt;
&lt;li&gt;Establish sustainable code review process.&lt;/li&gt;
&lt;li&gt;Code reviews help:

&lt;ul&gt;
&lt;li&gt;Catch bugs and design problems early.&lt;/li&gt;
&lt;li&gt;Sharing working knowledge of the codebase.&lt;/li&gt;
&lt;li&gt;Increases long term agility. Easier to understand, quicker to modify. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Manage complexity through Abstraction
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Example: MapReduce.&lt;/li&gt;
&lt;li&gt;Right abstractions make huge difference.&lt;/li&gt;
&lt;li&gt;“Pick the right ones, and programming will flow naturally from design; modules will have small and simple interfaces; and new functionality will more likely fit in without extensive reorganization,”&lt;/li&gt;
&lt;li&gt;“Pick the wrong ones, and programming will be a series of nasty surprises: interfaces will become baroque and clumsy as they are forced to accommodate unanticipated interactions, and even the simplest of changes will be hard to make.”&lt;/li&gt;
&lt;li&gt;The right abstraction can increase engineering productivity by an order of magnitude. &lt;/li&gt;
&lt;li&gt;Simple abstractions avoid interweaving multiple concepts, so that you can reason about them independently rather than being forced to consider them together.&lt;/li&gt;
&lt;li&gt;Designing good abstractions take work. &lt;/li&gt;
&lt;li&gt;An abstraction's usage and popularity provides a reasonable proxy for its quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Automate Testing
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Unit test cases and some integration testing provide a scalable way of managing growing codebase.&lt;/li&gt;
&lt;li&gt;A suite of extensive and automated tests can reduce overall error rates by validating the quality and by safeguarding against regressions.&lt;/li&gt;
&lt;li&gt;Tests also allow engineers to make changes, especially large refactorings, with significantly higher confidence.&lt;/li&gt;
&lt;li&gt;Despite its benefits, it can be difficult to foster a culture of automated testing.&lt;/li&gt;
&lt;li&gt;Focus on high leverage tests. &lt;/li&gt;
&lt;li&gt;Writing more tests, creating a virtuous feedback cycle and saving more development time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Repay Technical Debt
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Technical debt refers to all the deferred work that’s necessary to improve the health and quality of the codebase and that would slow us down if left unaddressed.&lt;/li&gt;
&lt;li&gt;Accumulating technical debt is fine as far as it is repaid within time. &lt;/li&gt;
&lt;li&gt;Refactor often.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Reduce Operational Complexity
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Keep no. of technologies low. Don’t sway towards shiny new technologies.&lt;/li&gt;
&lt;li&gt;Every additional technology you add is is guaranteed to go wrong eventually. Will need your time. &lt;/li&gt;
&lt;li&gt;Do the simple thing first.&lt;/li&gt;
&lt;li&gt;Embrace operational simplicity. &lt;/li&gt;
&lt;li&gt;The first solution that comes to mind is generally complex. Don't stop. Keep peeling off the layers of onion. &lt;/li&gt;
&lt;li&gt;Simplify the architecture to reduce their operational burden. &lt;/li&gt;
&lt;li&gt;“What’s the simplest solution that can get the job done while also reducing our future operational burden?” &lt;/li&gt;
&lt;li&gt;Discipline to focus on simplicity is high leverage. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Fail Fast
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Fail immediately and visibly.&lt;/li&gt;
&lt;li&gt;Doesn’t necessarily mean crashing your programs for users.&lt;/li&gt;
&lt;li&gt;fail-fast to surface issues immediately. &lt;/li&gt;
&lt;li&gt;Failing fast is high leverage as it saves debugging time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Relentlessly Automate
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automating mechanics is good.&lt;/li&gt;
&lt;li&gt;Automating decision making - no.&lt;/li&gt;
&lt;li&gt;Hone your ability to respond and recover quickly.

&lt;ul&gt;
&lt;li&gt;Leverage recovering quickly &amp;gt; Leverage preventing failures.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;“script for success,” practice failure scenarios, and work on our ability to recover quickly. &lt;/li&gt;

&lt;li&gt;Make batch process idempotent &lt;/li&gt;

&lt;li&gt;Make processes retryable, i.e., not leaving any global state. &lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Invest in your team's Growth
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Invest in onboarding.&lt;/li&gt;
&lt;li&gt;The higher you climb up the engineering ladder, the more your effectiveness will be measured not by your individual contributions but by your impact on the people around you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"You’re a staff engineer if you’re making a whole team better than it would be otherwise. You’re a principal engineer if you’re making the whole company better than it would be otherwise. And you’re distinguished if you’re improving the industry.”&lt;/strong&gt; 
￼- Focus primarily on making everyone around you succeed.&lt;/li&gt;
&lt;li&gt;Your career depends on your team's success.&lt;/li&gt;
&lt;li&gt;Make hiring everyone's responsibility. &lt;/li&gt;
&lt;li&gt;Shared ownership of code. 

&lt;ul&gt;
&lt;li&gt;Keep bus factor more than one. &lt;/li&gt;
&lt;li&gt;Shared ownership removes isolated silos of information.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Build collective wisdom through post mortems.&lt;/li&gt;

&lt;li&gt;Invest in automated testing.

&lt;ul&gt;
&lt;li&gt;Automated test cases lead to higher confidence when refactoring.&lt;/li&gt;
&lt;li&gt;Write test cases when the code is fresh in mind.&lt;/li&gt;
&lt;li&gt;Don’t be dogmatic about 100% code coverage.&lt;/li&gt;
&lt;li&gt;Value of tests increases over time and cost to write goes down. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Hire the best. &lt;/li&gt;

&lt;li&gt;Surround yourself with great advisors&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;☀️ &lt;strong&gt;“Leverage is the lens through which effective engineers view their activities. ”&lt;/strong&gt; ☀️&lt;/p&gt;

&lt;h2&gt;
  
  
  Related links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@rifkiandriyanto/summarizing-the-effective-engineer-part-1-f06900ee3d30" rel="noopener noreferrer"&gt;Summarizing The Effective Engineer Part 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@rifkiandriyanto/summarizing-the-effective-engineer-part-2-f878c9a0964b" rel="noopener noreferrer"&gt;Summarizing The Effective Engineer Part 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>softwareengineering</category>
      <category>programming</category>
    </item>
    <item>
      <title>Open Source Tailwind CSS + Next.js 15 Template for SaaS and Freelancers</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Fri, 06 Dec 2024 06:44:41 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/open-source-tailwind-css-nextjs-15-template-for-saas-and-freelancers-3fbp</link>
      <guid>https://dev.to/rifkiandriyanto/open-source-tailwind-css-nextjs-15-template-for-saas-and-freelancers-3fbp</guid>
      <description>&lt;p&gt;I’ve created a &lt;strong&gt;Next.js 15&lt;/strong&gt; template built with &lt;strong&gt;Tailwind CSS&lt;/strong&gt;, specifically designed for &lt;strong&gt;SaaS platforms&lt;/strong&gt;, &lt;strong&gt;freelancers&lt;/strong&gt;, and &lt;strong&gt;modern web applications&lt;/strong&gt;. This template is &lt;strong&gt;responsive&lt;/strong&gt;, &lt;strong&gt;SEO-optimized&lt;/strong&gt;, and ready to help you launch your next project with ease!&lt;/p&gt;




&lt;h3&gt;
  
  
  🎯 &lt;strong&gt;Features&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 15&lt;/strong&gt; – The latest and greatest from the Next.js ecosystem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt; – A utility-first CSS framework for rapid styling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SEO Optimized&lt;/strong&gt; – Ensure your site ranks well with best practices built in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-designed Components&lt;/strong&gt; – Tailored for SaaS, freelancers, and general use cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive Design&lt;/strong&gt; – Mobile-first approach for seamless experiences across devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easily Customizable&lt;/strong&gt; – Adaptable to various projects with minimal effort.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🎥 &lt;strong&gt;Demo&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;👉 &lt;a href="https://next-js-boilerplate-landing-page.vercel.app/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;  &lt;/p&gt;




&lt;h3&gt;
  
  
  🔗 &lt;strong&gt;GitHub Repository&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Feel free to check out the code, star it, or contribute to the project!&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/kodespoon/next-js-boilerplate-landing-page" rel="noopener noreferrer"&gt;GitHub: next-js-boilerplate-landing-page&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🌟 &lt;strong&gt;Why Use This Template?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Whether you're building a landing page for a SaaS product, creating a portfolio, or kickstarting a web app for a client, this template provides a strong foundation with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean code.&lt;/li&gt;
&lt;li&gt;Scalability.&lt;/li&gt;
&lt;li&gt;Developer-friendly setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to adapt or modify the template to your needs! Contributions and feedback are always welcome. 😊&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>tailwindcss</category>
      <category>typescript</category>
    </item>
    <item>
      <title>How to Build a GitHub Repo Explorer with React and TypeScript</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Mon, 03 Jul 2023 04:13:52 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/how-to-build-a-github-repo-explorer-with-react-and-typescript-4jnn</link>
      <guid>https://dev.to/rifkiandriyanto/how-to-build-a-github-repo-explorer-with-react-and-typescript-4jnn</guid>
      <description>&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%2Fxu98lzxb2ino34tsa66h.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%2Fxu98lzxb2ino34tsa66h.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/ProgrammerHumor/comments/8op819/how_do_you_do_fellow_devs/" rel="noopener noreferrer"&gt;Image: TheTerrasque / Reddit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub is a popular platform for hosting and managing Git repositories. In this tutorial, we will build a GitHub repository explorer using React and TypeScript. We will leverage the GitHub API to fetch user data and display their repositories. So, let's get started!&lt;/p&gt;

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

&lt;p&gt;First, let's set up our project. Open your terminal and run the following command to create a new React project using Vite:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn create vite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the prompts and choose React and TypeScript as the template.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Structure
&lt;/h2&gt;

&lt;p&gt;Our project structure will consist of several files and directories. Here's an overview:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;api&lt;/strong&gt;: Contains the API functions for fetching data from GitHub.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;components&lt;/strong&gt;: Contains reusable React components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;styles&lt;/strong&gt;: Contains CSS module files for styling the components.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating the &lt;code&gt;App&lt;/code&gt; Component
&lt;/h2&gt;

&lt;p&gt;Let's start by creating the main component of our application, &lt;code&gt;App.tsx&lt;/code&gt;. This component will handle user input, fetch data from the GitHub API, and display the results.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&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;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&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="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&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;fetchUsers&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="s2"&gt;@api/users&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&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;isErrorWithMessage&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="s2"&gt;@components/helpers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Loading&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@components/loading&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@styles/App.module.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Dropdown&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@components/dropdown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;RepositoryCard&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@components/repository-card&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Snackbar&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@components/snackbar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;KeyboardEventHandler&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="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;UserDataType&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="s2"&gt;@api/users&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SnackbarPropsType&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="s2"&gt;@components/snackbar&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;App&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="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setUsername&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setUsers&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UserDataType&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;never&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="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;showData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setShowData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setSnackbar&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
    &lt;span class="nx"&gt;SnackbarPropsType&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;show&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&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="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;show&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="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getUsers&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="nf"&gt;setShowData&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="nf"&gt;setIsLoading&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&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;fetchUsers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;username&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="nf"&gt;isErrorWithMessage&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="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setSnackbar&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;message&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;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;show&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="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setUsers&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="nf"&gt;setShowData&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="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;setIsLoading&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="p"&gt;};&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&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;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;show&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setTimeout&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="nf"&gt;setShowData&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="nf"&gt;setSnackbar&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;show&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="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&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;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;show&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;handlePress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;KeyboardEventHandler&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLInputElement&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;e&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;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enter&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;getUsers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;container&lt;/span&gt;&lt;span class="si"&gt;}&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchBar&lt;/span&gt;&lt;span class="si"&gt;}&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;"text"&lt;/span&gt;
          &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Enter Username"&lt;/span&gt;
          &lt;span class="na"&gt;aria-label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"username-input"&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;
          &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&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;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setUsername&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&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;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;onKeyDown&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handlePress&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Loading&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&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;disabled&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getUsers&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            Search
          &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;)&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;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;showData&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;userSection&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;users&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="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;login&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;githubUsername&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

 &lt;span class="nx"&gt;repositories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userId&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Dropdown&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;githubUsername&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;repositories&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
                    &lt;span class="nx"&gt;repositories&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="p"&gt;({&lt;/span&gt;
                        &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="na"&gt;stargazers_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;stargazersCount&lt;/span&gt;&lt;span class="p"&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;RepositoryCard&lt;/span&gt;
                          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                          &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                          &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                          &lt;span class="na"&gt;stargazerCount&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;stargazersCount&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                        &lt;span class="p"&gt;/&amp;gt;&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="nc"&gt;Dropdown&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;notFound&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Ooop username not found &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;)&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;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;show&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Snackbar&lt;/span&gt; &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;variant&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;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;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&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="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;App&lt;/code&gt; component consists of a search bar where the user can enter a GitHub username. On pressing Enter or clicking the Search button, the &lt;code&gt;getUsers&lt;/code&gt; function is called, which fetches the user data from the GitHub API using the &lt;code&gt;fetchUsers&lt;/code&gt; function. The fetched data is then displayed in the UI using the &lt;code&gt;Dropdown&lt;/code&gt; and &lt;code&gt;RepositoryCard&lt;/code&gt; components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fetching Repositories from the GitHub API
&lt;/h2&gt;

&lt;p&gt;Next, let's create the API functions for fetching data from the GitHub API. Create a new file called &lt;code&gt;repositories.ts&lt;/code&gt; inside the &lt;code&gt;api&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;RepositoryDataType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;stargazers_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fetchRepositories&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="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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;response&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="s2"&gt;`https://api.github.com/users/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/repos`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;RepositoryDataType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&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;data&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;This file exports the &lt;code&gt;fetchRepositories&lt;/code&gt; function, which takes a &lt;code&gt;username&lt;/code&gt; as input and fetches the repositories for that user from the GitHub API.&lt;/p&gt;

&lt;p&gt;Next, create another file called &lt;code&gt;users.ts&lt;/code&gt; inside the &lt;code&gt;api&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;RepositoryDataType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;fetchRepositories&lt;/span&gt;&lt;span class="p"&gt;,&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="s2"&gt;./repositories&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&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;ErrorWithMessageType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getErrorMessage&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="s2"&gt;@components/helpers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;UserDataType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;repositories&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;RepositoryDataType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;login&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;UserDataResponseType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;incomplete_results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UserDataType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;total_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fetchUsers&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="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UserDataType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;ErrorWithMessageType&lt;/span&gt;&lt;span class="o"&gt;&amp;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;try&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;response&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="s2"&gt;`https://api.github.com/search/users?q=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;total_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;totalCount&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;UserDataResponseType&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&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;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;totalCount&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;totalCount&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UserDataType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
      &lt;span class="k"&gt;for &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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&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;repositories&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;fetchRepositories&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;login&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;repositories&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;repositories&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;}&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;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Something went wrong..&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="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;isInstanceOfError&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="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;getErrorMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&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;p&gt;In this file, we define the &lt;code&gt;fetchUsers&lt;/code&gt; function, which takes a &lt;code&gt;username&lt;/code&gt; as input and fetches the user data from the GitHub API. It also calls the &lt;code&gt;fetchRepositories&lt;/code&gt; function to fetch the repositories for each user.&lt;/p&gt;

&lt;p&gt;The function returns an array of &lt;code&gt;UserDataType&lt;/code&gt; or an &lt;code&gt;ErrorWithMessageType&lt;/code&gt; object in case of an error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Additional Components
&lt;/h2&gt;

&lt;p&gt;Now let's create some additional components that will be used in the &lt;code&gt;App&lt;/code&gt; component.&lt;/p&gt;

&lt;p&gt;Create a new file called &lt;code&gt;dropdown.tsx&lt;/code&gt; inside the &lt;code&gt;components&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&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;PropsWithChildren&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&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="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&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;FaChevronDown&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;FaChevronUp&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="s2"&gt;react-icons/fa&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@styles/dropdown.module.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;DropdownPropsType&lt;/span&gt; &lt;span class="o"&gt;=&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="kr"&gt;string&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;Dropdown&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;PropsWithChildren&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DropdownPropsType&lt;/span&gt;&lt;span class="o"&gt;&amp;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="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setOpen&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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="k"&gt;return &lt;/span&gt;&lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dropdown&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"listbox"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&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="nf"&gt;setOpen&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;openState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;openState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;data-testid&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dropdown-label"&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;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;label&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;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FaChevronUp&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FaChevronDown&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;&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="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&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="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&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;div&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;&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;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Dropdown&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This component represents a dropdown menu. It takes a &lt;code&gt;label&lt;/code&gt; prop and renders it as the dropdown header. Clicking on the header toggles the dropdown menu's visibility. The &lt;code&gt;children&lt;/code&gt; prop is the content of the dropdown menu.&lt;/p&gt;

&lt;p&gt;Next, create a file called &lt;code&gt;helpers.ts&lt;/code&gt; inside the &lt;code&gt;components&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;ErrorWithMessageType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;isInstanceOfError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isErrorWithMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;ErrorWithMessageType&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;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;ErrorWithMessageType&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;isInstanceOfError&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;undefined&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getErrorMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&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;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nb"&gt;Error&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;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unknown error occurred&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;p&gt;This file defines some helper functions. The &lt;code&gt;isErrorWithMessage&lt;/code&gt; function checks if an error object is an instance of &lt;code&gt;ErrorWithMessageType&lt;/code&gt;. The &lt;code&gt;getErrorMessage&lt;/code&gt; function extracts the error message from an error object.&lt;/p&gt;

&lt;p&gt;Create a file called &lt;code&gt;loading.tsx&lt;/code&gt; inside the &lt;code&gt;components&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@styles/loading.module.css&lt;/span&gt;&lt;span class="dl"&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;Loading&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="k"&gt;return &lt;/span&gt;&lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"progressbar"&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;&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;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Loading&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This component represents a loading indicator.&lt;/p&gt;

&lt;p&gt;Finally, create a file called &lt;code&gt;repository-card.tsx&lt;/code&gt; inside the &lt;code&gt;components&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&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;FaStar&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="s2"&gt;react-icons/fa&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@styles/repo-card.module.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;RepositoryCardPropsType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;stargazerCount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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;RepositoryCard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;stargazerCount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;RepositoryCardPropsType&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;return &lt;/span&gt;&lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;repositoryCard&lt;/span&gt;&lt;span class="si"&gt;}&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt;&lt;span class="si"&gt;}&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;h5&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&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;h5&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stargazerCount&lt;/span&gt;&lt;span class="si"&gt;}&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;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;stargazerCount&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;p&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;FaStar&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;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;description&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;p&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;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;RepositoryCard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This component represents a card displaying repository information. It takes &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, and &lt;code&gt;stargazerCount&lt;/code&gt; props and renders them in the card.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finalizing the Snackbar Component
&lt;/h2&gt;

&lt;p&gt;Finally&lt;/p&gt;

&lt;p&gt;, let's create the &lt;code&gt;snackbar.tsx&lt;/code&gt; component. Create a file called &lt;code&gt;snackbar.tsx&lt;/code&gt; inside the &lt;code&gt;components&lt;/code&gt; directory and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@styles/snackbar.module.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;SnackbarPropsType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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;Snackbar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;SnackbarPropsType&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;return &lt;/span&gt;&lt;span class="p"&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;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;snackbar&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;
        &lt;span class="nx"&gt;variant&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;message&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;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&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="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Snackbar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This component represents a snackbar notification. It takes a &lt;code&gt;variant&lt;/code&gt; prop with values "success" or "error" to determine the styling and a &lt;code&gt;message&lt;/code&gt; prop to display the notification message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Styling the Components
&lt;/h2&gt;

&lt;p&gt;Now let's add some styles to our components. Create a file called &lt;code&gt;App.module.css&lt;/code&gt; inside the &lt;code&gt;styles&lt;/code&gt; directory and add the following CSS code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;64px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gray&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--border-gray&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;::placeholder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;:focus&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--white&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--blue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--white&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.userSection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;64px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.notFound&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;128px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;640px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.userSection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.searchBar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.notFound&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;64px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&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;p&gt;This CSS code styles the various components in the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;With these components and API functions in place, you should have a functioning GitHub repository search application in React. You can further customize and enhance the components and styles to fit your needs.&lt;/p&gt;

&lt;p&gt;Other CSS styles are not available in this post, and if there are some incomplete components, you can visit GitHub at &lt;a href="https://github.com/rifkiandriyanto/github-repo-explorer" rel="noopener noreferrer"&gt;https://github.com/rifkiandriyanto/github-repo-explorer&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What Software Engineers ACTUALLY Do</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Mon, 13 Mar 2023 05:48:46 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/what-professional-software-engineers-actually-do-11o4</link>
      <guid>https://dev.to/rifkiandriyanto/what-professional-software-engineers-actually-do-11o4</guid>
      <description>&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%2Feo7pz6n6dm5ot2t6cz9g.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%2Feo7pz6n6dm5ot2t6cz9g.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Software engineering is a dynamic and rapidly evolving profession that has become increasingly vital in today's digital world. With software powering everything from our smartphones and cars to the internet itself, it's no wonder that software engineers are in high demand. However, many people still have misconceptions about what professional software engineers actually do in real life. In this blog, we'll take a closer look at the daily life of a professional software engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaborating with Team Members
&lt;/h2&gt;

&lt;p&gt;One of the most important aspects of a software engineer's job is collaborating with other team members. Software engineering projects typically involve multiple stakeholders, including project managers, designers, quality assurance testers, and other developers. Professional software engineers spend a significant amount of time communicating with these team members, discussing project requirements, and ensuring that everyone is on the same page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyzing and Designing Software Systems
&lt;/h2&gt;

&lt;p&gt;Before writing a single line of code, software engineers must analyze and design software systems to ensure that they meet project requirements. This involves identifying problems, defining project scope, and planning out how to implement solutions. Professional software engineers use a range of tools and techniques, including software design patterns and agile methodologies, to ensure that their designs are efficient, scalable, and easy to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing and Testing Code
&lt;/h2&gt;

&lt;p&gt;Once the software system is designed, professional software engineers move on to the coding phase. This involves writing, testing, and debugging code using programming languages, frameworks, and development tools. Writing code is a crucial part of a software engineer's job, but it's just one piece of the puzzle. Professional software engineers also spend a significant amount of time testing and debugging their code to ensure that it functions as intended.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maintaining Existing Codebases
&lt;/h2&gt;

&lt;p&gt;Maintaining existing codebases is another critical aspect of a software engineer's job. As software systems evolve and new features are added, it's essential to ensure that the code remains consistent, efficient, and free from bugs and errors. Professional software engineers spend time reviewing and maintaining existing codebases, ensuring that the code remains easy to read and understand, and collaborating with other developers to ensure that the codebase is consistent and up-to-date.&lt;/p&gt;

&lt;h2&gt;
  
  
  Staying Up-to-Date with the Latest Technologies
&lt;/h2&gt;

&lt;p&gt;Finally, professional software engineers must stay up-to-date with the latest technologies and industry trends to remain competitive in their field. This involves attending conferences, networking with other professionals, and continuing their education through courses and certifications. Staying up-to-date with the latest technologies is crucial for software engineers as it ensures that they remain relevant and able to deliver high-quality work.&lt;/p&gt;

&lt;p&gt;In conclusion, professional software engineers have a diverse range of responsibilities that go far beyond just writing code. They collaborate with team members, analyze and design software systems, write and test code, maintain existing codebases, and stay up-to-date with the latest technologies and industry trends. It's a challenging and rewarding profession that requires a unique combination of technical skills, creativity, and effective communication.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Intro to Supabase: The Complete Backend for Web &amp; Mobile Apps</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Tue, 07 Mar 2023 03:04:56 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/intro-to-supabase-the-complete-backend-for-web-mobile-apps-3l0f</link>
      <guid>https://dev.to/rifkiandriyanto/intro-to-supabase-the-complete-backend-for-web-mobile-apps-3l0f</guid>
      <description>&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%2F4t8uuwka1hc9xjrwmk89.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%2F4t8uuwka1hc9xjrwmk89.png" alt="Image description" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to building an app, the biggest challenge is not writing code, but rather architecting a complete system that works at scale. Firebase and Amplify have addressed this barrier, but there's one big problem - they lock you into proprietary technology on a specific cloud platform.&lt;/p&gt;

&lt;p&gt;This is where Supabase comes in. Created in 2019 specifically as an open source Firebase alternative, it provides two things on the back end. Firstly, infrastructure like a database, file storage, and edge functions that run in the cloud. Secondly, on the front end, client-side SDKs that can easily connect this infrastructure to your favorite front-end JavaScript framework, React Native, Flutter, and many other platforms.&lt;/p&gt;

&lt;p&gt;As a developer, you can manage your Postgres database with an easy-to-understand UI that automatically generates REST and GraphQL APIs to use in your code. The database integrates directly with user authentication, making it almost trivial to implement row level security. And, like Firebase, it can listen to data changes in real-time while scaling to virtually any workload.&lt;/p&gt;

&lt;p&gt;To get started, you can self-host with Docker or sign up for a fully managed account that starts with a free tier. On the dashboard, you can create tables in your Postgres database with a click of a button, insert columns to build out your schema, then add new rows to populate it with data. By default, every project has an authentication schema to manage users within the application. This opens the door to row level security, where you write policies to control who has access to your data.&lt;/p&gt;

&lt;p&gt;In addition, the database supports triggers to react to changes in your data and Postgres functions to run stored procedures directly on the database server. It's a nice interface, but it also automatically generates custom API documentation for you. From here, you can copy queries tailored to your database and use them in a JavaScript project. Install the Supabase SDK with NPM, then connect to your project and sign a user in with a single line of code. And now, you can listen to any changes to the authentication state in real-time with "on/off" stage change.&lt;/p&gt;

&lt;p&gt;When it comes to the database, you don't need to write raw SQL code. Instead, you can paste in that JavaScript code from the API docs or use the REST and GraphQL APIs directly. And that's all it takes to build an authenticated full-stack application. However, you may still want to run your own custom server-side code. In which case, serverless Edge functions can be developed with Deno and Typescript, then easily distributed around the globe.&lt;/p&gt;

&lt;p&gt;In summary, Supabase provides a complete back end for web and mobile applications based entirely on free open source software. It's a flexible and scalable solution that allows developers to easily build, deploy and manage their applications.&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>serverless</category>
      <category>firebase</category>
      <category>webdev</category>
    </item>
    <item>
      <title>15 Future of Databases: Moving Fast and Breaking Things</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Fri, 03 Mar 2023 05:26:09 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/the-future-of-databases-moving-fast-and-breaking-things-k81</link>
      <guid>https://dev.to/rifkiandriyanto/the-future-of-databases-moving-fast-and-breaking-things-k81</guid>
      <description>&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%2Fbs8qb79c14yx0xwovg7i.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%2Fbs8qb79c14yx0xwovg7i.png" alt="Image description" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to succeed in the tech world, you need to move fast and break things. Exactly what I said to my boss before he fired me for deleting a production database. While SQL is a reliable tool in managing databases, there's always room for improvement. The new breed of databases is like a group of mischievous toddlers, ready to push boundaries and break things (and hopefully not set anything on fire!).&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Planetscale
&lt;/h1&gt;

&lt;p&gt;Planetscale is a cloud-native database that is designed to scale easily and handle large amounts of data. It is a relational database that uses the SQL language. The creators of Planetscale wanted to create a database that could handle the needs of modern web applications, which require fast and scalable databases that can handle large amounts of data.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;High scalability: Planetscale is designed to scale easily as your data needs grow.&lt;/li&gt;
&lt;li&gt;Cloud-native: Planetscale is built for the cloud, which means it's optimized for modern web applications.&lt;/li&gt;
&lt;li&gt;Ease of use: Planetscale is easy to set up and use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;br&gt;
Limited to SQL: Planetscale only supports SQL, so if you need a NoSQL database, this may not be the best option.&lt;br&gt;
Cost: Planetscale is a paid service, which may not be ideal for smaller applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Yugabyte
&lt;/h1&gt;

&lt;p&gt;Yugabyte is a distributed SQL database that is designed to handle large amounts of data and high transaction rates. It is designed to be highly available and fault-tolerant, with built-in replication and load balancing features. Yugabyte supports both SQL and NoSQL interfaces, making it a versatile database solution.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Distributed architecture: Yugabyte is designed to be highly available and fault-tolerant, with built-in replication and load balancing features.&lt;/li&gt;
&lt;li&gt;Supports both SQL and NoSQL: Yugabyte supports both SQL and NoSQL interfaces, making it a versatile database solution.&lt;/li&gt;
&lt;li&gt;Scalable: Yugabyte is designed to scale easily as your data needs grow.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Complexity: Yugabyte's distributed architecture can be complex to set up and manage.&lt;/li&gt;
&lt;li&gt;Limited community support: Yugabyte is a relatively new database, so community support may be limited compared to more established databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  3. Neon
&lt;/h1&gt;

&lt;p&gt;Neon is a distributed NoSQL database that is designed for high performance and scalability. It is designed to be highly available and fault-tolerant, with built-in replication and sharding features. Neon supports a variety of data models, including key-value, document, and graph.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;High performance: Neon is designed for high performance, with a distributed architecture that can handle high transaction rates.&lt;/li&gt;
&lt;li&gt;Scalable: Neon is designed to scale easily as your data needs grow.&lt;/li&gt;
&lt;li&gt;Versatile: Neon supports a variety of data models, making it a versatile database solution.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited community support: Neon is a relatively new database, so community support may be limited compared to more established databases.&lt;/li&gt;
&lt;li&gt;Complexity: Neon's distributed architecture can be complex to set up and manage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  4. Dolt
&lt;/h1&gt;

&lt;p&gt;Dolt is a relational database that is designed to work like a Git repository. It allows you to version control your data, making it easy to track changes and collaborate with others. Dolt supports SQL, making it a versatile database solution.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Version control: Dolt allows you to version control your data, making it easy to track changes and collaborate with others.&lt;/li&gt;
&lt;li&gt;Ease of use: Dolt is easy to set up and use.&lt;/li&gt;
&lt;li&gt;Supports SQL: Dolt supports SQL, making it a versatile database solution.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited to SQL: Dolt only supports SQL, so if you need a NoSQL database, this may not be the best option.&lt;/li&gt;
&lt;li&gt;Limited scalability: Dolt may not be the best option for applications with high data needs, as it may not scale as easily as other databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  5. CockroachDB
&lt;/h1&gt;

&lt;p&gt;CockroachDB is a distributed SQL database that is designed for high availability, scalability, and strong consistency. It is inspired by Google's Spanner database and is designed to handle large amounts of data and high transaction rates. CockroachDB supports SQL, making it a versatile database solution.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Distributed architecture: CockroachDB is designed to be highly available and fault-tolerant, with built-in replication and load balancing features.&lt;/li&gt;
&lt;li&gt;Strong consistency: CockroachDB ensures strong consistency across all nodes, even in the face of network partitions or other failures.&lt;/li&gt;
&lt;li&gt;Scalable: CockroachDB is designed to scale easily as your data needs grow.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Complexity: CockroachDB's distributed architecture can be complex to set up and manage.&lt;/li&gt;
&lt;li&gt;Limited community support: CockroachDB is a relatively new database, so community support may be limited compared to more established databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  6. Cloudflare D1
&lt;/h1&gt;

&lt;p&gt;Cloudflare D1 is a distributed key-value store that is designed for high performance and scalability. It is designed to be highly available and fault-tolerant, with built-in replication and load balancing features. Cloudflare D1 supports a variety of data models, including key-value and document.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;High performance: Cloudflare D1 is designed for high performance, with a distributed architecture that can handle high transaction rates.&lt;/li&gt;
&lt;li&gt;Scalable: Cloudflare D1 is designed to scale easily as your data needs grow.&lt;/li&gt;
&lt;li&gt;Distributed architecture: Cloudflare D1 is designed to be highly available and fault-tolerant, with built-in replication and load balancing features.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited data models: Cloudflare D1 only supports key-value and document data models, so if you need other data models, this may not be the best option.&lt;/li&gt;
&lt;li&gt;Limited community support: Cloudflare D1 is a relatively new database, so community support may be limited compared to more established databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  7. Xata
&lt;/h1&gt;

&lt;p&gt;Xata is a cloud-native database designed for data science and machine learning workloads. It is a NoSQL document-oriented database that uses JSON for data storage. The main features of Xata include schemaless and flexible data modeling, built-in version control for data, and support for complex queries. Xata was created to help data scientists work more efficiently by providing a database that integrates well with data science workflows.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Schemaless and flexible data modeling makes it easy to adapt to changing data requirements.&lt;/li&gt;
&lt;li&gt;Built-in version control provides an audit trail for changes made to data.&lt;/li&gt;
&lt;li&gt;Easy to integrate with data science workflows.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Not suitable for transactional workloads or high write loads.&lt;/li&gt;
&lt;li&gt;Limited support for SQL-like querying.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  8. 8Base
&lt;/h1&gt;

&lt;p&gt;8Base is a low-code development platform that includes a fully managed backend-as-a-service (BaaS) with a built-in SQL database. The main features of 8Base include a drag-and-drop data modeling tool, serverless functions for custom business logic, and automatic scaling and redundancy. 8Base was created to help developers build and deploy applications quickly, without having to worry about backend infrastructure.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Low-code platform makes it easy to build and deploy applications.&lt;/li&gt;
&lt;li&gt;Automatic scaling and redundancy ensures high availability and performance.&lt;/li&gt;
&lt;li&gt;Built-in SQL database supports complex querying and transactions.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited customization options for more complex applications.&lt;/li&gt;
&lt;li&gt;Not suitable for workloads that require advanced analytics or machine learning.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  9. EdgeDB 
&lt;/h1&gt;

&lt;p&gt; EdgeDB is a relational database management system that uses a hybrid data model combining the best aspects of SQL and NoSQL databases. It features a rich data type system, declarative schema migrations, and a powerful query language. EdgeDB was created to address the limitations of existing databases in handling complex data models.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Hybrid data model combines the best aspects of SQL and NoSQL databases.&lt;/li&gt;
&lt;li&gt;Rich data type system supports complex data models.&lt;/li&gt;
&lt;li&gt;Declarative schema migrations make it easy to manage changes to data structures.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited ecosystem and community support compared to more established databases.&lt;/li&gt;
&lt;li&gt;Learning curve for the powerful query language may be steep for some users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  10. SurrealDB 
&lt;/h1&gt;

&lt;p&gt; SurrealDB is a distributed database management system designed for high-performance, low-latency workloads. It features a multi-model database with support for key-value, document, and graph data, and a distributed transaction layer for strong consistency. SurrealDB was created to provide a database that can handle the demands of modern, high-traffic applications.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Distributed transaction layer ensures strong consistency and fault tolerance.&lt;/li&gt;
&lt;li&gt;Multi-model database supports various types of data structures.&lt;/li&gt;
&lt;li&gt;High-performance and low-latency make it suitable for demanding workloads.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited ecosystem and community support compared to more established databases.&lt;/li&gt;
&lt;li&gt;Learning curve for configuring and optimizing performance may be steep for some users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  11. Fauna 
&lt;/h1&gt;

&lt;p&gt; Fauna is a globally distributed serverless database that supports multiple data models, including document, graph, and relational. It features a consistent transaction model, automatic scaling and redundancy, and a flexible query language. Fauna was created to provide a serverless database that can handle modern application workloads.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Globally distributed architecture ensures high availability and low-latency.&lt;/li&gt;
&lt;li&gt;Multiple data models support various types of data structures.&lt;/li&gt;
&lt;li&gt;Consistent transaction model ensures data integrity and consistency.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Limited customization options for more complex applications.&lt;/li&gt;
&lt;li&gt;Learning curve for the flexible query language may be steep for some users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conclusion: Overall, the databases on this list offer a wide range of features and capabilities, from distributed SQL databases that can handle high availability and fault tolerance to serverless NoSQL databases that provide global consistency and low latency for real-time applications. Additionally, there are databases that offer features like version control, in-memory storage, and search engine capabilities. Choosing the right database for a particular use case will depend on factors such as the volume of data, the complexity of queries, and the need for scalability and high availability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=jb2AvF8XzII" rel="noopener noreferrer"&gt;reference: fireship.io &lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>mysql</category>
      <category>nosql</category>
      <category>graphql</category>
    </item>
    <item>
      <title>7 Better Ways to Create a React App</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Thu, 02 Mar 2023 06:26:40 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/7-better-ways-to-create-a-react-app-3bmo</link>
      <guid>https://dev.to/rifkiandriyanto/7-better-ways-to-create-a-react-app-3bmo</guid>
      <description>&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%2F6uu836fz619yhc3fi62c.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%2F6uu836fz619yhc3fi62c.png" alt="Image description" width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/rifkiandriyanto/7-alternative-lebih-baik-daripada-create-react-app-1g2b"&gt;Indonesian version&lt;/a&gt;&lt;br&gt;
React is a powerful and widely-used JavaScript library for building modern web applications. However, starting a new React project from scratch can be a daunting task, especially for beginners.&lt;/p&gt;

&lt;p&gt;While Create React App (CRA) has been the go-to tool for bootstrapping React projects, some developers may find its limitations frustrating. Plus, let's face it, the acronym "CRA" is not exactly inspiring - some developers even joke that it stands for "CRAP". Despite the criticism, many developers still rely on CRA for their projects. But who knows, maybe in 2023, continuing to use CRA will be considered a punishable offense, and you'll be forced to learn Ember.js 😭😂&lt;/p&gt;

&lt;p&gt;Fortunately, there are many alternative tools available to help developers start building React apps faster and more efficiently. Here are seven of the best alternatives to Create React App:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Vite
&lt;/h2&gt;

&lt;p&gt;Vite is a build tool that provides a fast development experience with its advanced build system and hot module replacement feature. It also includes a built-in server and supports many languages and frameworks.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Vite provides fast development speed with its advanced build system and hot module replacement feature.&lt;/li&gt;
&lt;li&gt;The platform has a built-in server and supports a wide range of languages and frameworks.&lt;/li&gt;
&lt;li&gt;Vite supports TypeScript out of the box, which is a popular language for building React applications.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Vite is a relatively new technology and may have limited support and documentation.&lt;/li&gt;
&lt;li&gt;Some users may find Vite's configuration options complex and difficult to understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Next 13
&lt;/h2&gt;

&lt;p&gt;Next.js is a popular framework for building server-side rendered and static web applications with React. It provides many advanced features such as file-based routing and API routes.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Next.js provides server-side rendering and static site generation, which can improve application performance and SEO.&lt;/li&gt;
&lt;li&gt;The platform supports React, as well as popular web frameworks like Angular and Vue.&lt;/li&gt;
&lt;li&gt;Next.js has a large community and active development, which means good support and documentation.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Next.js may have a steeper learning curve compared to other alternatives.&lt;/li&gt;
&lt;li&gt;Some users may find Next.js's file-based routing approach difficult to understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Remix
&lt;/h2&gt;

&lt;p&gt;Remix is a new framework for building modern web applications with advanced features like caching and prefetching. It includes a powerful data-fetching API and provides a framework for creating accessible applications.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Remix provides a structure for building modern web applications with advanced features like caching and prefetching.&lt;/li&gt;
&lt;li&gt;The platform includes a powerful data-fetching API that can improve application performance.&lt;/li&gt;
&lt;li&gt;Remix provides a framework for creating accessible applications.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Remix is a relatively new technology and may have limited community support and documentation.&lt;/li&gt;
&lt;li&gt;The platform is not as widely used as other alternatives, which may cause concerns for some users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. NX
&lt;/h2&gt;

&lt;p&gt;NX is a set of tools for building scalable and maintainable web applications. It supports multiple frameworks including React, Angular, and Node.js, and includes features for monorepo management.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;NX provides a structured development approach and a set of tools for building scalable applications.&lt;/li&gt;
&lt;li&gt;The platform supports multiple frameworks including React, Angular, and Node.js.&lt;/li&gt;
&lt;li&gt;NX includes features for monorepo management, which can help manage codebases for large projects.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;The initial setup of NX can be complex and require a learning curve.&lt;/li&gt;
&lt;li&gt;Some users may find NX's configuration options overwhelming.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. StackBlitz
&lt;/h2&gt;

&lt;p&gt;StackBlitz is an online development environment that provides a fast and convenient way to build React apps in the browser. It includes many features such as live reload and debugging, and provides project templates to help users get started quickly.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;StackBlitz provides live reload and debugging features that make React application development easier.&lt;/li&gt;
&lt;li&gt;The platform provides project templates that include some basic features such as authentication, navigation, and state management.&lt;/li&gt;
&lt;li&gt;Users can easily share and access the projects they have created with StackBlitz.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Some of StackBlitz's advanced features such as debugging are not available for the free version.&lt;/li&gt;
&lt;li&gt;Dependency on StackBlitz's infrastructure may cause concerns for some users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Gatsby
&lt;/h2&gt;

&lt;p&gt;Gatsby is a static site generator that provides a fast and efficient way to build React apps. It includes many plugins and templates to help users get started quickly and supports many data sources and integrations.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Gatsby provides fast build times and advanced performance optimization features.&lt;/li&gt;
&lt;li&gt;The platform has a wide range of plugins and templates that can help build applications quickly.&lt;/li&gt;
&lt;li&gt;Gatsby supports many data sources and integrations, which can make application development easier.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Gatsby's configuration options can be complex and may require some effort to understand.&lt;/li&gt;
&lt;li&gt;The platform may not be the best choice for building applications with complex business logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Astro
&lt;/h2&gt;

&lt;p&gt;Astro is a new framework for building web applications with a flexible and modular approach. It includes a built-in server and supports multiple data sources and rendering engines.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Astro provides a flexible and modular approach to building web applications, including React applications.&lt;/li&gt;
&lt;li&gt;The platform has a built-in server and supports multiple data sources and rendering engines.&lt;/li&gt;
&lt;li&gt;Astro provides a lightweight and fast approach to building web applications.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Astro is a relatively new technology and may have limited community support and documentation.&lt;/li&gt;
&lt;li&gt;Some users may find Astro's configuration options complex and difficult to understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In conclusion, there are many better alternatives to Create React App for building modern web applications with React. Developers can choose the tool that best suits their needs and preferences to improve their development experience and efficiency.&lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>7 Alternative Lebih Baik daripada Create React App</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Thu, 02 Mar 2023 06:24:04 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/7-alternative-lebih-baik-daripada-create-react-app-1g2b</link>
      <guid>https://dev.to/rifkiandriyanto/7-alternative-lebih-baik-daripada-create-react-app-1g2b</guid>
      <description>&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%2Fajmj1t7ec5415zulp8fs.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%2Fajmj1t7ec5415zulp8fs.png" alt=" " width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;React adalah sebuah pustaka JavaScript yang kuat dan sering digunakan untuk membangun aplikasi web modern. Namun, memulai proyek React baru dari awal bisa menjadi tugas yang menakutkan, terutama untuk pemula.&lt;/p&gt;

&lt;p&gt;Meskipun Create React App (CRA) telah menjadi alat yang dipilih untuk memulai proyek React, beberapa pengembang mungkin merasa terbatas dan frustasi dengan batasan yang dimilikinya. Selain itu, mari kita hadapi, akronim "CRA" tidak terlalu menginspirasi - beberapa pengembang bahkan bercanda bahwa itu berarti "CRAP". Meskipun mendapat kritik, banyak pengembang masih mengandalkan CRA untuk proyek mereka. Namun, pada tahun 2023, mungkin terus menggunakan CRA akan dianggap sebagai pelanggaran yang dapat dihukum, dan Anda akan dipaksa untuk belajar Ember.js yang mungkin sulit 😭😂 &lt;/p&gt;

&lt;p&gt;Untungnya, ada banyak alat alternatif yang tersedia untuk membantu pengembang memulai membangun aplikasi React dengan lebih cepat dan efisien. Berikut ini adalah tujuh alternatif terbaik untuk Create React App:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Vite
&lt;/h2&gt;

&lt;p&gt;Vite adalah alat build yang menyediakan pengalaman pengembangan yang cepat dengan sistem build yang canggih dan fitur hot module replacement. Alat ini juga menyertakan server bawaan dan mendukung banyak bahasa dan kerangka kerja.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Vite menyediakan kecepatan pengembangan yang cepat dengan sistem build yang canggih dan fitur hot module replacement.&lt;/li&gt;
&lt;li&gt;Platform ini memiliki server bawaan dan mendukung berbagai bahasa dan kerangka kerja.&lt;/li&gt;
&lt;li&gt;Vite mendukung TypeScript secara langsung, yang merupakan bahasa populer untuk membangun aplikasi React.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Vite adalah teknologi yang relatif baru dan mungkin memiliki dukungan dan dokumentasi yang terbatas.&lt;/li&gt;
&lt;li&gt;Beberapa pengguna mungkin merasa opsi konfigurasi Vite kompleks dan sulit dipahami.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Next.js
&lt;/h2&gt;

&lt;p&gt;Next.js adalah kerangka kerja populer untuk membangun aplikasi web yang di-render oleh server dan aplikasi web statis dengan React. Next.js menyediakan banyak fitur canggih seperti routing berbasis file dan route API.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Next.js menyediakan rendering di sisi server dan pembangkitan situs statis, yang dapat meningkatkan performa aplikasi dan SEO.&lt;/li&gt;
&lt;li&gt;Platform ini mendukung React, serta kerangka kerja web populer seperti Angular dan Vue.&lt;/li&gt;
&lt;li&gt;Next.js memiliki komunitas yang besar dan pengembangan aktif, yang berarti dukungan dan dokumentasi yang baik.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Next.js mungkin memiliki kurva belajar yang lebih tinggi dibandingkan alternatif lain.&lt;/li&gt;
&lt;li&gt;Beberapa pengguna mungkin merasa pendekatan routing berbasis file pada Next.js sulit dipahami.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Remix
&lt;/h2&gt;

&lt;p&gt;Remix adalah kerangka kerja baru untuk membangun aplikasi web modern dengan fitur canggih seperti caching dan prefetching. Alat ini menyertakan API pengambilan data yang kuat dan menyediakan kerangka kerja untuk membuat aplikasi yang mudah diakses.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Remix menyediakan struktur untuk membangun aplikasi web modern dengan fitur canggih seperti caching dan prefetching.&lt;/li&gt;
&lt;li&gt;Platform ini menyertakan API pengambilan data yang kuat yang dapat meningkatkan performa aplikasi.&lt;/li&gt;
&lt;li&gt;Remix menyediakan kerangka kerja untuk membuat aplikasi yang mudah diakses.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Remix adalah teknologi yang relatif baru dan mungkin memiliki dukungan dan dokumentasi komunitas yang terbatas.&lt;/li&gt;
&lt;li&gt;Platform ini tidak digunakan seluas alternatif lain, yang mungkin menimbulkan kekhawatiran bagi beberapa pengguna.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. NX
&lt;/h2&gt;

&lt;p&gt;NX adalah rangkaian alat untuk membangun aplikasi web yang skalabel dan mudah dipelihara. NX mendukung beberapa kerangka kerja termasuk React, Angular, dan Node.js, serta menyertakan fitur untuk manajemen monorepo.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;NX menyediakan pendekatan pengembangan yang terstruktur dan rangkaian alat untuk membangun aplikasi yang skalabel.&lt;/li&gt;
&lt;li&gt;Platform ini mendukung beberapa kerangka kerja termasuk React, Angular, dan Node.js.&lt;/li&gt;
&lt;li&gt;NX menyertakan fitur untuk manajemen monorepo, yang dapat membantu mengelola kode sumber untuk proyek besar.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Pengaturan awal NX dapat rumit dan memerlukan waktu pembelajaran.&lt;/li&gt;
&lt;li&gt;Beberapa pengguna mungkin merasa opsi konfigurasi NX sangat membingungkan.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. StackBlitz
&lt;/h2&gt;

&lt;p&gt;StackBlitz adalah lingkungan pengembangan online yang menyediakan cara cepat dan nyaman untuk membangun aplikasi React di browser. Ini termasuk banyak fitur seperti live reload dan debugging, serta menyediakan template proyek untuk membantu pengguna memulai dengan cepat.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;StackBlitz menyediakan fitur live reload dan debugging yang membuat pengembangan aplikasi React lebih mudah.&lt;/li&gt;
&lt;li&gt;Platform ini menyediakan template proyek yang mencakup beberapa fitur dasar seperti autentikasi, navigasi, dan manajemen state.&lt;/li&gt;
&lt;li&gt;Pengguna dapat dengan mudah berbagi dan mengakses proyek yang telah mereka buat dengan StackBlitz.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Beberapa fitur canggih StackBlitz seperti debugging tidak tersedia untuk versi gratis.&lt;/li&gt;
&lt;li&gt;Ketergantungan pada infrastruktur StackBlitz dapat menimbulkan kekhawatiran bagi beberapa pengguna.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Gatsby
&lt;/h2&gt;

&lt;p&gt;Gatsby adalah generator situs statis yang menyediakan cara cepat dan efisien untuk membangun aplikasi React. Ini mencakup banyak plugin dan template untuk membantu pengguna memulai dengan cepat dan mendukung banyak sumber data dan integrasi.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Gatsby menyediakan waktu pembangunan cepat dan fitur optimisasi kinerja yang canggih.&lt;/li&gt;
&lt;li&gt;Platform ini memiliki beragam plugin dan template yang dapat membantu membangun aplikasi dengan cepat.&lt;/li&gt;
&lt;li&gt;Gatsby mendukung banyak sumber data dan integrasi, yang dapat membuat pengembangan aplikasi lebih mudah.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Opsi konfigurasi Gatsby dapat rumit dan mungkin memerlukan sedikit usaha untuk dipahami.&lt;/li&gt;
&lt;li&gt;Platform ini mungkin bukan pilihan terbaik untuk membangun aplikasi dengan logika bisnis yang kompleks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Astro
&lt;/h2&gt;

&lt;p&gt;Astro adalah kerangka kerja baru untuk membangun aplikasi web dengan pendekatan yang fleksibel dan modular. Astro memiliki server bawaan dan mendukung beberapa sumber data dan mesin rendering.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Astro memberikan pendekatan yang fleksibel dan modular untuk membangun aplikasi web, termasuk aplikasi React.&lt;/li&gt;
&lt;li&gt;Platform ini memiliki server bawaan dan mendukung beberapa sumber data dan mesin rendering.&lt;/li&gt;
&lt;li&gt;Astro memberikan pendekatan yang ringan dan cepat untuk membangun aplikasi web.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Astro adalah teknologi yang relatif baru dan mungkin memiliki dukungan komunitas dan dokumentasi yang terbatas.&lt;/li&gt;
&lt;li&gt;Beberapa pengguna mungkin merasa opsi konfigurasi Astro kompleks dan sulit dipahami.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Secara keseluruhan, terdapat banyak alternatif yang lebih baik daripada Create React App untuk membangun aplikasi web modern dengan React. Pengembang dapat memilih alat yang paling cocok untuk kebutuhan dan preferensi mereka untuk meningkatkan pengalaman dan efisiensi pengembangan mereka.&lt;/p&gt;

</description>
      <category>python</category>
      <category>java</category>
      <category>javascript</category>
      <category>cpp</category>
    </item>
    <item>
      <title>Using Multiple SSH Git In Terminal</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Fri, 23 Dec 2022 02:31:11 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/using-multiple-ssh-git-in-terminal-1ljj</link>
      <guid>https://dev.to/rifkiandriyanto/using-multiple-ssh-git-in-terminal-1ljj</guid>
      <description>&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%2F3zgm177w44sewse9wayl.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%2F3zgm177w44sewse9wayl.jpg" alt="Image description" width="548" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/rifkiandriyanto/menggunakan-banyak-ssh-git-dalam-satu-terminal-1ace"&gt;Indonesian version&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For most Developers, there may be a need to run multiple GitHub, GitLab, Bitbucket accounts on one computer. For example, you could run your work GitHub account and another account for your personal projects on the same computer.&lt;/p&gt;

&lt;p&gt;In this article, you will learn how to use multiple SSH keys for different GitHub accounts&lt;/p&gt;

&lt;h2&gt;
  
  
  What is SSH key
&lt;/h2&gt;

&lt;p&gt;In order to understand what this article is about, it is very important to have a good understanding of how Git works.&lt;/p&gt;

&lt;p&gt;What is an SSH key?&lt;br&gt;
SSH (Secure Shell) is a cryptographic network protocol that allows one computer to connect to a server via the internet securely. SSH is best used to access remote servers.&lt;/p&gt;

&lt;p&gt;SSH is designed for encryption, verification, and secure communication between computers. It provides a secure way to execute commands and configure services remotely.&lt;/p&gt;

&lt;p&gt;"From the explanation above, do you understand what SSH is?" "Lessgooo"&lt;/p&gt;
&lt;h2&gt;
  
  
  Manage SSH
&lt;/h2&gt;

&lt;p&gt;If you are new to Git, I suggest deleting all the files in the directory&lt;/p&gt;

&lt;p&gt;~/.ssh and start over.&lt;br&gt;
Okay all the files have been deleted, now we will create a new SSH key.&lt;/p&gt;
&lt;h3&gt;
  
  
  Create a new SSH key
&lt;/h3&gt;

&lt;p&gt;navigate to the ssh directory, run the following command.&lt;br&gt;
cd .ssh/&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; .ssh/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate SSH keys for each GitHub account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_name@email.com"&lt;/span&gt;
ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_name@work_email.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key generator will ask you for a file name.&lt;/p&gt;

&lt;p&gt;Enter a unique name like this for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;id_rsa_personal
id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fncqa6xzfk7gf0q84el79.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%2Fncqa6xzfk7gf0q84el79.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the SSH key on your machine account
&lt;/h3&gt;

&lt;p&gt;Generate SSH keys for your personal account and SSH for your work account&lt;/p&gt;

&lt;p&gt;After generating the keys, use the following command to check if all keys have been generated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List of the following files:&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%2Fbx7xvh84ly0ysarnzn7f.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%2Fbx7xvh84ly0ysarnzn7f.png" alt="Image description" width="800" height="73"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add SSH key to Github account
&lt;/h2&gt;

&lt;p&gt;Now that we have the SSH key, let's link it with a Github account.&lt;/p&gt;

&lt;p&gt;To get the SSH key, run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;id_rsa_personal.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fhvio9b4ln0a9ddjqplc6.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%2Fhvio9b4ln0a9ddjqplc6.png" alt="Image description" width="800" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the SSH key then login to your GitHub account.&lt;/p&gt;

&lt;p&gt;Follow the steps below to add an SSH key to your GitHub account:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On your GitHub, navigate to Settings.&lt;/li&gt;
&lt;li&gt;Select SSH and GPG Keys.&lt;/li&gt;
&lt;li&gt;Hit the New SSH Key, give it a significant Title and paste the Key.&lt;/li&gt;
&lt;li&gt;Finally, click the Add SSH key button.&lt;/li&gt;
&lt;/ol&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%2F6mdyp2qdnsjw6esl0tc1.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%2F6mdyp2qdnsjw6esl0tc1.png" alt="Image description" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a config file to set SSH keys
&lt;/h2&gt;

&lt;p&gt;Next, let's combine everything in a configuration file. There are two GitHub accounts - personal and work accounts. So, we'll create two rules to associate SSH keys with the appropriate GitHub accounts.&lt;/p&gt;

&lt;p&gt;Go back into the ssh directory, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.ssh
touchconfig
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;before creating the config file, make sure the config file is not in the ssh directory.&lt;/p&gt;

&lt;p&gt;if using CMD, can:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;type &lt;/span&gt;null &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"config"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;open in the folder then create a new file with the name config&lt;/p&gt;

&lt;p&gt;If so, you can edit it, or you can make it using your IDE or text editor, you can use nano or code by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;code config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update the configuration file by adding the following rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Personal account - default configuration&lt;/span&gt;

Host github.com
HostName github.com
git &lt;span class="nb"&gt;users
&lt;/span&gt;IdentityFile ~/.ssh/id_rsa_personal

&lt;span class="c"&gt;# Work account&lt;/span&gt;

Host github.com-work
HostName github.com
git &lt;span class="nb"&gt;users
&lt;/span&gt;IdentityFile ~/.ssh/id_rsa_work

&lt;span class="c"&gt;# Personal account - Gitlab host - bonus&lt;/span&gt;

Host gitlab.com
HostName gitlab.com
git &lt;span class="nb"&gt;users
&lt;/span&gt;IdentityFile ~/.ssh/id_rsa_user_gitlab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the file by pressing CTRL + X then pressing Y then pressing ENTER in nano, if using code just press CTRL + S then press ENTER&lt;/p&gt;

&lt;p&gt;Check the config file by:&lt;br&gt;
cat config in terminal or CMD&lt;/p&gt;

&lt;p&gt;In the code above, we have two different values. One is working repository and other is for user repository. Values allow you to add and update SSH configurations from the GitHub repository.&lt;/p&gt;
&lt;h2&gt;
  
  
  Test SSH key
&lt;/h2&gt;

&lt;p&gt;Next, we have to test by cloning the private repository from private GitHub and work GitHub&lt;/p&gt;
&lt;h3&gt;
  
  
  Clone the private repository
&lt;/h3&gt;

&lt;p&gt;To clone your personal project we can use this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.com:username/private-project-repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clone office repository
&lt;/h3&gt;

&lt;p&gt;When cloning your working repository, we will use this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.myorganization.com-work:/company-project-repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference between git cloning personal remote repository and work remote repository is that we use the host that we have created in the config file. For personal remote repositories we use host github.com, while for remote work repositories we use host github.com-work&lt;/p&gt;

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

&lt;p&gt;In conclusion, the point is to create your SSH, then create a config file in the .ssh folder, and finally, use the hostname we created in the config file for the remote repository.&lt;br&gt;
&lt;a href="https://github.com/rifkiandriyanto/multiple-ssh-config" rel="noopener noreferrer"&gt;Github Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Greetings Hello World 👋&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>llm</category>
    </item>
    <item>
      <title>Menggunakan Banyak SSH Git Dalam Terminal</title>
      <dc:creator>Rifki Andriyanto</dc:creator>
      <pubDate>Fri, 23 Dec 2022 02:30:22 +0000</pubDate>
      <link>https://dev.to/rifkiandriyanto/menggunakan-banyak-ssh-git-dalam-satu-terminal-1ace</link>
      <guid>https://dev.to/rifkiandriyanto/menggunakan-banyak-ssh-git-dalam-satu-terminal-1ace</guid>
      <description>&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%2F3zgm177w44sewse9wayl.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%2F3zgm177w44sewse9wayl.jpg" alt="Image description" width="548" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bagi sebagian besar Developer, mungkin ada kebutuhan untuk menjalankan beberapa akun GitHub, GitLab, Bitbucket di satu komputer. Misalnya, Anda dapat menjalankan akun GitHub kantor anda bekerja dan akun lain untuk proyek pribadi Anda di komputer yang sama.&lt;/p&gt;

&lt;p&gt;Pada artikel ini, Anda akan mempelajari cara menggunakan beberapa kunci SSH untuk berbagai akun GitHub&lt;/p&gt;

&lt;h2&gt;
  
  
  Apa itu kunci SSH
&lt;/h2&gt;

&lt;p&gt;Untuk memahami apa yang dimaksud dengan artikel ini, sangat penting untuk memiliki pemahaman yang baik tentang cara kerja Git.&lt;/p&gt;

&lt;p&gt;Apa itu kunci SSH?&lt;br&gt;
SSH (Secure Shell) adalah protokol jaringan kriptografi yang memungkinkan satu komputer terhubung dengan server melalui internet secara aman. SSH paling baik digunakan untuk mengakses server jarak jauh.&lt;/p&gt;

&lt;p&gt;SSH dirancang untuk enkripsi, verifikasi, dan komunikasi yang aman antar komputer. Ini memberikan cara yang aman untuk menjalankan perintah dan mengonfigurasi layanan dari jarak jauh.&lt;/p&gt;

&lt;p&gt;"Dari penjelasan diatas sudah paham kan apa itu SSH?" "Gass bang langsung praktek aja" "Shaap"&lt;/p&gt;
&lt;h2&gt;
  
  
  Mengelola SSH
&lt;/h2&gt;

&lt;p&gt;Jika anda masih pemula dalam git, saya sarankan hapus semua file di dalah directori&lt;/p&gt;

&lt;p&gt;~/.ssh dan mulai dari awal.&lt;br&gt;
Oke semua file nya sudah terhapus, sekarang kita akan membuat kunci SSH baru.&lt;/p&gt;
&lt;h3&gt;
  
  
  Buat kunci SSH baru
&lt;/h3&gt;

&lt;p&gt;navigasikan ke direktori ssh, jalankan perintah berikut.&lt;br&gt;
cd .ssh/&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; .ssh/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hasilkan kunci SSH untuk setiap akun GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"nama_anda@email.com"&lt;/span&gt;
ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"nama_anda@work_email.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generator kunci akan meminta Anda untuk nama file.&lt;/p&gt;

&lt;p&gt;Masukkan nama unik seperti ini sebagai contoh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;id_rsa_personal
id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fncqa6xzfk7gf0q84el79.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%2Fncqa6xzfk7gf0q84el79.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cek kunci SSH pada akun mesin anda
&lt;/h3&gt;

&lt;p&gt;Menghasilkan kunci SSH untuk akun pribadi anda dan SSH untuk akun kantor anda&lt;/p&gt;

&lt;p&gt;Setelah membuat kunci, gunakan perintah berikut untuk memeriksa apakah semua kunci telah dibuat:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Daftar file berikut:&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%2Fbx7xvh84ly0ysarnzn7f.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%2Fbx7xvh84ly0ysarnzn7f.png" alt="Image description" width="800" height="73"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tambahkan SSH key ke akun Github
&lt;/h2&gt;

&lt;p&gt;Sekarang kita memiliki kunci SSH, mari kita tautkan dengan akun Github.&lt;/p&gt;

&lt;p&gt;Untuk mendapatkan kunci SSH, jalankan perintah ini:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;id_rsa_personal.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fhvio9b4ln0a9ddjqplc6.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%2Fhvio9b4ln0a9ddjqplc6.png" alt="Image description" width="800" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Salin kunci SSH lalu masuk ke akun GitHub Anda.&lt;/p&gt;

&lt;p&gt;Ikuti langkah-langkah di bawah ini untuk menambahkan kunci SSH ke akun GitHub Anda:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Di GitHub Anda, navigasikan ke Settings.&lt;/li&gt;
&lt;li&gt;Pilih SSH dan GPG Keys.&lt;/li&gt;
&lt;li&gt;Tekan tombol New SSH Key, berikan Judul yang signifikan dan rekatkan Kuncinya.&lt;/li&gt;
&lt;li&gt;Terakhir, klik tombol Tambahkan kunci SSH.&lt;/li&gt;
&lt;/ol&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%2F6mdyp2qdnsjw6esl0tc1.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%2F6mdyp2qdnsjw6esl0tc1.png" alt="Image description" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Membuat file config untuk mengatur kunci SSH
&lt;/h2&gt;

&lt;p&gt;Selanjutnya, mari kita gabungkan semuanya dalam file konfigurasi. Ada dua akun GitHub - akun pribadi dan kantor. Jadi, kita akan membuat dua aturan untuk menghubungkan kunci SSH dengan akun GitHub yang sesuai.&lt;/p&gt;

&lt;p&gt;Masuk kembali ke directory ssh, jalankan perintah berikut:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.ssh
&lt;span class="nb"&gt;touch &lt;/span&gt;config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sebelum membuat file config, pastikan file config tidak ada di dalam directory ssh.&lt;/p&gt;

&lt;p&gt;jika menggunakan CMD, bisa:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;type &lt;/span&gt;nul &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"config"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;atau&lt;/p&gt;

&lt;p&gt;open di foldernya lalu buat file baru dengan nama config&lt;/p&gt;

&lt;p&gt;Jika sudah, Anda dapat mengeditnya, atau dapat dibuat menggunakan IDE atau text editor kalian, bisa gunakan nano atau code dengan cara:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;atau&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;code config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perbarui file konfigurasi dengan menambahkan aturan berikut:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Akun pribadi - konfigurasi default&lt;/span&gt;

Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_personal

&lt;span class="c"&gt;# Akun kerja&lt;/span&gt;

Host github.com-work
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_work

&lt;span class="c"&gt;# Akun pribadi - host Gitlab - bonus&lt;/span&gt;

Host gitlab.com
HostName gitlab.com
User git
IdentityFile ~/.ssh/id_rsa_user_gitlab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save filenya dengan cara tekan CTRL + X lalu tekan Y lalu tekan ENTER di nano, jika menggunakan code tinggal tekan CTRL + S lalu tekan ENTER&lt;/p&gt;

&lt;p&gt;cek file confignya dengan cara:&lt;br&gt;
cat config di terminal atau CMD&lt;/p&gt;

&lt;p&gt;Dalam kode di atas, kita memiliki dua nilai yang berbeda. Salah satunya adalah repositori kerja dan lainnya untuk repositori pengguna. Nilai memungkinkan Anda untuk menambah dan memperbarui konfigurasi SSH dari repositori GitHub.&lt;/p&gt;
&lt;h2&gt;
  
  
  Test kunci SSH
&lt;/h2&gt;

&lt;p&gt;Selanjutnya, kita harus mengetest dengan cara mengkloning repositori privite dari GitHub pribadi dan GitHub kerja&lt;/p&gt;
&lt;h3&gt;
  
  
  Kloning repository pribadi
&lt;/h3&gt;

&lt;p&gt;Untuk mengkloning proyek pribadi Anda, kami dapat menggunakan perintah ini:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.com:username/private-project-repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Kloning repository kantor
&lt;/h3&gt;

&lt;p&gt;Saat clonning repository kerjaan Anda, kita akan menggunakan perintah ini:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.myorganization.com-work:/company-project-repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;perbedaan dari git kloning remote repository pribadi dan remote repository kerja adalah kita menggunakan host yang telah kita buat di dalam config file. Untuk remote repository pribadi kita menggunakan host github.com, sedangkan untuk remote repository kerja kita menggunakan host github.com-work&lt;/p&gt;

&lt;h2&gt;
  
  
  Kesimpulan
&lt;/h2&gt;

&lt;p&gt;Sebagai kesimpulan, poinnya adalah buat SSH anda, kemudian bikin config file di dalam folder .ssh, dan terakhir, gunakan nama host yang telah kita buat di dalam config file untuk remote repositori.&lt;br&gt;
&lt;a href="https://github.com/rifkiandriyanto/multiple-ssh-config" rel="noopener noreferrer"&gt;Github Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Salam Hello World!&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
