<?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: Georgey</title>
    <description>The latest articles on DEV Community by Georgey (@geobrodas).</description>
    <link>https://dev.to/geobrodas</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%2F487933%2F2736041f-74b8-4d44-8c8a-a96e8dcb2e6c.jpeg</url>
      <title>DEV Community: Georgey</title>
      <link>https://dev.to/geobrodas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/geobrodas"/>
    <language>en</language>
    <item>
      <title>100First - the #100daysofcode tracker!</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Wed, 12 Jan 2022 17:48:20 +0000</pubDate>
      <link>https://dev.to/geobrodas/100first-the-100daysofcode-tracker-45n9</link>
      <guid>https://dev.to/geobrodas/100first-the-100daysofcode-tracker-45n9</guid>
      <description>&lt;h3&gt;
  
  
  Overview of My Submission
&lt;/h3&gt;

&lt;p&gt;The 100first is a web application to track the progress of your 100 days of code challenge, lets you share it across different handles and lets you generate a profile as proof. All you have to do is visit the website and start the challenge!&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Choose Your Own Adventure&lt;/strong&gt;&lt;/p&gt;

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


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/GeoBrodas"&gt;
        GeoBrodas
      &lt;/a&gt; / &lt;a href="https://github.com/GeoBrodas/100first"&gt;
        100first
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      100first is a web application intended to track the #100daysofcode challenge and generate your own unique profile with proof of completion!
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/GeoBrodas/100first/public/Logo/1F.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qIna00VI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/GeoBrodas/100first/public/Logo/1F.png" alt="logo" width="200" height="200"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h3&gt;
 100First - the #100daysofcode tracker! &lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs"&gt;&lt;img src="https://camo.githubusercontent.com/a534d512dd511cc3dbba106a143f49102de27441cefb97421d90dc8d8ea7661f/68747470733a2f2f696d672e736869656c64732e696f2f61706d2f6c2f61746f6d69632d64657369676e2d75692e7376673f" alt="MIT License"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://camo.githubusercontent.com/9398ad978bdccdec8a371f5056e13ccc85ee72e32f34a9caf83772d5a9cc408a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c7565"&gt;&lt;img src="https://camo.githubusercontent.com/9398ad978bdccdec8a371f5056e13ccc85ee72e32f34a9caf83772d5a9cc408a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c7565" alt="Version"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
🔗 Links&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://georgey.codes/" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/aac5a8d4640e954e3dfb481ebadc3f8c239d6c57e6fbeff4d0719d98fc0c6163/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d795f706f7274666f6c696f2d3030303f7374796c653d666f722d7468652d6261646765266c6f676f3d6b6f2d6669266c6f676f436f6c6f723d7768697465" alt="portfolio"&gt;&lt;/a&gt;
&lt;a href="https://www.linkedin.com/in/georgeyvb" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/10fcc3fc61bbf146537c4f6f5a59a340bd9d030a583f74cce7123bb1faba08b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b6564696e2d3041363643323f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465" alt="linkedin"&gt;&lt;/a&gt;
&lt;a href="https://discord.gg/qr6mDan55G" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/4e552dc8081c4f2414d9ed240d98b7e380d8f9f54e719472cdbec1b014700b90/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d3144413146323f7374796c653d666f722d7468652d6261646765266c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465" alt="twitter"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
A web application for tracking the #100daysofcode challenge!&lt;/h2&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/GeoBrodas/100first/public/readme/cover.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zsb-eXdR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/GeoBrodas/100first/public/readme/cover.png" alt="cover-image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
⚡ Fast (Made with Next.js ❤)&lt;/li&gt;
&lt;li&gt;
🔗 Shareable Profile&lt;/li&gt;
&lt;li&gt;
⚙ PWA - installable as a mobile app ( coming soon..)&lt;/li&gt;
&lt;li&gt;
🌏 Cross platform&lt;/li&gt;
&lt;li&gt;
⌚ Track time spent each day&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Tech Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Next.js&lt;/li&gt;
&lt;li&gt;MongoDb Atlas&lt;/li&gt;
&lt;li&gt;TailwindCSS&lt;/li&gt;
&lt;li&gt;NextAuth&lt;/li&gt;
&lt;li&gt;React-Awesome-Reveal&lt;/li&gt;
&lt;li&gt;React-Icons&lt;/li&gt;
&lt;li&gt;Next-PWA&lt;/li&gt;
&lt;li&gt;React-Hot-Toast&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Run Locally&lt;/h2&gt;
&lt;p&gt;Clone the project&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;  git clone https://github.com/GeoBrodas/100first&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Go to the project directory&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;  &lt;span class="pl-c1"&gt;cd&lt;/span&gt; my-project&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Install dependencies&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;  npm install&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Start the server&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;  npm run dev&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
Environment Variables&lt;/h2&gt;
&lt;p&gt;To run this project, you will need to add the following environment variables to your .env file&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET
JWT_SECRET
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_MONGODB_USERNAME
NEXT_PUBLIC_MONGODB_PASSWORD
NEXT_PUBLIC_MONGODB_CLUSTER
NEXT_PUBLIC_MONGODB_DATABASE
NEXT_PUBLIC_API_ROUTE_KEY&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
Roadmap&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Complete UI makeover&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Better User experience&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upgrade back-end services&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Feedback&lt;/h2&gt;
&lt;p&gt;If you have any feedback, please reach out to me at &lt;a href="https://github.com/GeoBrodas/100firstmailto:geobro2310@gmail.com"&gt;geobro2310@gmail.com&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/GeoBrodas/100first"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;
  
  
  Live Link to Application
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://100first.vercel.app"&gt;https://100first.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👀 Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Fast ( Made with Next.js ❤ )&lt;/li&gt;
&lt;li&gt;Cross Platform support&lt;/li&gt;
&lt;li&gt;Responsive&lt;/li&gt;
&lt;li&gt;Installable as PWA&lt;/li&gt;
&lt;li&gt;Simple and easy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🛠 Tech-Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Next.js&lt;/li&gt;
&lt;li&gt;TailwindCSS&lt;/li&gt;
&lt;li&gt;MongoDB Atlas&lt;/li&gt;
&lt;li&gt;MongoDB driver&lt;/li&gt;
&lt;li&gt;React-Hot-Toast&lt;/li&gt;
&lt;li&gt;React-Awesome-Reveal&lt;/li&gt;
&lt;li&gt;NextAuth.js&lt;/li&gt;
&lt;li&gt;React-Icons&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Launch Video
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/DPmJRFtFg_I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Screenshots
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MN8FwOMi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8ayzxmo8vt555azij9g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MN8FwOMi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8ayzxmo8vt555azij9g.png" alt="Dashboard" width="627" height="768"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---oSHLApV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eliiibgsspyt5xx2fiha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---oSHLApV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eliiibgsspyt5xx2fiha.png" alt="Profile-screenshot" width="880" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ce4toCPv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dmgq6nbyapassnxyvrak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ce4toCPv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dmgq6nbyapassnxyvrak.png" alt="What can 100First do?" width="880" height="355"&gt;&lt;/a&gt;   &lt;/p&gt;

&lt;h4&gt;
  
  
  Resources
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://next-auth.js.org/"&gt;NextAuth.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/"&gt;Next.js&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.mongodb.com/drivers/node/current/"&gt;MongoDB driver Manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/guides/nextjs"&gt;TailwindCSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react-icons.github.io/react-icons/"&gt;React-Icons&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Thanks for reading!
&lt;/h2&gt;

&lt;p&gt;Thanks for reading through and checking out my application. The app can be further improved with more and more open source contributors! Finally if you like my concept do give this article a ❤. Thankyou!!&lt;/p&gt;

</description>
      <category>atlashackathon</category>
    </item>
    <item>
      <title>One year of technical writing: Where am I now?</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Wed, 15 Sep 2021 11:17:11 +0000</pubDate>
      <link>https://dev.to/geobrodas/one-year-of-technical-writing-where-am-i-now-2cb8</link>
      <guid>https://dev.to/geobrodas/one-year-of-technical-writing-where-am-i-now-2cb8</guid>
      <description>&lt;p&gt;Hey there developers! I know, I'm sorry! I have been very inconsistent recently, didn't post for three months straight. But duty calls, college went fast these three months. Anyways you must be wondering how come I came all of a sudden! Thanks to the &lt;a href="https://hashnode.com/bootcamp"&gt;Hashnode Bootcamp&lt;/a&gt;! I was able to relieve those old days, where I used to struggle with writing, and today I'm earning from the very thing! Come hear my story of how it all started.&lt;/p&gt;

&lt;h4&gt;
  
  
  - &lt;em&gt;6th July 2020&lt;/em&gt;  : &lt;strong&gt;The beginning&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I bought a Udemy course on Web development after researching for hours on what I should do this Lockdown ( after wasting two months of binge watching series ). At first I wasn't sure of how I would go about but the instructor was really good at explaining stuff and soon I grew in love with coding. It gave me hopes of a career change. I knew there was more to it rather than just coding, and actually showcase my work out in the public. After that I got my ears on Open Source contribution.&lt;/p&gt;

&lt;h4&gt;
  
  
  - &lt;em&gt;1st October 2020&lt;/em&gt; : &lt;strong&gt;Open Source World!&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Hacktober Fest begins! I was really excited on how I would perform. I made some friends on the discord server, and soon enough, got a hang around what actually to do. Initially, I was nervous to send that pull request. Well, what's there to lose! It was a successful merge! The reply back from the maintainer just gave me enough motivation to complete the challenge. &lt;/p&gt;

&lt;p&gt;I used to watch a lot of youtubers during this time, when I came across a video titled &lt;em&gt;"Top skills you need to possess as a developer"&lt;/em&gt;, and yeah you might have guessed it right by now, Blogging was one of them! Guess that video changed my life.&lt;/p&gt;

&lt;h4&gt;
  
  
  - &lt;em&gt;12th October 2021&lt;/em&gt; : &lt;strong&gt;My first article!&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Yeah and finally I did the impossible. I wrote my first article on  &lt;a href="https://dev.to/geobrodas/hacktoberfest-2020-1amn"&gt;Dev&lt;/a&gt; . I was always bad at writing essays back in my school days. I wouldn't even get half the allotted score. I knew my first article won't go viral, but I was off to a good start. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g6hLKaA4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1631624770239/gUQIS1Lg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g6hLKaA4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1631624770239/gUQIS1Lg5.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I started to read articles written by other developers, and later developed a taste in writing articles. Well it didn't just come by reading, I had to write more articles. &lt;/p&gt;

&lt;h4&gt;
  
  
  - &lt;em&gt;9th April 2021&lt;/em&gt; : &lt;strong&gt;A boost much needed&lt;/strong&gt;!
&lt;/h4&gt;

&lt;p&gt;I got introduced to Hashnode around January through the hackathons. Soon enough, I even got a offer to work with a startup, thanks to my hackathon submission! What provoked me to write on Hashnode was the constant support I was receiving from the Hashnode staff.&lt;/p&gt;

&lt;p&gt;Later one fine day, I learnt &lt;a href="https://geobrodas.hashnode.dev/make-your-very-own-vscode-theme-and-publish"&gt;how to make a VSCode theme from scratch&lt;/a&gt; , and wrote a brief article on it describing some tricks and errors one might face otherwise. Guess what! It got featured! The feeling, I was just proud of myself! That was the confirmation  I was waiting for!&lt;/p&gt;

&lt;h4&gt;
  
  
  - &lt;em&gt;11th May 2021&lt;/em&gt; : &lt;strong&gt;A dream come true&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I wanted to take a step forward. I started to see a plenty of articles on freeCodeCamp. In my mind right now, I wanted to build a audience on Twitter. I reached out to the editorial team, and they were happy enough to bring me on their team. What a pleasure, to work with the team that strive to provide free tutorials and content on coding. Truly a honor. In no time I released my first article on  &lt;a href="https://www.freecodecamp.org/news/why-should-you-start-using-chakraui/"&gt;freeCodeCamp&lt;/a&gt; and the response was just mind-blowing. It was the first time I saw such an immense response. This was the time I realized that people were actually getting benefitted from what I write. The realization that I was helping other people, was truly a pleasure to experience.&lt;/p&gt;

&lt;h4&gt;
  
  
  - &lt;em&gt;23rd July 2021&lt;/em&gt; : &lt;strong&gt;Leap of faith&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I wanted to take one last jump. Something to make my parents feel proud, and make them realize that, what I'm doing is something serious and passionate about. I started to reach out multiple guest author programs. Thanks to &lt;a href="https://twitter.com/didicodes"&gt;Edidiong Asikpo&lt;/a&gt; who came in clutch to post an article on  &lt;a href="https://edidiongasikpo.com/5-ways-developers-can-make-money-through-blogging"&gt;ways to earn money from blogging&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;A week after I got back a reply! Swish it was game time. I made my mind clear, and wanted to focus on the article I was about to write for the company blog. A week after, I got paid for the work I did. The feeling? Unreal.&lt;/p&gt;

&lt;p&gt;The journey was filled with obstacles. I had friends that said it was going to be tough. The reality? Everything's tough, nothing comes for free. You have to work until you sweat. If you love what you're doing, go for it. Listen to your heart.&lt;/p&gt;

&lt;h3&gt;
  
  
  My advice to upcoming writers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every writer has their own style of writing&lt;/strong&gt;. You may have to change it when you're representing a company blog like I did. But you can always write freely on platforms like Hashnode and Dev.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start writing one today&lt;/strong&gt;. It's tough to start, I have been there. But what's there to lose. If you feel your content can help even one developer, your in for the job.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read articles from other developers&lt;/strong&gt;. Illustration is something I learnt from reading articles written by other developers. I wasn't good at graphic design first, but there are free tools that can help you get started.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep your content G-Rated&lt;/strong&gt;. There are many young developers who are going to read your articles. It might be misleading for them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose unique topics&lt;/strong&gt;. I personally don't advice to repeat the same articles again and again. Let's say TypeScript. I wouldn't advice to write about how to use it, as there are plenty of resources online, but you can write about how TypeScript helped your development process, or how important is it to add it in your job resume?&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Like what I write? Support me &lt;a href="https://www.buymeacoffee.com/geobrodas"&gt;here&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>writing</category>
      <category>technicalwriting</category>
      <category>freelance</category>
    </item>
    <item>
      <title>How to use Notion API with NextJS</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Sun, 30 May 2021 14:27:46 +0000</pubDate>
      <link>https://dev.to/geobrodas/how-to-use-notion-api-with-nextjs-5940</link>
      <guid>https://dev.to/geobrodas/how-to-use-notion-api-with-nextjs-5940</guid>
      <description>&lt;p&gt;Notion API is finally here, and it's so cool. But you must be wondering what is Notion in the first case? Well, it's a powerful productivity tool for managing your daily day-to-day tasks, or maybe jotting down a lot of ideas you want to put up in your next blog? There are unlimited possibilities. &lt;/p&gt;

&lt;p&gt;I myself found it annoying at first because I have a habit of writing down things instead of typing them out on a notepad. But turns out, it did boost my productivity moreover, it's much more noticeable when you are working with a team.&lt;/p&gt;

&lt;p&gt;Now imagine if you could display all these data to a front-end, and update them directly on the Notion database instead of pushing some extra line of code. Your favorite tool now has its own API!&lt;/p&gt;

&lt;p&gt;This tutorial is beginner-friendly, so don't hesitate. I assure you, the result is satisfying.&lt;/p&gt;

&lt;p&gt;Here are the steps we'll be going through,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new database on Notion.&lt;/li&gt;
&lt;li&gt;Making a new integration.&lt;/li&gt;
&lt;li&gt;Setting up the back-end.&lt;/li&gt;
&lt;li&gt;Fetching data from the database.&lt;/li&gt;
&lt;li&gt;Modifying the API call.&lt;/li&gt;
&lt;li&gt;Displaying the data on a NextJS project.&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;Source code: &lt;a href="https://github.com/GeoBrodas/notion-project/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Create a new database on Notion.
&lt;/h2&gt;

&lt;p&gt;Go ahead and make a new Notion account, if you haven't made one.&lt;/p&gt;

&lt;p&gt;Create a new page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622120222950%2FdspcKphoE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622120222950%2FdspcKphoE.png" alt="add databse.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are lots of templates and different databases available. Here we will be building a project database using the kanban board. Next time whenever you complete an ongoing project, move it to the "Completed" section, and you can see the change instantly on your website.&lt;/p&gt;

&lt;p&gt;Go ahead and add some projects, dummy or actual, which you have already completed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622121121085%2F0T26-R2-T8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622121121085%2F0T26-R2-T8.png" alt="dummy.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Making a new integration.
&lt;/h2&gt;

&lt;p&gt;Now let's connect our database to a new integration. Go to the official page of &lt;a href="https://developers.notion.com/" rel="noopener noreferrer"&gt;Notion API&lt;/a&gt; and click on 'My Integrations' in the top-right corner. &lt;/p&gt;

&lt;p&gt;Make a new integration. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622122190168%2FZM9xVl9Uc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622122190168%2FZM9xVl9Uc.png" alt="integrations.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the Token ID somewhere safe, we'll be using it for authentication ahead.&lt;/p&gt;

&lt;p&gt;Now let's connect our database to the newly created integration.&lt;/p&gt;

&lt;p&gt;Simply, head over to the new page we created, click on &lt;strong&gt;Share&lt;/strong&gt;, and search for the integration we just created.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622203232748%2Fwjhri1Hlp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622203232748%2Fwjhri1Hlp.png" alt="Slide 16_9 - 1.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up the backend.
&lt;/h2&gt;

&lt;p&gt;Now, we'll make our own API, which will fetch the data through Notion API and then filter through the data, to display what is actually relevant.&lt;/p&gt;

&lt;p&gt;Go ahead and run &lt;code&gt;npm init -y&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Make sure you have the latest NodeJS version installed.&lt;/p&gt;

&lt;p&gt;We'll need three packages,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;express @notionhq/client dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install &lt;code&gt;nodemon&lt;/code&gt;, to keep the server active throughout the process.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;nodemon &lt;span class="nt"&gt;--save-dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go over to the &lt;code&gt;package.json&lt;/code&gt; file, and add a new script for &lt;code&gt;nodemon&lt;/code&gt;.&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="s2"&gt;"dev"&lt;/span&gt; : &lt;span class="s2"&gt;"nodemon index.js"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make a new &lt;code&gt;.env&lt;/code&gt; file, and add the Token ID we created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;NOTION_TOKEN_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;yourtokenid&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Head over to the &lt;code&gt;index.js&lt;/code&gt; file, and initialize &lt;code&gt;dotenv&lt;/code&gt; and require the Auth Client from the Notion SDK.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dotenv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;config&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;Client&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@notionhq/client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we need to acquire the database ID to fetch data from the new page we created.&lt;/p&gt;

&lt;p&gt;There are 2 ways to find this out, either you can use &lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; (or any other API testers) and make a &lt;code&gt;GET&lt;/code&gt; request to &lt;a href="https://api.notion.com/v1/databases" rel="noopener noreferrer"&gt;https://api.notion.com/v1/databases&lt;/a&gt; with the Bearer Token ( the Token ID).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622206056989%2FRcVi9Q_uy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622206056989%2FRcVi9Q_uy.png" alt="postman.png"&gt;&lt;/a&gt;&lt;br&gt;
Or head over to the &lt;code&gt;index.js&lt;/code&gt; file, create a new &lt;code&gt;Client&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;notion&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;Client&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NOTION_TOKEN&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;Now, create an &lt;code&gt;async&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;listDatabases&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&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;notion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;databases&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nf"&gt;listDatabases&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run &lt;code&gt;npm run dev&lt;/code&gt;, and if you check the console, you'll be able to view the same result.&lt;/p&gt;

&lt;p&gt;Head over to the &lt;code&gt;.env&lt;/code&gt; file, and add this database ID&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;NOTION_DATABASE_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;yourdatabaseid&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's set up the express server,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&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;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Server is up and running!&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;h2&gt;
  
  
  Fetching data from the database.
&lt;/h2&gt;

&lt;p&gt;Now let's fetch the raw data we get from the Notion API.&lt;/p&gt;

&lt;p&gt;Start with defining a constant &lt;code&gt;payload&lt;/code&gt;, which we will pass through the request as follows&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getProjects&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="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;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`databases/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;database_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/query`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&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;The path is mentioned in the Notion API documentation, although we won't be needing the root URL, since we are using the SDK.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622359176035%2FN9LlTy9ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622359176035%2FN9LlTy9ss.png" alt="query-notion.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source: &lt;a href="https://developers.notion.com/reference/post-database-query" rel="noopener noreferrer"&gt;Notion API documentation&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;From the response, we just need the &lt;code&gt;results&lt;/code&gt; object, hence destructure the object and try to log the response onto the console.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;database_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NOTION_DATABASE_ID&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getProjects&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="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;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`databases/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;database_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/query`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&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;results&lt;/span&gt; &lt;span class="p"&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;notion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;payload&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;results&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;data&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;getProjects&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now be getting the list of cards, we made previously in JSON format as follows.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622366334216%2FJ2VPqLA9M.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622366334216%2FJ2VPqLA9M.png" alt="results-1.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Modifying the API call.
&lt;/h2&gt;

&lt;p&gt;As you have seen, the response has a lot of junk data. In this section, we'll filter through the data, and send a personalized object.&lt;/p&gt;

&lt;p&gt;Now the objective is to get only the cards, that have the marked status "Completed".&lt;/p&gt;

&lt;p&gt;Inside the &lt;code&gt;getProjects&lt;/code&gt; function, let's map through the response, and return a customized object back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;projects&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nx"&gt;page&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;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Completed&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="k"&gt;return&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;page&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;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="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;Now, &lt;code&gt;projects&lt;/code&gt; will be an array of objects each containing an object with the status 'Completed'.&lt;/p&gt;

&lt;p&gt;It will also have some null values. We can remove these by using the &lt;code&gt;filter&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;This can be implemented in the return statement as follows,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;projects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the final response should only contain an array of objects with the status 'Completed'.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622369774388%2FLE-NmQ2bz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1622369774388%2FLE-NmQ2bz.png" alt="results-final.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's left now is to set up a route in our express server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/projects&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;projects&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;getProjects&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;projects&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;h2&gt;
  
  
  Displaying the data on a NextJS project.
&lt;/h2&gt;

&lt;p&gt;Our API is Ready! &lt;/p&gt;

&lt;p&gt;The final task is to display it to a front-end. Go ahead and initialize a new NextJS project. (or if you have an existing project)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-next-app notion-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to &lt;code&gt;pages/index.js&lt;/code&gt;.&lt;br&gt;
( or any other route you prefer, depending on the type of project your working on)&lt;/p&gt;

&lt;p&gt;Make a new &lt;code&gt;.env.local&lt;/code&gt; file to store the API URL. NextJS comes in-built with environment variables support.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;NEXT_API&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//localhost:8000/projects&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In NextJS, to receive data from the endpoint, NextJS uses an &lt;code&gt;async&lt;/code&gt; function called &lt;code&gt;getStaticProps&lt;/code&gt;. By using this function, NextJS will pre-render the data on the server-side on &lt;strong&gt;build&lt;/strong&gt; time, rather than fetching the data when the page first loads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getStaticProps&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="c1"&gt;// get posts from our api&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&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="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_API&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;projects&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;res&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="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;projects&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;We can now get hold of this array, by passing it to the default function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Home&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;projects&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; 
                 &lt;span class="nx"&gt;projects&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;projects&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;project&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;li&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;project&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="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;project&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/li&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="err"&gt; 
&lt;/span&gt;             &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ul&lt;/span&gt;&lt;span class="err"&gt;&amp;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;Congrats! You're doing a great job!&lt;/p&gt;

&lt;p&gt;You can check what I did with Notion API on my portfolio page &lt;a href="https://sh-ort.app/cldeq" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;I could build this through Traversy Media's video on Youtube, so if you get stuck, check out his tutorial!&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/9JdP-S3crt8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks for Reading!🎉
&lt;/h2&gt;

&lt;p&gt;The Notion API can be tweaked in many ways. You can integrate it with Slack, Typeform, etc. It's a really powerful tool. As a personal advice, if you haven't worked with API's before, I think Notion API is just the place. It's really simple and has a great documentation with plenty of video tutorials online. Hit me up on &lt;a href="https://sh-ort.app/owefm" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; with your creation!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you need the source code, do let me know in the comments section below, I'll respond as soon as possible👍&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Support me 🙌
&lt;/h2&gt;

&lt;p&gt;My blogs are powered by coffees, if you feel I deserve one, Thanks❤&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/geobrodas" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520coffee%26emoji%3D%26slug%3Dgeobrodas%26button_colour%3DFF5F5F%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>nextjs</category>
      <category>node</category>
      <category>database</category>
    </item>
    <item>
      <title>Build a Weather Application using GraphQL and Chakra UI</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Mon, 17 May 2021 04:00:55 +0000</pubDate>
      <link>https://dev.to/geobrodas/build-a-weather-application-using-graphql-and-chakra-ui-4j6o</link>
      <guid>https://dev.to/geobrodas/build-a-weather-application-using-graphql-and-chakra-ui-4j6o</guid>
      <description>&lt;p&gt;I was using RestAPI architecture initially and life was going good but turns out, GraphQL is much more popular than I thought. &lt;/p&gt;

&lt;p&gt;I then went on a quest to determine why GraphQL was so much preferred over RestAPI. &lt;/p&gt;

&lt;p&gt;My findings proved to be resourceful, and I was surprised to see the results. &lt;/p&gt;

&lt;p&gt;Let's say you're on a project, using RestAPI. You want to fetch some data. The data that comes from the endpoint is a JSON object over which we have no control, to choose which data to be received by the front-end. What you finally get is maybe a long JSON response. &lt;/p&gt;

&lt;p&gt;Now let's see what happens when you use GraphQL.&lt;br&gt;
You get a JSON response back in the same way, but it looks like I can choose over a range of parameters available, and select the data only which is required to be displayed in the application.&lt;/p&gt;

&lt;p&gt;In this way, your application is bound to perform much better and the response you receive is fast and selective.&lt;/p&gt;

&lt;p&gt;After this, I was eager to learn GraphQL, and what's better than to make a project on it.&lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw" rel="noopener noreferrer"&gt;Web Dev Simplified&lt;/a&gt; a project which includes handling any API and manipulating it on your front-end is a must-have on your resume.&lt;/p&gt;

&lt;p&gt;I thought, why not make a Weather application, since I didn't make any yet. &lt;/p&gt;

&lt;p&gt;Let's make use of &lt;a href="https://graphql-weather-api.herokuapp.com/" rel="noopener noreferrer"&gt;this&lt;/a&gt; GraphQL weather API for the project.&lt;/p&gt;

&lt;p&gt;We'll be using ChakraUI on the front-end. So if you have not worked with ChakraUI before, this tutorial will be perfect to get started!&lt;/p&gt;

&lt;p&gt;Here are the steps we'll be going through in this tutorial&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Explore the PlayGround and set the parameters.&lt;/li&gt;
&lt;li&gt;Setting up front-end with ChakraUI&lt;/li&gt;
&lt;li&gt;Handling requests&lt;/li&gt;
&lt;li&gt;Using the response to display on the front-end.&lt;/li&gt;
&lt;li&gt;Using ChakraUI to show a loading state and enable Dark Mode &lt;/li&gt;
&lt;/ol&gt;



&lt;blockquote&gt;
&lt;p&gt;Resources to build the project &lt;br&gt;&lt;br&gt;
GitHub repo - &lt;a href="https://github.com/GeoBrodas/graphql-weatherapp" rel="noopener noreferrer"&gt;https://github.com/GeoBrodas/graphql-weatherapp&lt;/a&gt; &lt;br&gt;&lt;br&gt;
Live Link - &lt;a href="https://graphqlweather.netlify.app/" rel="noopener noreferrer"&gt;https://graphqlweather.netlify.app/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621153148168%2Fr7EHK2KMQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621153148168%2Fr7EHK2KMQ.jpeg" alt="appss.JPG"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore the PlayGround and set the parameters
&lt;/h2&gt;

&lt;p&gt;Head over to the &lt;a href="https://graphql-weather-api.herokuapp.com/" rel="noopener noreferrer"&gt;Weather API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You'll see an interactive playground in action.&lt;/p&gt;

&lt;p&gt;What you see is a query that contains a bunch of parameters. Now if you run the query, you'll see a response, with resultant data for each parameter that was entered.&lt;/p&gt;

&lt;p&gt;Now what we want is very concise. The parameters that I will be using are &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;weather&lt;/code&gt;, &lt;code&gt;temperature&lt;/code&gt;, and &lt;code&gt;wind&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The query now after modifying should look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query {
  getCityByName(name: &amp;lt;Your_City&amp;gt;) {
    name
    weather {
      summary {
        title
        description
      }
      temperature {
        actual
        feelsLike
      }
      wind {
        speed
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In place of &lt;code&gt;Your_City&lt;/code&gt;, enter your city or any of your choice. &lt;/p&gt;

&lt;p&gt;Still, we won't be using all the data, but for now, go ahead and run the query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up front-end with ChakraUI
&lt;/h2&gt;

&lt;p&gt;Let's now set up the front-end with Chakra UI&lt;/p&gt;

&lt;p&gt;First Install Chakra UI using npm&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now set up the provider in the root file - &lt;code&gt;src/index.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import ReactDOM from 'react-dom'
import { ChakraProvider, ColorModeScript } from '@chakra-ui/react'
import App from './components/App'

ReactDOM.render(
  &amp;lt;ChakraProvider&amp;gt;
    &amp;lt;ColorModeScript initialColorMode="light" /&amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/ChakraProvider&amp;gt;,
  document.getElementById('root')
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ColorModeScript&lt;/code&gt; is a component for tracking the &lt;code&gt;light&lt;/code&gt; and &lt;code&gt;dark&lt;/code&gt; mode, which we will be enabling towards the end. &lt;/p&gt;

&lt;p&gt;Let's now make a new component called &lt;code&gt;Dashboard.js&lt;/code&gt; in the &lt;code&gt;src/components&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;First, let's make an Icon button for toggling the &lt;code&gt;dark&lt;/code&gt; mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import { VStack, IconButton } from '@chakra-ui/react'

export default function Dashboard ( ) {
return (
  &amp;lt;VSack&amp;gt;
    &amp;lt;IconButton
        aria-label="Toggle Dark Mode"
        m="8"
        size="md"
        alignSelf="flex-end"
      /&amp;gt;
  &amp;lt;/VStack&amp;gt;
)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now prepare the Heading and Input fields&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react'
import {
  Input,
  VStack,
  HStack,
  IconButton,
  Heading
} from '@chakra-ui/react'
import { FiSearch } from 'react-icons/fi'

export default function Dashboard ( ) {

  const [result, setResult] = useState('')
  const [value, setValue] = useState('')

 return (
&amp;lt;VStack&amp;gt;
      &amp;lt;IconButton
        aria-label="Toggle Dark Mode"
        m="8"
        size="md"
        alignSelf="flex-end"
      /&amp;gt;
      &amp;lt;Heading mb="8" size="xl"&amp;gt;
        Search your city
      &amp;lt;/Heading&amp;gt;
      &amp;lt;HStack&amp;gt;
        &amp;lt;Input
          type="text"
          placeholder="Enter city name"
          value={result}
          onChange={(event) =&amp;gt; setResult(event.target.value)}
        /&amp;gt;
        &amp;lt;IconButton
          aria-label="Search city button"
          icon={&amp;lt;FiSearch /&amp;gt;}
          onClick={() =&amp;gt; {
            setValue(result)
            getWeather()
            //Errormessage()
          }}
        &amp;gt;
          Search
        &amp;lt;/IconButton&amp;gt;
      &amp;lt;/HStack&amp;gt;
&amp;lt;/VStack&amp;gt;
)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are now done with the input fields. Go ahead and console log the data from the input fields to check whether the states are behaving the way they should be. If you run into any errors, don't forget to check the GitHub repo I have shared.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling requests
&lt;/h2&gt;

&lt;p&gt;To interact with the API, we need to install some packages to set up GraphQL in the app itself.&lt;/p&gt;

&lt;p&gt;Install the following packages,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install graphql @apollo/client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like how we wrapped &lt;code&gt;ChakraProvider&lt;/code&gt; around our &lt;code&gt;App&lt;/code&gt; component, we need to do the same for our App to handle graphQL requests.&lt;/p&gt;

&lt;p&gt;Make the following changes in your &lt;code&gt;App.js&lt;/code&gt; file inside the &lt;code&gt;src/components&lt;/code&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import { ApolloClient, ApolloProvider, InMemoryCache } from '@apollo/client'
import Dashboard from './Dashboard'

export default function App() {
  const client = new ApolloClient({
    cache: new InMemoryCache(),
    uri: 'https://graphql-weather-api.herokuapp.com/',
  })

  return (
    &amp;lt;ApolloProvider client={client}&amp;gt;
      &amp;lt;Dashboard /&amp;gt;
    &amp;lt;/ApolloProvider&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we are defining a constant, and initializing the Apollo client by feeding in 2 parameters- &lt;code&gt;cache&lt;/code&gt; and &lt;code&gt;uri&lt;/code&gt;. Parameter &lt;code&gt;uri&lt;/code&gt; is the default API end-point we are using here, and &lt;code&gt;cache&lt;/code&gt; makes sure that the app doesn't send unnecessary requests for the same data.&lt;/p&gt;

&lt;p&gt;Now let's create a new file say &lt;code&gt;Queries.js&lt;/code&gt;. I will create this in a separate directory &lt;code&gt;src/components/graphql&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The file will contain the query, which we had earlier created in the playground.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { gql } from '@apollo/client'

export const GET_WEATHER_QUERY = gql`
  query getCityByName($name: String!) {
    getCityByName(name: $name) {
      name
      country
      weather {
        summary {
          title
          description
        }
        temperature {
          actual
          feelsLike
        }
        wind {
          speed
        }
      }
    }
  }
`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For passing in the name of the city, we'll pass it through &lt;code&gt;$name&lt;/code&gt;, passed through the input field.&lt;/p&gt;

&lt;p&gt;If you have worked with MongoDB schemas, this notation will be much more familiar.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To know more about GraphQL schema types visit the documentation at&lt;br&gt;
&lt;a href="https://graphql.org/learn/schema/" rel="noopener noreferrer"&gt;https://graphql.org/learn/schema/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now let's make a request to the API endpoint and log the response.&lt;/p&gt;

&lt;p&gt;Head over to the &lt;code&gt;Dashboard.js&lt;/code&gt; file and make the following changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useLazyQuery } from '@apollo/client'
import { GET_WEATHER_QUERY } from '../graphql/Queries'

export default function Dashboard ( ) {
  const [getWeather, { loading, data, error }] = useLazyQuery(
    GET_WEATHER_QUERY,
    {
      variables: { name: value },
    }
  )

// Search button for input field
&amp;lt;IconButton
    aria-label="Search city button"
    icon={&amp;lt;FiSearch /&amp;gt;}
    onClick={() =&amp;gt; {
      setValue(result)
      getWeather()
      }}
 &amp;gt;
    Search
&amp;lt;/IconButton&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the button is clicked, two events get triggered. One is the setValue() state we defined earlier and getWeather( ) function upon which the request is sent and in turn, the response is fetched and stored in the &lt;code&gt;data&lt;/code&gt; variable. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;value&lt;/code&gt; state is passed to the &lt;code&gt;name&lt;/code&gt; property which we defined earlier in the &lt;code&gt;src/components/graphql/Queries.js&lt;/code&gt; file.&lt;br&gt;
 Now if you &lt;code&gt;console.log(data)&lt;/code&gt;, you should be able to view the response sent back from the API endpoint.&lt;/p&gt;
&lt;h2&gt;
  
  
  Using the response to display on the front-end
&lt;/h2&gt;

&lt;p&gt;The response we get back from the end-point is an object, which we got hold of previously with the  &lt;code&gt;data&lt;/code&gt; variable.&lt;/p&gt;

&lt;p&gt;Now let's display the response to the front-end in form of a sleek table.&lt;/p&gt;

&lt;p&gt;We'll make use of Chakra Ui's &lt;code&gt;Table&lt;/code&gt; component here.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Refer Chakra UI's documentation if you get lost any time &lt;br&gt;&lt;br&gt;
&lt;a href="https://chakra-ui.com/docs/data-display/table" rel="noopener noreferrer"&gt;https://chakra-ui.com/docs/data-display/table&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Import the following components&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {
  Stack,
  Table,
  Tbody,
  Tr,
  Td,
  TableCaption,
  StackDivider,
  HStack,
  Divider,
} from '@chakra-ui/react'

// Dashboard component
&amp;lt;Stack&amp;gt;
        &amp;lt;Divider mt="4" mb="4" borderColor="gray.100" /&amp;gt;
        {data &amp;amp;&amp;amp; (
          &amp;lt;&amp;gt;
            &amp;lt;VStack
              divider={&amp;lt;StackDivider /&amp;gt;}
              borderColor="gray.100"
              borderWidth="2px"
              p="4"
              borderRadius="lg"
              w="100%"
              maxW={{ base: '90vw', sm: '80vw', lg: '50vw', xl: '40vw' }}
              alignItems="stretch"
            &amp;gt;
              &amp;lt;Table variant="simple"&amp;gt;
                &amp;lt;TableCaption&amp;gt;
                  Weather in {data.getCityByName.name} right now
                &amp;lt;/TableCaption&amp;gt;

                &amp;lt;Tbody&amp;gt;
                  &amp;lt;Tr&amp;gt;
                    &amp;lt;Td&amp;gt;Temperature&amp;lt;/Td&amp;gt;

                    &amp;lt;Td textAlign="right"&amp;gt;
                      {Math.floor(
                        data.getCityByName.weather.temperature.actual - 273
                      ) + ' '}
                      Deg C
                    &amp;lt;/Td&amp;gt;
                  &amp;lt;/Tr&amp;gt;
                  &amp;lt;Tr&amp;gt;
                    &amp;lt;Td&amp;gt;Feels like&amp;lt;/Td&amp;gt;
                    &amp;lt;Td textAlign="right"&amp;gt;
                      {data.getCityByName.weather.summary.description}
                    &amp;lt;/Td&amp;gt;
                  &amp;lt;/Tr&amp;gt;
                  &amp;lt;Tr&amp;gt;
                    &amp;lt;Td&amp;gt;Wind speed (mph)&amp;lt;/Td&amp;gt;

                    &amp;lt;Td textAlign="right"&amp;gt;
                      {data.getCityByName.weather.wind.speed + ' '}
                    &amp;lt;/Td&amp;gt;
                  &amp;lt;/Tr&amp;gt;
                &amp;lt;/Tbody&amp;gt;
              &amp;lt;/Table&amp;gt;
            &amp;lt;/VStack&amp;gt;
          &amp;lt;/&amp;gt;
        )}
      &amp;lt;/Stack&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's similar to the HTML tables we used to do back in the old days. But most importantly we can get hold of the data coming back from the response. &lt;/p&gt;

&lt;p&gt;Here, if you have noticed, I have converted the kelvin unit which was by default coming back from the response, to celsius using the formula - &lt;code&gt;temperature in kelvin - 273 = Temperature in celsius&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;I would suggest reading the Chakra UI documentation for more clarity on Chakra Ui &lt;code&gt;Table&lt;/code&gt; component.&lt;/p&gt;

&lt;p&gt;Your final output should look something like this - &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621163884128%2FSIedpPpy8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621163884128%2FSIedpPpy8.jpeg" alt="result-3-fix.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using ChakraUI to show a loading state and enable Dark Mode
&lt;/h2&gt;

&lt;p&gt;While writing the logic for getting requests from the GraphQL server, we had destructured a variable called &lt;code&gt;loading&lt;/code&gt;. This state can be used to determine whether the process of retrieving the request is under process or not.&lt;/p&gt;

&lt;p&gt;We can make use of Chakra UI's &lt;code&gt;spinner&lt;/code&gt; component here.&lt;/p&gt;

&lt;p&gt;The logic for displaying the spinner would be as follows&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { spinner } from "@chakra-ui/react" 
// Dashboard.js component
&amp;lt;Stack&amp;gt;
        {loading &amp;amp;&amp;amp; (
          &amp;lt;&amp;gt;
            &amp;lt;Spinner
              thickness="4px"
              speed="0.65s"
              emptyColor="gray.200"
              color="blue.500"
              size="xl"
            /&amp;gt;
          &amp;lt;/&amp;gt;
        )}
&amp;lt;/Stack&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;and operator&lt;/code&gt; will ensure that the spinner component will only get displayed if the loading state is &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621174464648%2FGxNOB0GaQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621174464648%2FGxNOB0GaQ.gif" alt="Hnet.com-image.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's now enable dark-mode in our app!&lt;/p&gt;

&lt;p&gt;Head over to the &lt;code&gt;Dashboard.js&lt;/code&gt; file and make the toggle button for dark mode functional.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useColorMode } from "@chakra-ui/react
// for the icon to change on toggle - 
// if light: show Moon Icon else show Sun Icon
import { FiMoon, FiSun } from 'react-icons/fi'

const { colorMode, toggleColorMode } = useColorMode()

// toggle button for dark/light mode
&amp;lt;IconButton
        aria-label="Toggle Dark Mode"
        icon={colorMode === 'light' ? &amp;lt;FiMoon /&amp;gt; : &amp;lt;FiSun /&amp;gt;}
        m="8"
        size="md"
        alignSelf="flex-end"
        onClick={toggleColorMode}
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now, when the user clicks on the button, &lt;code&gt;toggleColorMode&lt;/code&gt; is triggered. In turn, changes the &lt;code&gt;colorMode&lt;/code&gt; state, hence changes the icon based on light / dark, which is implemented using the ternary operator.&lt;/p&gt;

&lt;p&gt;Well, congrats on that great hustle! You have a Weather application ready at your disposal.&lt;/p&gt;

&lt;p&gt;Make sure you add it to your resume!&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks for Reading🎉
&lt;/h2&gt;

&lt;p&gt;It's great to see that you have enjoyed the article. Now let's not do the same thing. Try to add some of your own features to the app, and make it unique from the rest. Make sure you tag me on &lt;a href="https://twitter.com/BrodasGeo" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; if you have built this application. &lt;/p&gt;

&lt;p&gt;On to another blog, some other day, till then adios👋. &lt;/p&gt;

&lt;h1&gt;
  
  
  Support me🙌
&lt;/h1&gt;

&lt;p&gt;My constant source of energy is coffee! If you feel I deserve one,&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/geobrodas" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520coffee%26emoji%3D%26slug%3Dgeobrodas%26button_colour%3DFF5F5F%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>showdev</category>
      <category>tutorial</category>
      <category>react</category>
    </item>
    <item>
      <title>How to Set up VSCode terminal with WSL</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Sat, 15 May 2021 07:02:09 +0000</pubDate>
      <link>https://dev.to/geobrodas/setting-up-vscode-terminal-with-wsl-4936</link>
      <guid>https://dev.to/geobrodas/setting-up-vscode-terminal-with-wsl-4936</guid>
      <description>&lt;p&gt;Let's all agree on the fact that, the terminal is the developer's best friend, and that's what we are most proud of. Doing all those git operations on the terminal and finally pushing your code, satisfaction like nothing else! But are you still stuck with the old Microsoft Powershell terminal which takes an eternity to load up and with that boring monochrome theme to it. &lt;/p&gt;

&lt;p&gt;It's time to give your terminal a makeover.&lt;/p&gt;

&lt;p&gt;Here are the topics we'll be going through this blog, &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is WSL?&lt;/li&gt;
&lt;li&gt;Setting up WSL and Ubuntu.&lt;/li&gt;
&lt;li&gt;Connecting WSL to the VSCode terminal.&lt;/li&gt;
&lt;li&gt;Installing Zsh configuration and OhMyZsh.&lt;/li&gt;
&lt;li&gt;Setting up the theme on Zsh.&lt;/li&gt;
&lt;li&gt;Installing powerlevel10k theme. (Optional)&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;Gone are the days, where you had to first make a partition in your hard drive, in which one part would be occupied by any Linux distro like Ubuntu, and the other occupied by Windows OS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620972337441%2FAgkGOn5Yn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620972337441%2FAgkGOn5Yn.png" alt="partition.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Windows Subsystem for Linux (WSL), you can run a Linux environment directly on Windows, bringing in most of the command-line tools and utilities. Of course, you won't get all the features of the GUI. &lt;/p&gt;

&lt;p&gt;The latest version is WSL 2 and is faster than the previous version. You have full control over the version, either to downgrade or upgrade, bring all developer-friendly tools as Git and NodeJS installed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up WSL and Ubuntu
&lt;/h2&gt;

&lt;p&gt;WSL comes inbuilt with the Windows OS, it's just a matter of activation.&lt;/p&gt;

&lt;p&gt;Go to your settings and search for &lt;em&gt;Turn Windows Features On or Off&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620974860558%2FRM5vkv3DE.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620974860558%2FRM5vkv3DE.jpeg" alt="settings.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search for &lt;em&gt;Windows Subsystem for Linux&lt;/em&gt;, click the checkbox, click Ok, and restart your PC.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620974927531%2F-G5osJL8q.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620974927531%2F-G5osJL8q.jpeg" alt="onoroff.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should now be able to view the various Linux distros on Microsoft Store after this.&lt;/p&gt;

&lt;p&gt;We'll download Ubuntu since it's the most popular one and widely used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620984707477%2FWxoe7QXCw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620984707477%2FWxoe7QXCw.jpeg" alt="ubuntu.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installing you should see the ubuntu terminal on your desktop.&lt;/p&gt;

&lt;p&gt;Run it, you may have to wait for a couple of minutes, to get the WSL set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting WSL to VSCode terminal
&lt;/h2&gt;

&lt;p&gt;After this open VSCode. You will most probably get a pop-up notification saying that WSL has been detected on your PC. &lt;/p&gt;

&lt;p&gt;Now go to extensions and download the following extension,&lt;br&gt;
(you may be redirected to this page automatically also)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620985203782%2F4i8BTLcea.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620985203782%2F4i8BTLcea.jpeg" alt="remote-wsl.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After this restart VSCode one last time, and you should be able to open up a new WSL window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620985815103%2F37kwVPI8C.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1620985815103%2F37kwVPI8C.jpeg" alt="new-wsl-window.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now open up the Ubuntu terminal.&lt;br&gt;
NodeJS, Git comes with the installation so if you run &lt;code&gt;node --version&lt;/code&gt; and &lt;code&gt;git --version&lt;/code&gt; you should be able to see the resultant version.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing Zsh configuration and OhMyZsh
&lt;/h2&gt;

&lt;p&gt;Before installing zsh, let first update the existing packages. Run the command,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's install zsh shell. Run the following command,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zsh shell is somewhat like the Bash shell, but there are plenty of new features and support for various plugins and themes, which I'll talk about ahead. &lt;/p&gt;

&lt;p&gt;Now let's install OhMyZsh.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case, your ubuntu is missing &lt;code&gt;curl&lt;/code&gt;, just install it using the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Setting up the theme on Zsh.
&lt;/h2&gt;

&lt;p&gt;OhMyZsh comes in with a lot of themes, which you can set by editing the &lt;code&gt;.zshrc&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Make sure you're in the root directory and run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will open up the file in VSCode.&lt;/p&gt;

&lt;p&gt;Go over to the line of code &lt;code&gt;ZSH_THEME&lt;/code&gt; and set it to "random"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ZSH_THEME="random"

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

&lt;/div&gt;



&lt;p&gt;Now every time you open a new terminal session, a new theme will be set. If you stumble upon the one you want, you can set its name to &lt;code&gt;ZSH_THEME&lt;/code&gt; in the &lt;code&gt;.zshrc&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing powerlevel10k theme (Optional)
&lt;/h2&gt;

&lt;p&gt;Now, this is completely optional. If you're satisfied with your current OhMyZsh theme, you can stop right here else, if you want to try something much cooler, go ahead.&lt;/p&gt;

&lt;p&gt;Alright! Powerlevel10k is a theme for the &lt;code&gt;zsh&lt;/code&gt; shell. It's not all about the theme by the way. If you have noticed, I did mention "improving performance". The Microsoft Powershell is very slow, in my machine at least, takes about 15-20 seconds to load (seriously). &lt;/p&gt;

&lt;p&gt;The question is - &lt;strong&gt;Is it really fast?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;According to the &lt;code&gt;readme&lt;/code&gt; file on &lt;a href="https://github.com/romkatv/powerlevel10k#is-it-really-fast" rel="noopener noreferrer"&gt;Powerlevel10k's&lt;/a&gt; GitHub repository, the benchmark proves to give a prompt latency of 8.7 ms. &lt;/p&gt;

&lt;p&gt;To install the &lt;code&gt;powerlevel10k&lt;/code&gt; theme, simply clone the repository by running the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

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

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;powerlevel10k&lt;/code&gt; recommends installing the 'Meslo Nerd' font for a better experience. I do recommend, as many emojis come in with the theme and can't be displayed unless you have the theme.&lt;/p&gt;

&lt;p&gt;The fonts required are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf" rel="noopener noreferrer"&gt;MesloLGS NF Regular.ttf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf" rel="noopener noreferrer"&gt;MesloLGS NF Bold.ttf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf" rel="noopener noreferrer"&gt;MesloLGS NF Italic.ttf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf" rel="noopener noreferrer"&gt;MesloLGS NF Bold Italic.ttf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Double click on each file and install it. This will make the font available on your system globally.&lt;/p&gt;

&lt;p&gt;All you need to do now is, configure the font on VSCode settings.&lt;/p&gt;

&lt;p&gt;Search for &lt;strong&gt;Terminal font&lt;/strong&gt;, and set it to &lt;code&gt;MesloLGS NF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621001369386%2Fdsiq6caSU.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1621001369386%2Fdsiq6caSU.jpeg" alt="meslo.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're all set now!&lt;/p&gt;

&lt;p&gt;Go ahead and start a new terminal session, configure your settings for &lt;code&gt;powerlevel10k&lt;/code&gt; in the terminal itself, and now it's time to flex💪.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That's all for the blog, hope you have successfully customized your terminal. If you did like it, make sure you give it a ❤. Do let me know if you're falling into any errors, follow me on  &lt;a href="https://twitter.com/BrodasGeo" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; where I talk about exploring new web technologies and executing them in projects. &lt;br&gt;&lt;br&gt;
Till then adios👋&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Icon Credits to Pixel Perfect and Freepik from Flaticon&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;VSCode theme I'm using - &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=GeoBrodas.geobrodas-theme-red-doyoubleed" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=GeoBrodas.geobrodas-theme-red-doyoubleed&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Support Me 🙌
&lt;/h1&gt;

&lt;p&gt;My constant source of energy is coffee, if you feel I deserve one,&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/geobrodas" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520coffee%26emoji%3D%26slug%3Dgeobrodas%26button_colour%3DFF5F5F%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>tutorial</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>Make your very own VSCode Theme and Publish🎉!</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Fri, 09 Apr 2021 14:45:19 +0000</pubDate>
      <link>https://dev.to/geobrodas/make-your-very-own-vscode-theme-and-publish-4fj2</link>
      <guid>https://dev.to/geobrodas/make-your-very-own-vscode-theme-and-publish-4fj2</guid>
      <description>&lt;p&gt;VSCode has become the most popular Code editor and is the most ideal for Web Developers. In the Stack Overflow 2019 Developer Survey, Visual Studio Code was ranked the most popular developer environment tool, with 50.7% of 87,317 respondents reporting that they use it. The reason why VS Code is preferred is due to its customization. &lt;/p&gt;

&lt;p&gt;The IDE is highly customizable. Why is this so? VSCode is built using Github's Electron. What's so special? Electron is a web technology that enables you to build desktop apps using just plain HTML, CSS, and Javascript, with cross-platform compatibility. How cool is that! That means every component/element that you see on the VS Code editor is customizable. VSCode themes are a craze amongst developers. Themes match the person's persona, and who would not like to make one!!&lt;/p&gt;



&lt;h3&gt;
  
  
  Step 1: Setting up Yo Code-Generator
&lt;/h3&gt;

&lt;p&gt;Yeoman Code-generator will help you get started with your first VSCode theme starting files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617873376370%2FQC4IGoelP.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617873376370%2FQC4IGoelP.jpeg" alt="yocode.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;npm install -g yo generator-code&lt;/code&gt; to install the generator globally on your local device. I would recommend working on the basic Windows Powershell, as I was facing difficulties in installing it in the bash shell. &lt;/li&gt;
&lt;li&gt;Finally, run &lt;code&gt;yo code&lt;/code&gt; after you move to the directory you want to work on.&lt;/li&gt;
&lt;li&gt;You will be prompted with a few options to start with. Since we want to make a new Theme, move the arrow keys down and select &lt;strong&gt;New Color theme&lt;/strong&gt;.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Fvscode-generator-code%2Fmain%2Fyocode.png" alt="yo-code-prompt"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Start Fresh&lt;/strong&gt;.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcode.visualstudio.com%2Fassets%2Fapi%2Fextension-guides%2Fcolor-theme%2Fyocode-colortheme.png" alt="yo-code-setup-2"&gt;
&lt;/li&gt;
&lt;li&gt;Choose a Dark or Light theme as per your preference.&lt;/li&gt;
&lt;li&gt;Enter in the name of the theme and other fields (optional).&lt;/li&gt;
&lt;li&gt;Enable Git repository when prompted to. 
&amp;gt; Enabling a git repository will help you afterward if you want to publish changes in your theme extension and release different versions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Step 2: Setting up a local debugging environment
&lt;/h3&gt;

&lt;p&gt;It's time to get to the fun part!&lt;/p&gt;

&lt;p&gt;If you go to your &lt;code&gt;themes/theme_name.json&lt;/code&gt; file, you will encounter a long file with 2015 lines of code. This is your default theme for VSCode which you must have seen when you first installed VSCode. &lt;/p&gt;

&lt;p&gt;Now press F5, which will open up the debugger window, and you should get another VSCode window opened with the default theme. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;If not go to&lt;/strong&gt;: Run -&amp;gt; Add Configuration. You should get a file opened up with the name launch.json, with the suggestion popup on. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617876217192%2FKjOYGnydvp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617876217192%2FKjOYGnydvp.jpeg" alt="debug.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go down to VSCode Extension development -&amp;gt; Save the File -&amp;gt; Rerun the debugger ( F5 ).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It should work perfectly now! Now every change you make in your &lt;code&gt;theme_name.json&lt;/code&gt; file will be reflected in the debugger window.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you're wondering which theme I'm using, it's the one I made the same way. Do check it out👇 &lt;br&gt; &lt;a href="https://marketplace.visualstudio.com/items?itemName=GeoBrodas.geobrodas-theme-red-doyoubleed" rel="noopener noreferrer"&gt;Install theme&lt;/a&gt; &lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/GeoBrodas/doyoubleed" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt; in case you get stuck&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Step 3: GUI for customizing your theme
&lt;/h3&gt;

&lt;p&gt;Yeah, I know right! GUI for customizing! That will just speed up our development process 10x times.  Make a free account at &lt;a href="https://themes.vscode.one/" rel="noopener noreferrer"&gt;https://themes.vscode.one/&lt;/a&gt; . &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617887591369%2F6v30v34XI.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617887591369%2F6v30v34XI.jpeg" alt="gui.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a new theme -&amp;gt; Select Dark/Light -&amp;gt; Name your file the same you named the extension file in VSCode. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617887707621%2FGULS7ZiQd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617887707621%2FGULS7ZiQd.jpeg" alt="theme-dashboard.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see a lot of CSS values here, all you got to do is select your custom color palette. One site I would highly recommend is &lt;a href="https://colorhunt.co/" rel="noopener noreferrer"&gt;https://colorhunt.co/&lt;/a&gt; . You can select the color palette of your choice and start customizing the theme. &lt;/p&gt;

&lt;p&gt;After customizing everything, save the theme -&amp;gt; Go to &lt;strong&gt;Your Themes&lt;/strong&gt; -&amp;gt; Download. The file that gets downloaded is the &lt;code&gt;theme_name.json&lt;/code&gt; you made in the &lt;code&gt;themes/theme_name.json&lt;/code&gt; directory. Simply open the file you just downloaded, copy the content and paste it into your VSCode file.&lt;/p&gt;

&lt;p&gt;Now this GUI is still under development, so there can be a lot of bugs, some of which I have faced too, most common of them to be properties not getting saved. I have mailed the developer about the bug and he's working on it! Till then you can search for the property you want to edit in the VSCode file by clicking &lt;code&gt;Ctrl + F&lt;/code&gt; -&amp;gt; Search the property -&amp;gt; Change the hex code. The changes you make will be reflected in the VSCode debugger window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617888327015%2F-6Xc4ufnt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617888327015%2F-6Xc4ufnt.jpeg" alt="search.JPG"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Creating Personal Acess tokens and setting VSCode MarketPlace.
&lt;/h3&gt;

&lt;p&gt;We are almost there, all that's left is to make few changes in the package.json file in the root directory. But before that, you need to make an account at Microsoft Azure DevOps. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Head over to &lt;a href="https://dev.azure.com" rel="noopener noreferrer"&gt;https://dev.azure.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click here👇 and head to Personal Acess tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617888814355%2FKn1mhxD9E.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617888814355%2FKn1mhxD9E.jpeg" alt="azure.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name the token as per your choice.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;All Accessible Organization&lt;/strong&gt; in Organization.&lt;/li&gt;
&lt;li&gt;Select expiration to &lt;strong&gt;Custom Defined&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Finally, click &lt;strong&gt;Show All Scopes&lt;/strong&gt; below and look for MarketPlace.&lt;/li&gt;
&lt;li&gt;Check the option &lt;strong&gt;Manage&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Hit &lt;strong&gt;Create&lt;/strong&gt;!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Copy the personal access token you just received as you won't be able to view it hereafter.&lt;/p&gt;

&lt;p&gt;Next, go to &lt;a href="https://marketplace.visualstudio.com/" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/&lt;/a&gt; and click on &lt;strong&gt;Publish Extensions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617889296168%2FCYeqoc4Yl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617889296168%2FCYeqoc4Yl.jpeg" alt="csmarket.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Head over and fill up your details. Do remember the Publisher ID you make. We will need this in the next step.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 5: Publishing your VSCode theme
&lt;/h3&gt;

&lt;p&gt;Before that let's do a final check. Make sure the &lt;code&gt;"publisher"&lt;/code&gt; in the &lt;code&gt;package.json&lt;/code&gt; file matches your publisher ID&lt;/p&gt;

&lt;p&gt;For publishing, we will use a command-line tool by visual studio code itself called &lt;code&gt;vsce&lt;/code&gt; abbreviation for Visual Studio Code Extension. &lt;/p&gt;

&lt;p&gt;Start a terminal session :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install with &lt;code&gt;npm install -g vsce&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Now let's login to the MarketPlace account we just created with  &lt;code&gt;vsce login&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You will be prompted to enter the personal access token we created in &lt;strong&gt;Step 4&lt;/strong&gt;, enter it.
&amp;gt; Now you are logged in to your marketplace account. Hereafter, every time you start a new terminal session to publish your changes, don't forget to log in!&lt;/li&gt;
&lt;li&gt;It's time to finally publish! Enter &lt;code&gt;vsce package&lt;/code&gt; to compile the file into a &lt;code&gt;.vsix&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;vsce publish&lt;/code&gt; to launch your theme on to marketplace!🚀&lt;/li&gt;
&lt;li&gt;Check your marketplace account you created to get details on the verification process.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Entire documentation for this step is available &lt;a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Step 6: Publishing newer versions
&lt;/h3&gt;

&lt;p&gt;If you search up your theme on the VSCode extensions, you should find your theme!&lt;br&gt;
Now it's likely that the changes you made may not be perfect, and you want to publish those changes to your existing extension.&lt;/p&gt;

&lt;p&gt;All you need to do is, make the changes and enter &lt;code&gt;vsce publish &amp;lt;version change&amp;gt;&lt;/code&gt;&lt;br&gt;
Before this make sure you're git remote repository is also up to date.&lt;br&gt;
There are three types of the version you can publish :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you have made very few changes enter &lt;code&gt;vsce publish patch&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If relatively more changes then enter &lt;code&gt;vsce publish minor&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If huge developments are made then enter &lt;code&gt;vsce publish major&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Additional resources:
&lt;/h4&gt;

&lt;p&gt;Check out Gary Simon's video and Jessica Chan's video on YouTube.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/uQoYH2wLlhY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;



&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pGzssFNtWXw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That's all for now! It's good to see you have managed to complete all the steps. &lt;br&gt;&lt;br&gt;
If you did like the Blog, do give a ❤, retweet @&lt;a href="https://twitter.com/BrodasGeo" rel="noopener noreferrer"&gt;BrodasGeo&lt;/a&gt; &lt;br&gt;&lt;br&gt;
If you are facing any errors do let me know in the comments. &lt;br&gt;&lt;br&gt;
Until next time, Adios🤘&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Support 🙌
&lt;/h2&gt;

&lt;p&gt;My blogs are fueled by coffee, buy me a one if you feel I deserve one&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/geobrodas" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-red.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Credits: Icon made by FreePik from &lt;a href="https://flaticon.com" rel="noopener noreferrer"&gt;https://flaticon.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>tutorial</category>
      <category>design</category>
      <category>todayisearched</category>
    </item>
    <item>
      <title>Must-have Chrome Extensions for Web Development!</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Sun, 04 Apr 2021 07:52:43 +0000</pubDate>
      <link>https://dev.to/geobrodas/must-have-chrome-extensions-for-web-development-1jn0</link>
      <guid>https://dev.to/geobrodas/must-have-chrome-extensions-for-web-development-1jn0</guid>
      <description>&lt;p&gt;Extensions add additional functionality to the user experience by aiding the user, without causing any extra overhead. Such extensions are usually built using basic HTML, and Javascript. As a web developer, there are many instances, where you need to know a particular font family or specific color to add to your existing project, which you had seen earlier while browsing. Enough talking, let's just get straight into it: -&lt;/p&gt;

&lt;h2&gt;
  
  
  ColorZilla
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617421311521%2F_PhOaVnOr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617421311521%2F_PhOaVnOr.jpeg" alt="1.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ColorZilla is an Advanced Eyedropper, Color Picker, Gradient Generator. Click on the extension and place it on any pixel of the page, it will be able to tell you the exact hexadecimal code of the color and automatically copying it to your clipboard, to paste it in your CSS file. It was earlier on available on Firefox but came to Chrome soon enough. Another feature of ColorZilla is that it's an Ultimate Gradient generator built in just, to your chrome browser! &lt;br&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp?hl=en" rel="noopener noreferrer"&gt;Install☁&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pesticide
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617421833977%2FMGTz6farM.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617421833977%2FMGTz6farM.jpeg" alt="2.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When people ask about the best debugger for CSS, I see comments saying &lt;code&gt;border: 5px solid red&lt;/code&gt; is the best, as it will then show a grid overlay over the element. You don't need to do that when you have Pesticide. Pesticide does the same thing but without having you add any additional CSS property to your main file. Another feature of this extension is that it stays in the overlay mode on updating, so you can vary the CSS values using the trial and error method. &lt;br&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/pesticide-for-chrome-with/eipbgplchlidkojmppclhkechkhmlefi" rel="noopener noreferrer"&gt;Install☁&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grammarly for Chrome
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617422205596%2FotrLRQARL.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617422205596%2FotrLRQARL.jpeg" alt="3.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a developer, it is very much probable that you will be typing out a lot, maybe for a blog, or even the project your making for your client. Grammarly auto-corrects any incoming mistakes you are probably going to make and provides you with how the text sounds to your readers. It also shows you an overall score of how you have written. The free version pretty much comes with the basic requirements, but I guess there's no harm getting the premium version if you are a working professional blogger. &lt;br&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/grammarly-for-chrome/kbfnbcaeplbcioakkpcpgfkobkghlhen?hl=en" rel="noopener noreferrer"&gt;Install☁&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Web Vitals
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617422545188%2F9-h4a7Ymn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617422545188%2F9-h4a7Ymn.jpeg" alt="4.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your project may take time to load or maybe you want to know how fast is your site. Google SEO ranking takes many of such factors into consideration like First Contentful paint is when your HTML just starts to render elements into the DOM. Web Vitals helps to track such changes on your site, and show results upon which you can remove unnecessary code from your site, to then improve the loading time. &lt;br&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en" rel="noopener noreferrer"&gt;Install☁&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Font Finder
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617422938832%2FjC8PDV2xl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1617422938832%2FjC8PDV2xl.jpeg" alt="5.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are at times, you come across a site, and see an attractive font that you want to use in your site too. Font Finder helps you to find the exact CSS font property being used in that element and the primary font family being rendered over to the DOM. All you need to do now is search up the font family on Google Fonts or any other site. &lt;br&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/font-finder/bhiichidigehdgphoambhjbekalahgha?hl=en" rel="noopener noreferrer"&gt;Install☁&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;That's all for this blog! If you did like the blog, do give a ❤ &lt;br&gt;&lt;br&gt;
Also if there's any other extension you would like me to add, do let me know! &lt;br&gt;&lt;br&gt;
If you do Retweet this blog tag me @&lt;a href="https://twitter.com/BrodasGeo" rel="noopener noreferrer"&gt;BrodasGeo&lt;/a&gt;&lt;/p&gt;


&lt;/blockquote&gt;

&lt;p&gt;Meet you'll in another Blog, till then Adios🙌☘&lt;/p&gt;

&lt;h2&gt;
  
  
  Support me 🙌
&lt;/h2&gt;

&lt;p&gt;My blogs are fueled by coffee, buy me one if you feel I deserve one&lt;br&gt;
&lt;a href="https://www.buymeacoffee.com/geobrodas" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-red.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>todayisearched</category>
      <category>monitoring</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Secure Password Manager:  MERN stack app- Using Cryptr Encryption Package</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Thu, 04 Mar 2021 17:29:19 +0000</pubDate>
      <link>https://dev.to/geobrodas/secure-password-manager-mern-stack-app-using-cryptr-encryption-package-5874</link>
      <guid>https://dev.to/geobrodas/secure-password-manager-mern-stack-app-using-cryptr-encryption-package-5874</guid>
      <description>&lt;h3&gt;
  
  
  Introducing a Secure Password Manager🔐
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614339752154%2FT9YKzRFO4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614339752154%2FT9YKzRFO4.jpeg" alt="home.JPG"&gt;&lt;/a&gt;&lt;br&gt;
A secure Password Manager which stores passwords in the encrypted form inside the database to avoid the leak of sensitive information.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclaimer: Please don't enter in your original passwords yet and also its an open showcase app, so whatever you enter can be seen to other people with the same link. Use it to experience the different functionalities and dynamic features of the app.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Live Link: &lt;a href="https://main.d3qwkjcxzk7m67.amplifyapp.com/" rel="noopener noreferrer"&gt;https://main.d3qwkjcxzk7m67.amplifyapp.com/&lt;/a&gt; &lt;br&gt;&lt;br&gt;
Source Code: &lt;a href="https://github.com/GeoBrodas/aws-password-manager/tree/main" rel="noopener noreferrer"&gt;https://github.com/GeoBrodas/aws-password-manager/tree/main&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Features:👀
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic entry of data&lt;/li&gt;
&lt;li&gt;Fluid animations &lt;/li&gt;
&lt;li&gt;Fast loading&lt;/li&gt;
&lt;li&gt;Cross-platform support and responsiveness.&lt;/li&gt;
&lt;li&gt;Password encryption using &lt;code&gt;aes-256-gcm&lt;/code&gt; algorithm.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Tech Stack and Resources⚛️
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;React Library&lt;/li&gt;
&lt;li&gt;MongoDB Atlas &lt;/li&gt;
&lt;li&gt;NodeJs&lt;/li&gt;
&lt;li&gt;Express&lt;/li&gt;
&lt;li&gt;Cryptr NPM module for NodeJs.&lt;/li&gt;
&lt;li&gt;Axios for Api requests.&lt;/li&gt;
&lt;li&gt;Material UI&lt;/li&gt;
&lt;li&gt;Heroku for Back-end And Front-end on &lt;strong&gt;AWS-Amplify&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Inspiration💡
&lt;/h3&gt;

&lt;p&gt;I usually store my passwords in the browser itself, but one fine day it turned out that my google browser just popped out a warning saying there was a data breach in their database and that there was an urgent need to change certain passwords because they were exposed!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614331277338%2FXTF2YPlQA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614331277338%2FXTF2YPlQA.jpeg" alt="databreach.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then I just got tired of changing all the passwords and wondered....what if could make my own password manager which will be encrypted in the database with fewer chances of being exposed and of course, only I will be having access to the app, and that's when I started building a secure Password manager using React and Cryptr for encryption on the server-side. So without further ado let's get started with the development journey!&lt;/p&gt;
&lt;h3&gt;
  
  
  Stages of the App development Journey🚶🏽‍♂️
&lt;/h3&gt;

&lt;p&gt;So the first thing I divided my build procedure into 5 stages so that I could focus on each stage every day and in 5 days I would be ready with the app:-&lt;/p&gt;
&lt;h4&gt;
  
  
  Colour Inspiration🎨
&lt;/h4&gt;

&lt;p&gt;This was really cool. I took the color palette used in the Rescue Armour from the "Iron Man: Armoured Adventures" animated series.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614341735557%2FrBGV4Rw-N.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614341735557%2FrBGV4Rw-N.png" alt="#bloggg-3.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  1. Front-End side using react for dynamic rendering. 👁️&lt;br&gt;
&lt;/h4&gt;

&lt;p&gt;So for the first day, I focussed on the front-end side, basically, I wanted to create cards, and delete them on button click all to be rendered dynamically. For this, we need firstly a form with two inputs that could take in the account name and password entered by the user. And then the card component which would display the entered credentials of the user. And subsequently, each card should contain a delete button. To add the card as usual I gave onChange attributes to both the inputs and used the useState Hook to store the credentials entered. To submit the information, I then created a prop that would take in one parameter and that is the &lt;code&gt;credit&lt;/code&gt; object declared for the useState.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [credit, setCredit] = useState({
    accName: "",
    pass: "",
  });

function handleChange(event) {
    const { name, value } = event.target;

    setCredit((prevNote) =&amp;gt; {
      return {
        ...prevNote,
        [name]: value,
      };
    });
  }

  function submitCred(event) {
    props.onAdd(credit);
    setCredit({
      accName: "",
      pass: "",
    });
    event.preventDefault();
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I then passed these props to my main App.jsx file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [allCreds, setCred] = useState([]);

function addCred(newCred) {
    setCred((prevCreds) =&amp;gt; {
      return [...prevCreds, newCred];
    });
  }

 &amp;lt;InputTextArea onAdd={addCred} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would store the data in the allCreds array as objects which then can be used to render all the information into card components using the Map function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className="flexbox"&amp;gt;
        {allCreds.map((cred, index) =&amp;gt; {
          return (
            &amp;lt;Card
              key={index}
              id={index}
              name={cred.accName}
              pass={cred.pass}
              onDelete={deleteCred}
            /&amp;gt;
          );
        })}
      &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Card component would take in another prop called onDelete which will return the index of the card which was returned when the onClick event was triggered.&lt;br&gt;
&lt;code&gt;id&lt;/code&gt; is set by the index parameter via the Map function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function removeCard() {
    props.onDelete(props.id);
  }

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

&lt;/div&gt;



&lt;p&gt;In the main App.jsx file the delete function contains a filter function that will return all the card components excluding the card component whose index was passed to the delete function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function deleteCred(mid, id) {
setCred((prevCreds) =&amp;gt; {
      return prevCreds.filter((cred, index) =&amp;gt; {
        return index !== id;
      });
    });
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this, we achieve all the full front-end objectives in our React-application!&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Setting up MongoDB database and Read, Create, and delete them from the Front-End side. 🗂️&lt;br&gt;
&lt;/h4&gt;

&lt;p&gt;Firstly you need to have a MongoDB Atlas for hosting your database on the cloud. MongoDB has a free tier plan of 512 MB, which can be used to test early-stage apps. Then I connected my application with the MongoDB database. First thing I installed express, cors, and mongoose on the back-end, and on the front-end Axios to make API requests to the back-end. Cors will help to make a connection between our back-end and front-end.&lt;/p&gt;

&lt;p&gt;The schema model for every request we make to the MongoDb database will be as follows:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const CredSchema = new mongoose.Schema({
  accName: {
    type: String,
    required: true,
  },
  pass: {
    type: String,
    required: true,
  },
});

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

&lt;/div&gt;



&lt;p&gt;So after all the setup let's head towards the first task: - To submit our credentials from the front-end to the back-end. We can do this by making an Axios Post request when the user clicks the submit button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Axios.post("https://localhost:3001/insert", {
      accName: newCred.accName,
      pass: newCred.pass,
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the server-side, we have to make a post route to receive the API request from Axios and then use Mongoose to create the entry into the database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.post("/insert", async (req, res) =&amp;gt; {
  const name = req.body.accName;
  const password = req.body.pass;
  const newCred = new CredModel({
    accName: name,
    pass: password,
  });

  try {
    newCred.save();
    res.send("Inserted Data");
  } catch (err) {
    console.log(err);
  }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One job is done, 2 to go! Now we have to render all the information from the database to the front-end went the page loads. For this, we can use the useEffect hook to make an Axios Get request when the page first loads. The response that the request returns can be used to then set the state of &lt;code&gt;allCreds&lt;/code&gt; state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
    Axios.get("https://localhost:3001/read").then(
      (response) =&amp;gt; {
        setCred(response.data);
      }
    );
  }, []);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, the tricky part to delete the card when the user clicks the delete button.&lt;br&gt;
Now when the Get requests return all the data from the database, it returns a unique ID with the property name &lt;code&gt;_id&lt;/code&gt;. Let's name the &lt;code&gt;mid&lt;/code&gt; as in for MongoDB id. We can get hold of this &lt;code&gt;mid&lt;/code&gt; from the map function we created to render all the credentials from the database. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I don't want all the code to clutter and hence I'm removing some props to make you'll understand😊&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{allCreds.map((cred, index) =&amp;gt; {
          return (
            &amp;lt;Card
              key={index}
              mid={cred._id}
            /&amp;gt;
          );
        })}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prop can be passed to the delete function in our card component as a second parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function removeCard() {
    props.onDelete(props.mid, props.id);
  }

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

&lt;/div&gt;



&lt;p&gt;In our App.jsx file we pass this &lt;code&gt;mid&lt;/code&gt; prop.&lt;br&gt;
In our Axios delete request, the URL here is enclosed within back-ticks instead of "". This is a really useful feature of Javascript. Note how we are passing the &lt;code&gt;mid&lt;/code&gt; prop to the back-end by enclosing it within a &lt;code&gt;${mid}&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function deleteCred(mid, id) {
    setCred((prevCreds) =&amp;gt; {
      return prevCreds.filter((cred, index) =&amp;gt; {
        return index !== id;
      });
    });

    Axios.delete(`https://localhost:3001/delete/${mid}`); 
//use back-tickssss--importantttt!!!!
  }

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

&lt;/div&gt;



&lt;p&gt;On our server-side, we will then make a delete route and use the mongoose &lt;code&gt;findByIdAndRemove&lt;/code&gt; method to look through the database for the entry matching with the &lt;code&gt;mid&lt;/code&gt; and remove it instantly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.delete("/delete/:id", async (req, res) =&amp;gt; {
  const id = req.params.id;
  await CredModel.findByIdAndRemove(id).exec();
  res.send("deleted item: " + id);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Encryption at server-side and decryption to show password.🔐
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614335839163%2FMXBo5vohh.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614335839163%2FMXBo5vohh.jpeg" alt="cryptr.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For encryption to store our passwords in encrypted form, we can use a simple npm package called &lt;code&gt;cryptr&lt;/code&gt;. Now we can set this up by making a secret key, after which we can encrypt and decrypt strings by simply calling the &lt;code&gt;encrypt&lt;/code&gt; and &lt;code&gt;decrypt&lt;/code&gt; function provided by cryptr.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Cryptr = require("cryptr");
const cryptr = new Cryptr("yoursecretkey");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We want the passwords to be encrypted as soon as we receive the post request from Axios on the client-side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const name = req.body.accName;
const password = cryptr.encrypt(req.body.pass);
  const newCred = new CredModel({
    accName: name,
    pass: password,
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The passwords will be now encrypted in our database using the &lt;code&gt;aes-256-gcm&lt;/code&gt; algorithm. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614336572164%2FXNhv5JW89.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614336572164%2FXNhv5JW89.jpeg" alt="dbdata.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now trust me, this was the toughest part in the development, that is to display the original password to the user when the user clicks the 👁 button.&lt;br&gt;
Now what I did, is to make the user trigger the onClick event and pass it a function that takes two parameters and then passes that to the main App.jsx file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function showP() {
    props.seePassword(props.pass, props.id);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my main App.jsx file, I passed this prop as a function to the card element which is in the Map function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{allCreds.map((cred, index) =&amp;gt; {
          return (
            &amp;lt;Card
              key={index}
              id={index}
              seePassword={getPassword}
              pass={cred.pass}
             /&amp;gt;
          );
        })}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our getPassword function, we are passing the encrypted password which can be tapped with the Map function and using Axios make a post request to the server-side to send all the decrypted passwords back to the front-end side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//App.jsx file
function getPassword(password, id) {
    Axios.post("https://localhost:3001/showpassword", {
      password: password,
    }).then((response) =&amp;gt; {
      setCred(
        allCreds.map((cred, index) =&amp;gt; {
          return index === id
            ? {
                accName: response.data,
                pass: cred.pass,
              }
            : cred;
        })
      );
    });
  }

//index.js file at server-side
app.post("/showpassword", (req, res) =&amp;gt; {
  res.send(cryptr.decrypt(req.body.password));
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response which we get from the server-side containing all the passwords can be run through a map function. The map function only returns the decrypted password back which gets matched with the &lt;code&gt;id&lt;/code&gt; of the card component which the user clicked on. Using the ternary operator, we can use the setCred function from the useState to set the state of allCreds array by making the name of the credential equal to the response. &lt;/p&gt;

&lt;h4&gt;
  
  
  4. Making our code more leak-safe use environment variables.🛡️
&lt;/h4&gt;

&lt;p&gt;This is best done using an npm package called &lt;code&gt;dotenv&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614337897890%2FkdCbeO8Bm.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614337897890%2FkdCbeO8Bm.jpeg" alt="dotenv.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember the secret we stored our key. Well if you're committing your code to GitHub frequently this key will easily get exposed, if anyone refers to your code changes by referring to the commits. So make sure you store your environment variables first, add to the .gitignore file, and then commit to your remote repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//index.js file ---Server side
//require the dotenv module at the earliest in your file.
require("dotenv").config();

const cryptr = new Cryptr(process.env.SECRET);

//.env file ----Server side
SECRET=yoursecretkey
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to follow the format dotenv module specifies, that is, the constant has to be entirely capitalized with no quotes surrounding the key. &lt;/p&gt;

&lt;h4&gt;
  
  
  5. Deploying 🚀
&lt;/h4&gt;

&lt;p&gt;I deployed my server file to Heroku. It had been a while since I had used Heroku, came across a lot of errors, but somehow managed to deploy it by seeing some videos and referring to the documentation.&lt;/p&gt;

&lt;p&gt;I know I had to deploy the production build of React and not the development build. I had never deployed a React project ever but I directly went to the AWS Amplify console and it auto-generated the build settings for me, which was surprising for me because hosting platforms like Netlify don't and the developer has to mention the build settings. The process hardly took me 4 mins, and the app was up and running!🚀&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614338854149%2FsyW9scRSd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1614338854149%2FsyW9scRSd.jpeg" alt="deployed on aws.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thank you for reading till here! &lt;br&gt;&lt;br&gt;
Hope you liked this blog, if yes hit a ❤&lt;br&gt;&lt;br&gt;
Do let me know if you want the source code for the back-end part. I didn't share it for security reasons, as there are environment variables in it and the password to the MongoDB cluster.&lt;br&gt;&lt;br&gt;
Hit me up or &lt;a href="https://twitter.com/BrodasGeo" rel="noopener noreferrer"&gt;retweet&lt;/a&gt; this blog if you liked it. &lt;br&gt;&lt;br&gt;
For me building this app was a big leap because I didn't have the confidence to build a full-stack app like this.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>node</category>
      <category>react</category>
      <category>mongodb</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Spline - A design tool for 3d Web Experience</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Tue, 16 Feb 2021 17:31:22 +0000</pubDate>
      <link>https://dev.to/geobrodas/spline-a-design-tool-for-3d-web-experience-18mj</link>
      <guid>https://dev.to/geobrodas/spline-a-design-tool-for-3d-web-experience-18mj</guid>
      <description>&lt;h2&gt;
  
  
  What is Spline Tool?? 🤔
&lt;/h2&gt;

&lt;p&gt;Simple as it is, it's a design tool for 3d web development. What is actually unique about it is you can see your designs in real-time and yes, it uses three.js to render the 3d components. But most importantly you can now focus more on your design rather than your code. You can do pretty much everything from creating texts to making bunnies on your canvas. &lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
In this blog, I'll try to explain Spline's UI along with how to make your first 3d web design!&lt;/p&gt;

&lt;h3&gt;
  
  
  What we'll make? 🔧
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aipGx9fO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613112022992/QbUCJJCI1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aipGx9fO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613112022992/QbUCJJCI1.jpeg" alt="blogg.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;a href="https://my.spline.design/atomcreation1-1802a1069709a455d3400b57d730be01/"&gt;here&lt;/a&gt; to see it live!&lt;/p&gt;

&lt;p&gt;Download Spline from their &lt;a href="https://spline.design/"&gt;Home page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Spline's UI 🤯
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Home Page&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F9KYp1A8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613130842113/CsfTi5Rbp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F9KYp1A8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613130842113/CsfTi5Rbp.jpeg" alt="spline-home.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the home page, you can see your existing files out of which 4 are there for the showcase. If you want to explore more designs for your inspiration you can go to &lt;em&gt;Library&lt;/em&gt; or visit Spline's Official &lt;a href="https://twitter.com/splinetool"&gt;Twitter&lt;/a&gt; account.&lt;/p&gt;

&lt;p&gt;Click on New File to get started with your first design instantly!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6CDujasa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613131428403/DZIAvOY0U.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6CDujasa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613131428403/DZIAvOY0U.jpeg" alt="spline starting canvas.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rectangle on the screen is of not much use, anyways we are going to remove it but note that this object is now positioned at the origin of the &lt;em&gt;viewport&lt;/em&gt; with coordinates (0, 0, 0). This is our point of reference furthermore, any object we add to the &lt;em&gt;viewport&lt;/em&gt; will be with respect to the origin which is later important if you want to maintain symmetry with your design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hwoLNfX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613131755951/qh7d7Vzn2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hwoLNfX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613131755951/qh7d7Vzn2.jpeg" alt="spline starting canvas.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over here you can see all the objects you have added to the &lt;em&gt;viewport&lt;/em&gt;. Feel free to rename them by double-clicking on the object name. Soon after we'll be nesting the objects as sub-components to animate the design effectively. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TqNP9g_f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613134307486/zGkjhwvC9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TqNP9g_f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613134307486/zGkjhwvC9.jpeg" alt="spline-toolbar.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then comes the toolbar with an array of options for creating shapes of various kinds ranging from a square to a Teapot. (Trust me you can actually, do check it out!😁)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4oeJKfr2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613134542633/FR6Iz--U-.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4oeJKfr2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613134542633/FR6Iz--U-.jpeg" alt="spline-sidebar.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The right-sidebar shows the property-panel which allows you to change the various properties related to each object on the viewport. Here you can even add different hover transitions and states which we will later come back to to make our atom spin🔁.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Interacting with the Viewport&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Move the objects on the viewport using the mouse. &lt;/li&gt;
&lt;li&gt;Click on the object once to pop up the axis of the object, assuming we all know the basic coordinate geometry we have three-axis, the x-axis, y-axis, and the z-axis. By holding on to the axis bars you can move it parallel to the respective axis.&lt;/li&gt;
&lt;li&gt;To rotate the object on the viewport: Press Alt + left-click and move with the mouse.&lt;/li&gt;
&lt;li&gt;To zoom-in &amp;amp; out use the scroll-button.&lt;/li&gt;
&lt;li&gt;Use the keyboard keys to reach different parts of the viewport. &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Making the basic Structure of Atom
&lt;/h3&gt;

&lt;p&gt;Remove the white rectangle by clicking on the object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qh2lT3Ln--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613323309406/ZNcugjRLl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qh2lT3Ln--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613323309406/ZNcugjRLl.jpeg" alt="bg-color.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Set the background color by changing the property on the right side-bar.&lt;/p&gt;

&lt;p&gt;We'll be needing 4 objects for this:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One Main-Sphere and 2 spheres of radius 1/10 that of the main sphere.&lt;/li&gt;
&lt;li&gt;A circle of radius = radius of main-sphere + 20/30 pixels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H89JFS5N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613323924987/JbiurTuTR.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H89JFS5N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613323924987/JbiurTuTR.jpeg" alt="nucleus postion.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure your main nucleus is positioned at the origin( refer to the property panel on the right side-bar). This step is important to maintain symmetry. Maintain equal dimensions over all the three-axis hereafter for all the objects on the viewport.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pnM4ddue--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613324336375/IdS-TGw5m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pnM4ddue--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613324336375/IdS-TGw5m.jpeg" alt="ring-props.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Create a circle that has a radius of at least +40 pixels from the main sphere and then change the ring property of the circle to 99 (refer to the right-sidebar if you are lost).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZSv_7L64--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613359654135/oGWZBJeGu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZSv_7L64--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613359654135/oGWZBJeGu.jpeg" alt="main atom.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Use the axis-arrows to move the object in a particular axis and make sure the ring passes through the center of the sub-spheres.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z6XnjR8D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613366545954/Q4Prg-qss.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z6XnjR8D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613366545954/Q4Prg-qss.jpeg" alt="base-state-config.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Now it's time for defining the states of our design. There is base-state: The state from which you want to transition to that is -&amp;gt; State-1. Now we want the sub-spheres to rotate around the main-sphere. To achieve that, make sure our design is symmetrical, to avoid any irregularities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p287y6Wh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613366751899/QKRB9eg4C.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p287y6Wh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613366751899/QKRB9eg4C.jpeg" alt="state-1-config.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Here, in this case, I had to rotate the z-axis about 180 degrees. We can achieve this step either manually or just set the rotate property to 180 for accuracy🤘.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mJqhHKGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613370878100/MFne55Nkq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mJqhHKGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613370878100/MFne55Nkq.jpeg" alt="state-1-event-settings.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Now we have to create an event to transition from the base-state. &lt;br&gt;
To do this first - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click the + sign to create a new event.&lt;/li&gt;
&lt;li&gt;Select type - Start. (The transition will start as soon as the page loads)&lt;/li&gt;
&lt;li&gt;Select the state ie: State-1&lt;/li&gt;
&lt;li&gt;Set cycle to -No.&lt;/li&gt;
&lt;li&gt;Set Repeat to Yes- This will continuously loop the same animation.&lt;/li&gt;
&lt;li&gt;Set the transition to Linear. ( this will make the animation move at a constant speed)&lt;/li&gt;
&lt;li&gt;Set the duration to 7. (more the delay slower will be the transition)&lt;/li&gt;
&lt;li&gt;Delay to 0. ( We want it to start as soon as the page loads)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DHg50tVX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613373011047/byqzLX6Sf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DHg50tVX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613373011047/byqzLX6Sf.gif" alt="Hnet-image.gif"&gt;&lt;/a&gt;&lt;br&gt;
Finally, you can view your current project by moving to presentation mode!&lt;/p&gt;

&lt;p&gt;All that is left is to add the text using the text tool.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OcVDBkXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613373429602/Jqaab5U3E.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OcVDBkXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1613373429602/Jqaab5U3E.jpeg" alt="export.JPG"&gt;&lt;/a&gt;&lt;br&gt;
Now you can export your file as a -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public URL: Export as a public link which spline will host and then share it with your peers.&lt;/li&gt;
&lt;li&gt;Web Component: Export as an HTML file for web developers like me to add to our own upcoming project.&lt;/li&gt;
&lt;li&gt;Image/ VIdeo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tried to cover every single step you can start with your next project using Spline. There is much more stuff you can do with spline but the UI of Spline is so simple that it is very much self-explanatory.&lt;br&gt;
If I have misinterpreted any of the steps, do feel free to comment and let me know.&lt;/p&gt;

&lt;p&gt;Hats off to the Spline Team for making such a great application, moreover the UI is lag-free and works like butter even in low-end PCs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Really good to see that you have read till the end. &lt;br&gt;
If this blog has made you hooked to the screen, do give this Blog a ❤.&lt;br&gt;
Retweet on &lt;a href="https://twitter.com/BrodasGeo"&gt;Twitter&lt;/a&gt; by tagging me.&lt;br&gt;
Meet you'll in another Blog some other day, till then...Adios⭐🙌.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>design</category>
    </item>
    <item>
      <title>Drum-Kit: Entertainment App using DOM and Javascript</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Sun, 07 Feb 2021 03:50:26 +0000</pubDate>
      <link>https://dev.to/geobrodas/drum-kit-entertainment-app-using-dom-and-javascript-3n75</link>
      <guid>https://dev.to/geobrodas/drum-kit-entertainment-app-using-dom-and-javascript-3n75</guid>
      <description>&lt;p&gt;I created a Drum-Kit with 7 different sounds that play on mouse-click or when the user presses the specified keywords on the keyboard.&lt;/p&gt;

&lt;h1&gt;
  
  
  Drum-Kit
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Read ahead to know the development process of this project else click the link below to see the app running live! &lt;br&gt;&lt;br&gt;
&lt;a href="https://drumkit-vercelhack.vercel.app/"&gt;https://drumkit-vercelhack.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The Idea💡!
&lt;/h3&gt;

&lt;p&gt;Well, it was pretty simple and I wanted to experiment with my Javascript and DOM skills and in the process, I understood the power of &lt;code&gt;For-Loops&lt;/code&gt; which I will realize in the blog very soon enough.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Can You Do With It🤔?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Play 7 different sounds based on the basic drum-kit.&lt;/li&gt;
&lt;li&gt;Play this sounds either on mouse-click or key-press which is mentioned on each button.&lt;/li&gt;
&lt;li&gt;The source code is available on &lt;a href="https://github.com/GeoBrodas/drum-kit-hackvercel"&gt;GitHub&lt;/a&gt;, feel free to check it out, fork it and maybe bring a few pull requests - I'm active on GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Development Process🛠
&lt;/h3&gt;

&lt;p&gt;I was in the learning phase of React and I had known nothing other than using HTML~CSS~JS. So I went forward with it but I assure you once I'm done I'll be experimenting with Next js.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Structuring the page using HTML&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The first task as usual is to structure the page which included three sections at first- The header, The drum buttons, and the footer. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For the header, I used an H1 tag and then centered it using the &lt;code&gt;text-align: center;&lt;/code&gt; property and applied it to the body tag.&lt;/li&gt;
&lt;li&gt;Then made 7 buttons and wrapped it all in a div tag.&lt;/li&gt;
&lt;li&gt;And then the footer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Structuring was easy enough what was challenging was to write out the script for the interaction of the buttons.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Implementing Interaction to the buttons.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Interaction or basically hear for a button click....what comes to the mind first is adding event listeners for all the buttons for mouse-click.&lt;/p&gt;

&lt;p&gt;Now if you think practically, adding event listeners to each button will take a lot of code. How do we do this in a better way?&lt;/p&gt;

&lt;p&gt;For-Loops to the rescue!&lt;/p&gt;

&lt;p&gt;Open up a for-loop, initialize i=0. Now if I add the &lt;code&gt;.drum&lt;/code&gt; class to all my button elements and select all the elements using the query selector it will return an array containing all the buttons.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; document.querySelectorAll(".drum") 
NodeList(7) [button.w.drum, button.a.drum, button.s.drum, button.d.drum, button.j.drum, button.k.drum, button.l.drum]

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

&lt;/div&gt;



&lt;p&gt;Array numbering starts from zero, we can use this advantage to select all the button elements and add event listeners to them.&lt;/p&gt;

&lt;p&gt;The next job is to play the sound. For this, I made a function called &lt;code&gt;makeSound()&lt;/code&gt; which takes only one value and that is, the name of the button. Each button corresponds to a sound it should play. For this, I searched in for a few drum sounds and put them all in a separate folder. Now to get the name of the button, I stored the value of the innerHTML using a variable and passed it on to the function. For playing the sound I used a Switch case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var buttonName = this.innerHTML;
makeSound(buttonName);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;So that makes 7 cases in total each containing the name of the button respectively. &lt;/li&gt;
&lt;li&gt;If the name of the button matches with the case a variable is created which takes the audio's file location. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;variableName.play()&lt;/code&gt; - Plays the audio file and thus breaks from the loop using the &lt;code&gt;break;&lt;/code&gt; statement.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function makeSound(key) {
  switch (key) {
    case "w":
      var tom1 = new Audio('sounds/tom-1.mp3');
      tom1.play();
      break;

    case "a":
      var tom2 = new Audio("sounds/tom-2.mp3");
      tom2.play();
      break;

    case "s":
      var tom3 = new Audio("sounds/tom-3.mp3");
      tom3.play();
      break;

    case "d":
      var tom4 = new Audio("sounds/tom-4.mp3");
      tom4.play();
      break;

    case "j":
      var crash = new Audio("sounds/crash.mp3");
      crash.play();
      break;

    case "k":
      var kickBass = new Audio("sounds/kick-bass.mp3");
      kickBass.play();
      break;

    case "l":
      var snare = new Audio("sounds/snare.mp3");
      snare.play();
      break;

    default:
      console.log(this.innerHTML);
      break;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So playing the drum sound on button click is done, now let's move on to playing the drum sound when the user presses the key. For this we again use our friendly Event Listener to hear for a &lt;code&gt;keydown&lt;/code&gt; event which returns the above array when the event occurs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; KeyboardEvent {isTrusted: true, key: "c", code: "KeyC", location: 0, ctrlKey:false, .....}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We just need to grab hold of the key value for our switch case to validate to play the respective sound.&lt;/p&gt;

&lt;p&gt;Now another thing I added is to give the user feedback to make assure that he has clicked the button. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For this, I made a class in my CSS file with the name &lt;code&gt;.pressed&lt;/code&gt; and made a new function with the name &lt;code&gt;makeAnimation()&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;This function also takes in one value and that's the name of the button. For each button, it has a corresponding className attached to it. Inside this function, we create a new variable that stores the className of the pressed button and uses concatenation to add the passed button name to the query selector, and then finally add the newly created class &lt;code&gt;.pressed&lt;/code&gt; which changes the opacity when clicked using &lt;code&gt;className.classList.add("pressed")&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;After this we also need to remove this class after a short period of time and luckily we can use the &lt;code&gt;setTimeout()&lt;/code&gt; function to set a timeout of 100ms, quick enough to remove the className.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function makeAnimation(currentKey){
  var activeButton = document.querySelector("." + currentKey);
  activeButton.classList.add("pressed");

  setTimeout(function(){
    activeButton.classList.remove("pressed");
  }, 100);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this, I achieved all the main goals of my project and I'm ready to deploy to vercel which was the fun part of all.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Deployment&lt;/strong&gt;🛰
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;All I had to do was firstly make a new Vercel account.&lt;/li&gt;
&lt;li&gt;Link my GitHub account to it.&lt;/li&gt;
&lt;li&gt;Select the repository which contained all my code.&lt;/li&gt;
&lt;li&gt;Select the directory which contained my &lt;code&gt;index.html&lt;/code&gt; file in my case it was the root directory so I left it as default.&lt;/li&gt;
&lt;li&gt;And then finally deploy it!🚀&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k1zNe-Vl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1612595917918/mjzQhjBgi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k1zNe-Vl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1612595917918/mjzQhjBgi.jpeg" alt="hackres.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading till here, if there's any correction to be made let me know in the comments section, and If this article did help you make sure you give it a ❤.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What went wrong in my Hackathon Submission?!</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Sun, 17 Jan 2021 03:26:36 +0000</pubDate>
      <link>https://dev.to/geobrodas/what-went-wrong-in-my-hackathon-submission-od7</link>
      <guid>https://dev.to/geobrodas/what-went-wrong-in-my-hackathon-submission-od7</guid>
      <description>&lt;p&gt;First of all Congratulations to all the winners and runners-up of the &lt;strong&gt;Digitial Ocean X Dev Hackathon&lt;/strong&gt;, but participants no need to get demotivated, be proud of your creation just as I am!😊&lt;/p&gt;



&lt;h2&gt;
  
  
  What did I build?
&lt;/h2&gt;

&lt;p&gt;I built a personal site for the category &lt;strong&gt;Personal Site/Portfolio&lt;/strong&gt; using &lt;a href="http://tailwindcss.com"&gt;TailWind CSS&lt;/a&gt; and &lt;a href="https://michalsnik.github.io/aos/"&gt;AOS library&lt;/a&gt; for scroll animations.&lt;/p&gt;

&lt;p&gt;I then started to plan a prototype of my site using Figma on which I included sections for :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Landing &lt;/li&gt;
&lt;li&gt;About Me&lt;/li&gt;
&lt;li&gt;What services I can provide&lt;/li&gt;
&lt;li&gt;Languages and Frameworks I use&lt;/li&gt;
&lt;li&gt;And finally the social handle links.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
After giving the basic structure to my site I began customizing the page using TailWind CSS color pallete which was super easy.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
At the end what was finally left was making the site responsive. As a matter of fact TailWind CSS provides really easy pseudo classes to add responsive tag just like BootStrap but the difference is that TailWind by default uses Mobile First Breakpoint System.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
What I realised while doing this was, I used the CSS property &lt;code&gt;position: absolute;&lt;/code&gt; on most of my elements, without even adding the &lt;code&gt;position: relative;&lt;/code&gt; to its parent element! Which actually did screw up my layout because each element soon had their own independent position and yeah if you have guessed it right, adding responsiveness was hectic because the positon of each element had to be tweeked. Thats the major error I did! If you look up my code on Github I have it for all my elements in there!&lt;br&gt;
&lt;br&gt;&lt;br&gt;
With that, Yes!.. I learnt a lesson and I would pledge to write a cleaner code next time 😁 anddd I just want to share some tips to ease the process of adding responsiveness to your project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use relative units more like &lt;code&gt;rem&lt;/code&gt;, &lt;code&gt;vh&lt;/code&gt;, &lt;code&gt;em&lt;/code&gt;, &lt;code&gt;vw&lt;/code&gt;. (Do feel free to correct me if I'm wrong😸)&lt;/li&gt;
&lt;li&gt;Try giving sensible class names to the div elements so that it will be easier to add media queries at last.&lt;/li&gt;
&lt;li&gt;Yeah and dont mess up your code like how I did basically stick to the fundamentals always and understand what your code does;
like here as I said, your parent element has to be &lt;code&gt;relative&lt;/code&gt; for your child element ot be positioned inside the element with the &lt;code&gt;absolute&lt;/code&gt; property.&lt;/li&gt;
&lt;li&gt;Set a meta tag for all your pages.&lt;/li&gt;
&lt;li&gt;And yeah Try learning to use libraries like BootStrap to fasten the process!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Finally do let me know in the comments if any newbies out there found this useful and...I'll be putting up this same article on CodeNewbies.&lt;/p&gt;

&lt;p&gt;Till then Adios🖖!&lt;br&gt;
Follow me on &lt;a href="https://twitter.com/BrodasGeo"&gt;Twitter&lt;/a&gt;&lt;br&gt;
and &lt;a href="https://dev.to/geobrodas"&gt;Dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>DO Hackathon Submission: Personal Site/Portfolio</title>
      <dc:creator>Georgey</dc:creator>
      <pubDate>Sat, 09 Jan 2021 04:07:21 +0000</pubDate>
      <link>https://dev.to/geobrodas/do-hackathon-submission-personal-site-portfolio-357f</link>
      <guid>https://dev.to/geobrodas/do-hackathon-submission-personal-site-portfolio-357f</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What I built&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I built a new version of my personal site hence I named it v2.0 in the header. It had been a year since I learnt Web development and there's a lot more for me to get my hands on. This hackathon motivated me to learn a new CSS library, hence giving a upgrade to my old site.&lt;/p&gt;

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

&lt;p&gt;Personal Site/ Portfolio&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://georgey-r9zrh.ondigitalocean.app/" rel="noopener noreferrer"&gt;Click here&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdapafwlvo%2Fimage%2Fupload%2Fv1610004896%2F1_fv8q5b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdapafwlvo%2Fimage%2Fupload%2Fv1610004896%2F1_fv8q5b.jpg" alt="georgey-homepage"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdapafwlvo%2Fimage%2Fupload%2Fv1610005376%2F2-retake_j9zypy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdapafwlvo%2Fimage%2Fupload%2Fv1610005376%2F2-retake_j9zypy.jpg" alt="georgey-languagespage"&gt;&lt;/a&gt;&lt;br&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdapafwlvo%2Fimage%2Fupload%2Fv1610005126%2F3dark_sg0gxp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdapafwlvo%2Fimage%2Fupload%2Fv1610005126%2F3dark_sg0gxp.jpg" alt="georgey-darkmode-page"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;So before starting the project I had made up my mind to learn a new framework else it had to be my mentor who would teach me. So at first I was little hesitant to start. I was getting certain thoughts like would I be able to implement it properly or would it become a disaster at last but eventually it weared off and I started working on the project &lt;strong&gt;v2.0&lt;/strong&gt; of my personal site.&lt;/p&gt;

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

&lt;p&gt;Source code on &lt;a href="https://github.com/GeoBrodas/personalPortfolioSitev2" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://github.com/GeoBrodas/personalPortfolioSitev2/blob/master/LICENSE" rel="noopener noreferrer"&gt;MIT License&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;So basically I had almost completed my Web Development Bootcamp Course when I came to know about the hackathon, and so I wanted to test my skills I have learnt hence I thought this would be a good chance not only to apply my skills but to learn a new library too which would speed up my work. I was hooked up in my academics but this hackathon gave me a reason to come back to coding and revive.&lt;br&gt;
I had already created a personal site but there was very less functionality to it, less interaction, and I had hardly used BootStrap in it and therefore voila! &lt;/p&gt;

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

&lt;p&gt;First of all Thanks a lot to &lt;strong&gt;Digital Ocean&lt;/strong&gt; for giving this opportunity and a reason for me to skip my academics because I love coding and my friends think I'm weird but I don't care because there's thousands like me and I have interacted with many too.&lt;/p&gt;

&lt;p&gt;Well there are 3 new features I learnt and I added to my site and thats :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I used TailWind CSS library.&lt;/li&gt;
&lt;li&gt;I implemented a Light and Dark mode to the website which toggles according to the OS theme of the users device.&lt;/li&gt;
&lt;li&gt;I added a AOS library by &lt;a href="https://twitter.com/michalsnik" rel="noopener noreferrer"&gt;Michal Sajnóg&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind CSS Library&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/michalsnik/aos" rel="noopener noreferrer"&gt;AOS Library&lt;/a&gt;  by Michal Sajnóg.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dohackathon</category>
      <category>javascript</category>
      <category>css</category>
    </item>
  </channel>
</rss>
