<?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: Siddhesh Rajale</title>
    <description>The latest articles on DEV Community by Siddhesh Rajale (@siddheshuncodes).</description>
    <link>https://dev.to/siddheshuncodes</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%2F1204855%2F3295b736-a3d3-41e0-9349-0acb498eee94.png</url>
      <title>DEV Community: Siddhesh Rajale</title>
      <link>https://dev.to/siddheshuncodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/siddheshuncodes"/>
    <language>en</language>
    <item>
      <title>React Project</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 18:27:32 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/react-project-m2i</link>
      <guid>https://dev.to/siddheshuncodes/react-project-m2i</guid>
      <description>&lt;p&gt;We can place the author or title name over the image using the GridListTileBar Component in ReactJS. This component adds an overlay over the child component. Material UI for React has this component available for us and it is very easy to integrate. We can use the GridListTileBar component in ReactJS using the following approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating React Application And Installing Module:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Create a React application using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app foldername&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 2: After creating your project folder i.e. foldername, move to it using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd foldername&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3: After creating the ReactJS application, Install the material-ui modules using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install @material-ui/core&lt;br&gt;
npm install @material-ui/icons&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Project Structure: It will look like the following.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnout54cnupanrfs2nvqo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnout54cnupanrfs2nvqo.png" alt="Image description" width="329" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Filename-App.js: Now write down the following code in the App.js file. Here, App is our default component where we have written our code.&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 GridList from '@material-ui/core/GridList';
import GridListTile from '@material-ui/core/GridListTile';
import GridListTileBar from '@material-ui/core/GridListTileBar';
import ListSubheader from '@material-ui/core/ListSubheader';
import IconButton from '@material-ui/core/IconButton';
import InfoIcon from '@material-ui/icons/Info';

const App = () =&amp;gt; {
return (
    &amp;lt;div style={{ width: 700, margin: 'auto' }}&amp;gt;
    &amp;lt;h3&amp;gt;How to put title over image in ReactJS?&amp;lt;/h3&amp;gt;
    &amp;lt;GridList cellHeight={180} &amp;gt;
        &amp;lt;GridListTile key="Subheader" cols={2} rows={4} style={{ height: 'auto' }}&amp;gt;
        &amp;lt;ListSubheader component="div"&amp;gt;December&amp;lt;/ListSubheader&amp;gt;
        &amp;lt;/GridListTile&amp;gt;
        &amp;lt;GridListTile&amp;gt;
        &amp;lt;img
        src="https://write.geeksforgeeks.org/static/media/Group%20210.08204759.svg"/&amp;gt;
        &amp;lt;GridListTileBar
            title='Computer Science Portal'
            subtitle={&amp;lt;span&amp;gt;by: GeeksforGeeks&amp;lt;/span&amp;gt;}
            actionIcon={
            &amp;lt;IconButton aria-label={`Best Place to learn`}&amp;gt;
                &amp;lt;InfoIcon /&amp;gt;
            &amp;lt;/IconButton&amp;gt;
            }
        /&amp;gt;
        &amp;lt;/GridListTile&amp;gt;
    &amp;lt;/GridList&amp;gt;
    &amp;lt;/div&amp;gt;
);
}

export default App;

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

&lt;/div&gt;



&lt;p&gt;Step to Run Application: Run the application using the following command from the root directory of the project:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;br&gt;
Output: Now open your browser and go to &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt;, you will see the following output:&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to use Fab Component in Material UI ?</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 18:25:23 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/how-to-use-fab-component-in-material-ui--2ehd</link>
      <guid>https://dev.to/siddheshuncodes/how-to-use-fab-component-in-material-ui--2ehd</guid>
      <description>&lt;p&gt;Fab stands for Floating Action Button is which appears in front of all screen content, typically as a circular shape with an icon in its center. Material UI for React has this component available for us and it is very easy to integrate. It can be used to turn an option on or off. We can use the Fab Component in ReactJS using the following approach:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating React Application And Installing Module:&lt;/strong&gt;&lt;br&gt;
Step 1: Create a React application using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app foldername&lt;/code&gt;&lt;br&gt;
Step 2: After creating your project folder i.e. foldername, move to it using the following command:&lt;br&gt;
&lt;code&gt;cd foldername&lt;/code&gt;&lt;br&gt;
Step 3: After creating the ReactJS application, Install the material-ui modules using the following command:&lt;br&gt;
&lt;code&gt;npm install @mui/material&lt;br&gt;
npm install @mui/icons-material&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Structure: It will look like the following.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2obacqxob6pb7bsage4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2obacqxob6pb7bsage4.png" alt="Image description" width="329" height="451"&gt;&lt;/a&gt;&lt;br&gt;
Example 1: In this example, we will create a simple application that uses the Fab component to display a floating action button with an icon inside it. Please update the file App.js like below.&lt;/p&gt;

&lt;p&gt;Filename: App.js&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&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 { Fab } from '@mui/material'; 
import React from 'react'; 
import EditIcon from '@mui/icons-material/Edit'; 

const App = () =&amp;gt; { 

    return ( 
        &amp;lt;div style={{ 
            margin: 'auto', 
            display: 'block', 
            width: 'fit-content'
        }}&amp;gt; 
            &amp;lt;h3&amp;gt;How to use Fab Component in ReactJS?&amp;lt;/h3&amp;gt; 
            &amp;lt;Fab color="secondary" aria-label="edit"&amp;gt; 
                &amp;lt;EditIcon /&amp;gt; 
            &amp;lt;/Fab&amp;gt; 
        &amp;lt;/div&amp;gt; 
    ); 
} 

export default App;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step to Run Application: Run the application using the following command from the root directory of the project:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output: Now open your browser and go to &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt;, you will see the following output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feeusr90fcwg1d55a1fae.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feeusr90fcwg1d55a1fae.png" alt="Image description" width="527" height="261"&gt;&lt;/a&gt;&lt;br&gt;
Example 2: In this example, we will create a simple application that uses the Fab component to display various floating action buttons with different sizes. Please update the file App.js like below.&lt;/p&gt;

&lt;p&gt;Filename: App.js&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&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 { Fab } from '@mui/material'; 
import React from 'react'; 
import EditIcon from '@mui/icons-material/Edit'; 

const App = () =&amp;gt; { 

    return ( 
        &amp;lt;div style={{ 
            margin: 'auto', 
            display: 'block', 
            width: 'fit-content'
        }}&amp;gt; 
            &amp;lt;h3&amp;gt;How to use Fab Component in ReactJS?&amp;lt;/h3&amp;gt; 
            &amp;lt;div style={{ display: 'flex', gap: '5px' }}&amp;gt; 
                &amp;lt;Fab size='small' color="secondary"
                    aria-label="edit"&amp;gt; 
                    &amp;lt;EditIcon /&amp;gt; 
                &amp;lt;/Fab&amp;gt; 
                &amp;lt;Fab size='medium' color="secondary"
                    aria-label="edit"&amp;gt; 
                    &amp;lt;EditIcon /&amp;gt; 
                &amp;lt;/Fab&amp;gt; 
                &amp;lt;Fab color="secondary" aria-label="edit"&amp;gt; 
                    &amp;lt;EditIcon /&amp;gt; 
                &amp;lt;/Fab&amp;gt; 
            &amp;lt;/div&amp;gt; 
        &amp;lt;/div&amp;gt; 
    ); 
} 

export default App;

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

&lt;/div&gt;



&lt;p&gt;Steps to run the application:&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdtdchzk1ncfxszhx0niw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdtdchzk1ncfxszhx0niw.png" alt="Image description" width="754" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is React Developer Tool?</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 18:21:18 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/what-is-react-developer-tool-1op7</link>
      <guid>https://dev.to/siddheshuncodes/what-is-react-developer-tool-1op7</guid>
      <description>&lt;p&gt;Liquid syntax error: Tag '{% &lt;a href="https://chromewebstore.google.com/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en&lt;/a&gt;  React Developer Tools %}' was not properly terminated with regexp: /\%\}/&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Best Hosting Platforms for MERN Projects</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 18:16:53 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/best-hosting-platforms-for-mern-projects-1b0h</link>
      <guid>https://dev.to/siddheshuncodes/best-hosting-platforms-for-mern-projects-1b0h</guid>
      <description>&lt;p&gt;Embarking on the journey of launching your website into the digital arena is a moment marked by exhilaration, pride, and a hint of nervous anticipation. Whether opting for free or paid hosting, the process of unveiling your creation mirrors stepping onto a virtual stage, prepared to exhibit your work to the global audience. As the curtains rise on this significant milestone, you find yourself thrust into an exciting adventure of continuous improvement, eagerly anticipating user feedback.&lt;/p&gt;

&lt;p&gt;Now, let's explore the realm of top hosting platforms, each presenting a unique array of features and advantages.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Heroku: Streamlining MERN Stack Deployment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Meet Heroku, an intuitive cloud platform that effortlessly streamlines the deployment and hosting of MERN stack projects (MongoDB, Express, React, Node.js). Linking your project to Heroku is seamless through Git, offering a dependable and scalable environment for your Node.js back-end and React front-end. With seamless integration with MongoDB hosting services like MongoDB Atlas, Heroku simplifies the complexities of deploying your MERN project, allowing you to focus on crafting and sharing your creation.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Firebase: Google's All-Inclusive Platform&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Firebase, Google's comprehensive platform renowned for hosting static websites, extends its capabilities to deploy MERN stack projects. Leveraging Firebase Hosting for the front-end, typically built with React, and Firebase Cloud Functions for the back-end (Express.js logic), Firebase streamlines the deployment process. Offering services like authentication, real-time database, and Firestore, Firebase serves as a unified platform for hosting, serverless functions, and essential services. It emerges as a one-stop ecosystem for deploying and managing MERN projects with ease.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;DigitalOcean: Crafting Your Virtual Domain&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;DigitalOcean, a cloud infrastructure provider, introduces droplets – virtual servers tailored for deploying your MERN project. With customization options for your server environment, DigitalOcean allows you to tailor specifications, including the operating system and resources. Deploying on DigitalOcean involves creating a droplet, uploading project files, and configuring the environment. A user-friendly control panel, resource flexibility, and detailed documentation make DigitalOcean an effective choice for managing and sustaining your MERN project.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Replit: Code, Run, and Deploy in Your Browser&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Revolutionizing the deployment experience, Replit empowers you to write, run, and deploy MERN projects directly in your web browser. Serving as a coding haven within your browser, Replit supports popular MERN components like Node.js, Express, and React. It simplifies the deployment process, making it hassle-free for smaller-scale MERN projects. While allowing you to focus on coding, Replit takes care of technical aspects, deploying your project and providing a public URL for accessibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Vercel: Elevating Front-End Hosting&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Vercel emerges as a hosting platform tailored for web applications, including MERN projects. Excelling in hosting the front-end part of MERN stack applications, Vercel ensures a seamless deployment process with its integration with Git. Automatic scaling, serverless functions, and a global content delivery network optimize performance. Vercel stands out for its developer-friendly approach, providing features like continuous deployment workflows and a user-friendly dashboard.&lt;/p&gt;

&lt;p&gt;In conclusion, these hosting platforms unveil a spectrum of possibilities for deploying and managing MERN projects. From the simplicity of Heroku to the comprehensive offerings of Firebase, the customization of DigitalOcean, the browser-based convenience of Replit, to the front-end focus of Vercel – each platform adds its unique touch to the hosting adventure. So, choose your stage, deploy your creation, and let the digital spotlight shine on your masterpiece! Happy hosting!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Typing Speed Tester using React</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 18:07:29 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/typing-speed-tester-using-react-ldd</link>
      <guid>https://dev.to/siddheshuncodes/typing-speed-tester-using-react-ldd</guid>
      <description>&lt;p&gt;Get ready for an engaging coding adventure as we dive into the creation of a Typing Speed Tester! This nifty application will spice up your coding skills by challenging users to type a random paragraph as accurately and swiftly as possible within a one-minute time frame. But that's not all – we're adding a touch of magic with real-time updates on time remaining, mistake count, words per minute, and characters per minute. Let's get started on crafting this dynamic and interactive Typing Speed Tester using the power of JSX and a sleek UI design.&lt;/p&gt;

&lt;p&gt;Preview of Final Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9s112jp0qw5xuwy7qf3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9s112jp0qw5xuwy7qf3e.png" alt="Image description" width="768" height="520"&gt;&lt;/a&gt;&lt;br&gt;
Prerequisites and Technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ReactJS&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;JSX&lt;/li&gt;
&lt;li&gt;Functional Components in React&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Approach:&lt;/strong&gt;&lt;br&gt;
Utilizes ReactJS functional components and state management to create an interactive web-based Typing Speed Tester that provides a real-time typing challenge with random paragraphs. Users can type the characters of paragraph by pressing the key in the keyboard. This application tracks remaining time, calculates WPM and CPM and also count mistakes and shows to the user dynamically. This application provides an engaging typing experience, encouraging users to improve their typing speed and accuracy within a time constraint.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Steps to create the application *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Set up React project using the command&lt;br&gt;
&lt;code&gt;npx create-react-app &amp;lt;&amp;lt;name of project&amp;gt;&amp;gt;&lt;/code&gt;&lt;br&gt;
Step 2: Navigate to the project folder using&lt;br&gt;
&lt;code&gt;cd &amp;lt;&amp;lt;Name_of_project&amp;gt;&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3: Create a folder “components” and add three new files in it namely SpeedTypingGame.js and SpeedTypingGame.css and TypingArea.js.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Structure:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faafx91av79yihyzuuqsi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faafx91av79yihyzuuqsi.jpg" alt="Image description" width="287" height="557"&gt;&lt;/a&gt;&lt;br&gt;
The updated dependencies in package.json will 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;{
  "name": "typingSpeedTester",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example: Write the following code in respective files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App.js: This file imports the SpeedTypingGame components and exports it.&lt;/li&gt;
&lt;li&gt;SpeedTypingGame.js: Manages game state and logic, including paragraph generation and user input.&lt;/li&gt;
&lt;li&gt;TypingArea.js: Renders typing area and stats, tracks time, mistakes, and provides a reset button.&lt;/li&gt;
&lt;li&gt;SpeedTypingGame.css: This file contains the design of the SpeedTypingGame elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

import './App.css'; 
import SpeedTypingGame from './components/SpeedTypingGame'; 

function App() { 
  return ( 
    &amp;lt;div className="App"&amp;gt; 
      &amp;lt;SpeedTypingGame /&amp;gt; 
    &amp;lt;/div&amp;gt; 
  ); 
} 

export default App; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

import React, { useState, useEffect } from 'react'; 
import './SpeedTypingGame.css'; 
import TypingArea from './TypingArea'; // Import the TypingArea component 

const SpeedTypingGame = () =&amp;gt; { 
    const paragraphs = [ 
        "A plant is one of the most important living things that develop on the earth and is 
        made up of stems, leaves, roots, and so on.Parts of Plants: The part of the plant 
        that developed beneath the soil is referred to as root and the part that grows 
        outside of the soil is known as shoot. The shoot consists of stems, branches, l 
        eaves, fruits, and flowers. Plants are made up of six main parts: roots, stems, 
        leaves, flowers, fruits, and seeds.", 
        "The root is the part of the plant that grows in the soil. The primary root emerges 
        from the embryo. Its primary function is to provide the plant stability in the earth 
        and make other mineral salts from the earth available to the plant for various metabolic 
        processes There are three types of roots i.e. Tap Root, Adventitious Roots, and Lateral 
        Root. The roots arise from the parts of the plant and not from the rhizomes roots.", 
        "Stem is the posterior part that remains above the ground and grows negatively geotropic. 
        Internodes and nodes are found on the stem. Branch, bud, leaf, petiole, flower, and 
        inflorescence on a node are all those parts of the plant that remain above the ground 
        and undergo negative subsoil development. The trees have brown bark and the young and 
        newly developed stems are green. The roots arise from the parts of plant and not from 
        the rhizomes roots.", 
        "It is the blossom of a plant. A flower is the part of a plant that produces seeds, 
        which eventually become other flowers. They are the reproductive system of a plant. 
        Most flowers consist of 04 main parts that are sepals, petals, stamens, and carpels. 
        The female portion of the flower is the carpels. The majority of flowers are hermaphrodites, 
        meaning they have both male and female components. Others may consist of one of two parts 
        and may be male or female.", 
        "An aunt is a bassoon from the right perspective. As far as we can estimate, some posit 
        the melic myanmar to be less than kutcha. One cannot separate foods from blowzy bows. 
        The scampish closet reveals itself as a sclerous llama to those who look. A hip is the 
        skirt of a peak. Some hempy laundries are thought of simply as orchids. A gum is a 
        trumpet from the right perspective. A freebie flight is a wrench of the mind. Some 
        posit the croupy."
    ]; 

    const [typingText, setTypingText] = useState(''); 
    const [inpFieldValue, setInpFieldValue] = useState(''); 
    const maxTime = 60; 
    const [timeLeft, setTimeLeft] = useState(maxTime); 
    const [charIndex, setCharIndex] = useState(0); 
    const [mistakes, setMistakes] = useState(0); 
    const [isTyping, setIsTyping] = useState(false); 
    const [WPM, setWPM] = useState(0); 
    const [CPM, setCPM] = useState(0); 

    const loadParagraph = () =&amp;gt; { 
        const ranIndex = Math.floor(Math.random() * paragraphs.length); 
        const inputField = document.getElementsByClassName('input-field')[0]; 
        document.addEventListener("keydown", () =&amp;gt; inputField.focus()); 
        const content = Array.from(paragraphs[ranIndex]).map((letter, index) =&amp;gt; ( 
&amp;lt;span key={index} style={{ color: (letter !== ' ') ? 'black' : 'transparent' }} 
className={`char ${index === 0 ? 'active' : ''}`}&amp;gt; 
                {(letter !== ' ') ? letter : '_'} 
            &amp;lt;/span&amp;gt; 
        )); 
        setTypingText(content); 
        setInpFieldValue(''); 
        setCharIndex(0); 
        setMistakes(0); 
        setIsTyping(false); 
    }; 
    const handleKeyDown = (event) =&amp;gt; { 
        const characters = document.querySelectorAll('.char'); 
        if (event.key === 'Backspace' &amp;amp;&amp;amp; charIndex &amp;gt; 0 &amp;amp;&amp;amp; 
        charIndex &amp;lt; characters.length &amp;amp;&amp;amp; timeLeft &amp;gt; 0) { 
            if (characters[charIndex - 1].classList.contains('correct')) { 
                characters[charIndex - 1].classList.remove('correct'); 
            } 
            if (characters[charIndex - 1].classList.contains('wrong')) { 
                characters[charIndex - 1].classList.remove('wrong'); 
                setMistakes(mistakes - 1); 
            } 
            characters[charIndex].classList.remove('active'); 
            characters[charIndex - 1].classList.add('active'); 
            setCharIndex(charIndex - 1); 
            let cpm = (charIndex - mistakes - 1) * (60 / (maxTime - timeLeft)); 
            cpm = cpm &amp;lt; 0 || !cpm || cpm === Infinity ? 0 : cpm; 
            setCPM(parseInt(cpm, 10)); 
            let wpm = Math.round(((charIndex - mistakes) / 5) / (maxTime - timeLeft) * 60); 
            wpm = wpm &amp;lt; 0 || !wpm || wpm === Infinity ? 0 : wpm; 
            setWPM(wpm); 
        } 
    } 

    const initTyping = (event) =&amp;gt; { 
        const characters = document.querySelectorAll('.char'); 
        let typedChar = event.target.value; 
        if (charIndex &amp;lt; characters.length &amp;amp;&amp;amp; timeLeft &amp;gt; 0) { 
            let currentChar = characters[charIndex].innerText; 
            if (currentChar === '_') currentChar = ' '; 
            if (!isTyping) { 
                setIsTyping(true); 
            } 
            if (typedChar === currentChar) { 
                setCharIndex(charIndex + 1); 
        if (charIndex + 1 &amp;lt; characters.length) characters[charIndex + 1].classList.add('active'); 
                characters[charIndex].classList.remove('active'); 
                characters[charIndex].classList.add('correct'); 
            } else { 
                setCharIndex(charIndex + 1); 
                setMistakes(mistakes + 1); 
                characters[charIndex].classList.remove('active'); 
    if (charIndex + 1 &amp;lt; characters.length) characters[charIndex + 1].classList.add('active'); 
                characters[charIndex].classList.add('wrong'); 
            } 

            if (charIndex === characters.length - 1) setIsTyping(false); 

            let wpm = Math.round(((charIndex - mistakes) / 5) / (maxTime - timeLeft) * 60); 
            wpm = wpm &amp;lt; 0 || !wpm || wpm === Infinity ? 0 : wpm; 
            setWPM(wpm); 

            let cpm = (charIndex - mistakes) * (60 / (maxTime - timeLeft)); 
            cpm = cpm &amp;lt; 0 || !cpm || cpm === Infinity ? 0 : cpm; 
            setCPM(parseInt(cpm, 10)); 
        } else { 
            setIsTyping(false); 
        } 
    }; 

    const resetGame = () =&amp;gt; { 
        setIsTyping(false); 
        setTimeLeft(maxTime); 
        setCharIndex(0); 
        setMistakes(0); 
        setTypingText(''); 
        setCPM(0); 
        setWPM(0); 
        const characters = document.querySelectorAll('.char'); 
        characters.forEach(span =&amp;gt; { 
            span.classList.remove("correct"); 
            span.classList.remove('wrong'); 
            span.classList.remove('active'); 
        }); 
        characters[0].classList.add('active'); 
        loadParagraph(); 
    }; 

    useEffect(() =&amp;gt; { 
        loadParagraph(); 
    }, []); 

    useEffect(() =&amp;gt; { 
        let interval; 
        if (isTyping &amp;amp;&amp;amp; timeLeft &amp;gt; 0) { 
            interval = setInterval(() =&amp;gt; { 
                setTimeLeft(timeLeft - 1); 
                let cpm = (charIndex - mistakes) * (60 / (maxTime - timeLeft)); 
                cpm = cpm &amp;lt; 0 || !cpm || cpm === Infinity ? 0 : cpm; 
                setCPM(parseInt(cpm, 10)); 
                let wpm = Math.round(((charIndex - mistakes) / 5) / (maxTime - timeLeft) * 60); 
                wpm = wpm &amp;lt; 0 || !wpm || wpm === Infinity ? 0 : wpm; 
                setWPM(wpm); 
            }, 1000); 
        } else if (timeLeft === 0) { 
            clearInterval(interval); 
            setIsTyping(false); 
        } 
        return () =&amp;gt; { 
            clearInterval(interval); 
        }; 
    }, [isTyping, timeLeft]); 


    return ( 
        &amp;lt;div className="container"&amp;gt; 
            &amp;lt;input 
                type="text"
                className="input-field"
                value={inpFieldValue} 
                onChange={initTyping} 
                onKeyDown={handleKeyDown} 
            /&amp;gt; 
            {/* Render the TypingArea child component */} 
            &amp;lt;TypingArea 
                typingText={typingText} 
                inpFieldValue={inpFieldValue} 
                timeLeft={timeLeft} 
                mistakes={mistakes} 
                WPM={WPM} 
                CPM={CPM} 
                initTyping={initTyping} 
                handleKeyDown={handleKeyDown} 
                resetGame={resetGame} 
            /&amp;gt; 
        &amp;lt;/div&amp;gt; 
    ); 
}; 

export default SpeedTypingGame; 

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// TypingArea.js 
import React from 'react'; 

const TypingArea = ({ 
typingText, 
inpFieldValue, 
timeLeft, 
mistakes, 
WPM, 
CPM, 
initTyping, 
handleKeyDown, 
resetGame, 
}) =&amp;gt; { 
return ( 
    &amp;lt;div className="section"&amp;gt; 
    &amp;lt;div className="section1"&amp;gt; 
        &amp;lt;p id="paragraph"&amp;gt;{typingText}&amp;lt;/p&amp;gt; 
    &amp;lt;/div&amp;gt; 
    &amp;lt;div className="section2"&amp;gt; 
        &amp;lt;ul className="resultDetails"&amp;gt; 
        &amp;lt;li className="time"&amp;gt; 
            &amp;lt;p&amp;gt;Time Left:&amp;lt;/p&amp;gt; 
            &amp;lt;span&amp;gt; 
            &amp;lt;b&amp;gt;{timeLeft}&amp;lt;/b&amp;gt;s 
            &amp;lt;/span&amp;gt; 
        &amp;lt;/li&amp;gt; 
        &amp;lt;li className="mistake"&amp;gt; 
            &amp;lt;p&amp;gt;Mistakes:&amp;lt;/p&amp;gt; 
            &amp;lt;span&amp;gt;{mistakes}&amp;lt;/span&amp;gt; 
        &amp;lt;/li&amp;gt; 
        &amp;lt;li className="wpm"&amp;gt; 
            &amp;lt;p&amp;gt;WPM:&amp;lt;/p&amp;gt; 
            &amp;lt;span&amp;gt;{WPM}&amp;lt;/span&amp;gt; 
        &amp;lt;/li&amp;gt; 
        &amp;lt;li className="cpm"&amp;gt; 
            &amp;lt;p&amp;gt;CPM:&amp;lt;/p&amp;gt; 
            &amp;lt;span&amp;gt;{CPM}&amp;lt;/span&amp;gt; 
        &amp;lt;/li&amp;gt; 
        &amp;lt;/ul&amp;gt; 
        &amp;lt;button onClick={resetGame} className="btn"&amp;gt; 
        Try Again 
        &amp;lt;/button&amp;gt; 
    &amp;lt;/div&amp;gt; 
    &amp;lt;/div&amp;gt; 
); 
}; 

export default TypingArea; 

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* SpeedTypingGame.css */

body{ 
padding: 0; 
margin: 0; 
box-sizing: border-box; 
min-height: 100vh; 
display: flex; 
justify-content: center; 
align-items: center; 
font-family: 'Noto Sans Mono', monospace; 
background-color: #e7e9e9; 
} 

.container { 
max-width: 650px; 
margin: 5px; 
width: calc(100% - 10px); 
padding: 30px; 
border-radius: 10px; 
box-sizing: border-box; 
border: 1px solid #ced4da; 
background: #fff; 
box-shadow: 0 0 6px rgba(0,0,0,0.25); 
} 

input.input-field{ 
opacity: 0; 
z-index: -999; 
position: absolute; 
} 

#paragraph{ 
word-break: break-all; 
text-align: left; 
} 
.section{ 
border: 1px solid #ced4da; 
border-radius: 5px; 
padding: 20px; 
padding-top: 0; 
} 
.section1{ 
border-bottom: 1px solid #ced4da; 
} 
span{ 
font-size: 20px; 
user-select: none; 
cursor: tex; 
} 
span.wrong{ 
color: darkred; 
background-color: pink; 
} 

span.correct{ 
color: #0e630e; 
background: #e7fbd3; 
} 

span.active{ 
border-bottom: 3px solid #0a6bf9; 
} 

.section2{ 
display: flex; 
justify-content: space-between; 
align-items: center; 
margin-top: 5px; 
} 
.section2 ul{ 
padding-inline-start: 0px; 
display: flex; 
justify-content: space-between; 
align-items: center; 
margin: 0px; 
width: calc(100% - 120px); 
} 

.section2 ul li{ 
list-style-type: none; 
margin: 0 10px; 
} 

.section2 ul li p{ 
margin: 5px; 
font-size: 12px; 
} 

.section2 ul li span{ 
font-size: 18px; 
} 

button.btn { 
padding: 10px 20px; 
outline: none; 
border: 1px solid #ced4da; 
margin: 5px; 
border-radius: 4px; 
cursor: pointer; 
background: #1d9bf0; 
color: #fff; 
font-size: 16px; 
transition: all 0.5s; 
} 

button.btn:hover{ 
background-color: #1879ba; 
} 

@media screen and (max-width : 550px){ 
.section2{ 
    flex-direction: column; 
} 

.section2 ul{ 
    width: 100%; 
    justify-content: space-between; 
} 

button.btn{ 
    width: 100%; 
    margin-top: 10px; 
} 
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Steps to run the application:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Type the following command in terminal&lt;br&gt;
&lt;code&gt;npm start&lt;/code&gt;&lt;br&gt;
Step 2: Open web-browser and type the following URL&lt;br&gt;
&lt;code&gt;http://localhost:3000/&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unlocking Infrastructure Magic with Terraform</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 17:57:10 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/unlocking-infrastructure-magic-with-terraform-20gb</link>
      <guid>https://dev.to/siddheshuncodes/unlocking-infrastructure-magic-with-terraform-20gb</guid>
      <description>&lt;p&gt;Welcome to the world of Terraform, your key to unlocking the magic of infrastructure automation. Imagine a wizard's wand that turns your infrastructure dreams into reality with just a few commands. In this guide, we'll take a stroll through the wonders of Terraform, making the complex world of infrastructure management as simple as waving a wand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's Terraform Anyway?&lt;/strong&gt;&lt;br&gt;
Terraform is like your superhero for infrastructure – it helps you automate and manage resources effortlessly. Forget complicated setups; Terraform uses a language that's as easy as chatting with a friend. Just tell it what you want, and watch the magic happen!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meet HashiCorp Terraform: Your Cloud Conductor&lt;/strong&gt;&lt;br&gt;
Picture Terraform as your backstage pass to the cloud. It's an open-source tool that makes cloud infrastructure a breeze. With Terraform, you can script your infrastructure using plain language, making it readable, shareable, and versionable. Say goodbye to complex setups – Terraform is here to simplify your cloud adventures!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure as a Code: The Cool Kid on the Block&lt;/strong&gt;&lt;br&gt;
Ever heard of Infrastructure as Code (IaC)? It's like telling your computer what to do using simple code, rather than wrestling with complicated settings. Think of it as the autopilot for your tech world – set it up once, and let it do the heavy lifting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terraform's Playgrounds: What Can You Do?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Terraform is your all-in-one toolkit for cloud adventures. Need to create cloud resources like storage, networks, or applications? Terraform's got your back. It's like having a superhero sidekick that can handle everything, from managing multiple clouds to collaborating with your tech team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terraform Providers: The Secret Sauce&lt;/strong&gt;&lt;br&gt;
Ever wondered how Terraform talks to different clouds and services? Enter Terraform Providers – the behind-the-scenes magic that lets Terraform communicate with various platforms. It's like having a multilingual guide for your cloud journey.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Terraform Works Its Magic&lt;/strong&gt;&lt;br&gt;
Imagine Terraform as your personal genie for creating and managing infrastructure. You describe what you want, and Terraform goes, "Your wish is my command!" It's a simple yet powerful tool that works across different clouds, making your tech life a whole lot easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Choose Terraform? Because It's Your Tech Bestie!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Terraform is like that trusty friend who can adapt to any situation. Whether you're in the cloud, dealing with data centers, or navigating hybrid environments, Terraform is your go-to companion. It's not just a tool; it's your tech bestie that simplifies and streamlines your infrastructure adventures.&lt;/p&gt;

&lt;p&gt;In a nutshell, Terraform is your ticket to a hassle-free, automated infrastructure journey. No more tech headaches – just sit back, relax, and let Terraform do the heavy lifting. Happy coding and may your infrastructure dreams come true!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create a Random Joke using React app through API</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 17:51:07 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/create-a-random-joke-using-react-app-through-api-2c82</link>
      <guid>https://dev.to/siddheshuncodes/create-a-random-joke-using-react-app-through-api-2c82</guid>
      <description>&lt;p&gt;In this guide, we'll embark on a journey to build an interactive website that dynamically fetches and displays jokes from an external API using the power of React. With React as our primary framework, we'll create a seamless user experience where each page reload and button click unveils a fresh, humor-filled joke without the need to refresh the entire page.&lt;/p&gt;

&lt;p&gt;Prerequisite: The pre-requisites for this project are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Function Components&lt;/li&gt;
&lt;li&gt;ReactJS AJAX and API&lt;/li&gt;
&lt;li&gt;useState
&lt;strong&gt;Approach: Decoding the Joke-Generating Component&lt;/strong&gt;
In our architecture, the "Joke" file takes center stage as a functional component. Within this component, a crucial state variable, "Joke," is initialized to an empty string. The magic unfolds as the output dynamically adjusts based on the state of this variable. The essence lies in the seamless rendering of the joke content, driven by the underlying state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adding to the intricacy, this component smartly incorporates the "Button" component. Here, the "Button" is not just any button; it's a functional component meticulously imported for its role in triggering the joke generation process. Clicking this button sets the gears in motion, unveiling a fresh joke.&lt;/p&gt;

&lt;p&gt;Diving deeper, the "Button" component is a compact yet powerful functional component, exclusively designed to render a button element. Adding a layer of sophistication, we pass along some props to this "Button" companion. The prop in question is a method named "callAPI," a linchpin in fetching jokes from the API whenever the code executes the fetching sequence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to create the application:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Initialize the project from terminal using the command.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app jokegenerator&lt;/code&gt;&lt;br&gt;
Step 2: Navigate to the project folder using the command.&lt;br&gt;
&lt;code&gt;cd jokegenerator&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3: Create a folder called components and add two files in it Button.js and Joke.js&lt;br&gt;
Example: Write the following code in respective files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App.js: This file imports the components to render it on the web page&lt;/li&gt;
&lt;li&gt;Joke.js: This file contains the joke to be displayed and makes the API call&lt;/li&gt;
&lt;li&gt;Joke.css: This file contains the styling of all the elements &lt;/li&gt;
&lt;li&gt;Button.js: This file contains the button component which generates the joke on click&lt;/li&gt;
&lt;li&gt;Button.css: This file contains the styling of button element&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Javascript&lt;br&gt;
&lt;/p&gt;

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

import Joke from "./components/Joke";

function App() {
    return (
        &amp;lt;div className="App"&amp;gt;
            &amp;lt;h1&amp;gt;Joke Generator Using React and Joke API&amp;lt;/h1&amp;gt;
            &amp;lt;Joke/&amp;gt;
        &amp;lt;/div&amp;gt;
    );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





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

import React from "react";

import Button from "./Button";
import './Joke.css';

const Joke = () =&amp;gt; {
    const [Joke, setJoke] = React.useState("");

    const fetchApi = () =&amp;gt; {
        fetch("https://sv443.net/jokeapi/v2/joke/Programming?type=single")
            .then((res) =&amp;gt; res.json())
            .then((data) =&amp;gt; setJoke(data.joke));
    };

    return (
        &amp;lt;div className="joke"&amp;gt;
            &amp;lt;Button callApi={fetchApi} /&amp;gt; 
            &amp;lt;p&amp;gt;{Joke}&amp;lt;/p&amp;gt;    
        &amp;lt;/div&amp;gt;
    );
}

export default Joke;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
/* Joke.css */

body {
    background-color: rgb(47, 97, 80);
}

.joke {
    width: auto;
    height: auto;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: beige;
}

h1 {
    text-align: center;
    color: beige;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

import React from "react";
import './Button.css'

const Button = (props) =&amp;gt; {
    return &amp;lt;button onClick={props.callApi}&amp;gt;
        Click to generate a joke.
    &amp;lt;/button&amp;gt;;
}

// Export Button Component
export default Button;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Button.css */

button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #70a03a;
    color: #ffffff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color .5s;
}

button:hover {
    background-color: #c1f590;
}

button:active {
    background-color: #297910;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Steps to run the application:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Type the following command in terminal of your project directory&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;br&gt;
Step 2: Type the following URL in your web browser.&lt;br&gt;
&lt;code&gt;http://localhost:3000/&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Demystifying Docker: Simplifying Application Deployment</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 17:41:37 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/demystifying-docker-simplifying-application-deployment-3219</link>
      <guid>https://dev.to/siddheshuncodes/demystifying-docker-simplifying-application-deployment-3219</guid>
      <description>&lt;p&gt;In the realm of modern software development, Docker has emerged as a game-changer. This open-source platform enables developers to containerize their applications, providing a standardized and executable component known as the Dockerfile. This file encapsulates the OS libraries and dependencies required to run the application, ensuring a consistent environment across different systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk25bj903gvd98t1j0ofy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk25bj903gvd98t1j0ofy.png" alt="Image description" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Docker?&lt;/strong&gt;(Understanding Docker: A Developer's Companion)&lt;br&gt;
Docker, at its core, is a platform that empowers developers to encapsulate their applications within containers. While containers were not a new concept, Docker played a pivotal role in popularizing them. The heart of Docker lies in two key components: the Docker Engine and Docker Hub. The former executes on your local system to run your application, while the latter acts as a cloud service, facilitating the sharing of Docker images globally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Dockerfile?&lt;/strong&gt;(Blueprint for Containerization)&lt;/p&gt;

&lt;p&gt;At the heart of Docker lies the Dockerfile, a file written in a Domain Specific Language (DSL) that contains instructions for crafting a Docker image. Think of it as the source code of your image. This file meticulously outlines the processes necessary to swiftly generate an image. When developing your application, creating a Dockerfile is a best practice, as the Docker daemon meticulously executes instructions from top to bottom.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Dockerfile is the source code of the image&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Docker Image?&lt;/strong&gt;(Portable Software Package)&lt;/p&gt;

&lt;p&gt;A Docker image is a sophisticated artifact composed of several layers, serving as a lightweight and self-sufficient executable package. It encapsulates all components essential for running a piece of software, encompassing the code, runtime, libraries, environment variables, and configuration files. Essentially, a Docker image ensures consistency and portability, making it an ideal choice for seamless software deployment.&lt;br&gt;
&lt;strong&gt;Docker Editions: Choosing the Right Fit&lt;/strong&gt;&lt;br&gt;
Docker offers two editions - Enterprise Edition (EE) and Community Edition (CE). Tailored for different needs, EE caters to businesses and IT teams handling mission-critical production applications. On the other hand, CE suits smaller teams exploring Docker's capabilities. Understanding your project's scale and requirements will guide you in selecting the most suitable Docker edition.&lt;/p&gt;

&lt;p&gt;In essence, Docker revolutionizes how developers design, distribute, launch, run, upgrade, and manage containers. It brings a level of standardization and efficiency to the software development lifecycle, making it a go-to tool for modern application deployment. So, whether you're orchestrating complex enterprise applications or just getting started with containerization, Docker has something to offer for everyone in the vast landscape of software development. Happy coding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Set Up a Private NPM Registry</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 17:34:12 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/how-to-set-up-a-private-npm-registry-1fa9</link>
      <guid>https://dev.to/siddheshuncodes/how-to-set-up-a-private-npm-registry-1fa9</guid>
      <description>&lt;p&gt;&lt;strong&gt;1. Description&lt;/strong&gt;&lt;br&gt;
Managing and sharing your Node.js packages privately becomes a breeze when you have your own NPM registry. This guide will walk you through the step-by-step process of setting up your private NPM registry, empowering you to maintain control over your packages while ensuring security and convenience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Prerequisites:&lt;/strong&gt;&lt;br&gt;
Before diving into the setup, make sure you have the following prerequisites:&lt;br&gt;
Node.js installed on your machine.&lt;br&gt;
Access to a version control system (e.g., Git).&lt;br&gt;
Basic understanding of the command line.&lt;br&gt;
&lt;strong&gt;3. Describe the Content:&lt;/strong&gt;&lt;br&gt;
In this guide, we'll cover:&lt;/p&gt;

&lt;p&gt;Setting Up a Basic NPM Registry:&lt;br&gt;
How to initialize and configure your private NPM registry using the 'verdaccio' registry.&lt;/p&gt;

&lt;p&gt;Authentication and Authorization:&lt;br&gt;
Securing your registry by implementing authentication and authorization mechanisms.&lt;/p&gt;

&lt;p&gt;Integration with Version Control:&lt;br&gt;
Connecting your private registry with a version control system (e.g., Git) for seamless package management.&lt;br&gt;
&lt;strong&gt;4. Features:&lt;/strong&gt;&lt;br&gt;
User Management:&lt;br&gt;
Create and manage user accounts for secure access to your private registry.&lt;/p&gt;

&lt;p&gt;Package Publishing:&lt;br&gt;
Learn how to publish your Node.js packages to the private registry effortlessly.&lt;/p&gt;

&lt;p&gt;Scoped Packages:&lt;br&gt;
Implement scoped packages to organize and categorize your packages effectively.&lt;br&gt;
&lt;strong&gt;5. Examples with Output:&lt;/strong&gt;&lt;br&gt;
Setting Up a Basic NPM Registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Install verdaccio globally
npm install -g verdaccio

# Initialize verdaccio
verdaccio

# Your private registry is now running at http://localhost:4873/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Authentication and Authorization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Install 'htpasswd' module for user management
npm install -g htpasswd

# Add a new user to the registry
htpasswd -b ./htpasswd &amp;lt;username&amp;gt; &amp;lt;password&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Package Publishing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Navigate to your project directory
cd your-project-directory

# Login to your private registry
npm login --registry=http://localhost:4873/

# Publish your package
npm publish --registry=http://localhost:4873/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6. Reference:&lt;/strong&gt;&lt;br&gt;
For further exploration and advanced configurations, refer to the official documentation:&lt;/p&gt;

&lt;p&gt;Verdaccio Documentation&lt;br&gt;
NPM CLI Docs - Publish&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
By following this guide, you've successfully set up your private NPM registry, enhancing your control and security over Node.js packages. Experiment with user management, package publishing, and other features to streamline your package management workflow. Your private registry is now ready to cater to your specific needs, offering a robust and secure environment for your Node.js projects. Happy coding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How To Make A Truth Or Dare Bot Discord</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 16:47:18 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/how-to-make-a-truth-or-dare-bot-discord-4lme</link>
      <guid>https://dev.to/siddheshuncodes/how-to-make-a-truth-or-dare-bot-discord-4lme</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Embark on a thrilling journey into the realm of Discord bots! If you've ever yearned to inject a dose of excitement into your server through a lively game of Truth or Dare, you're in for a delightful experience. Crafting your own Truth or Dare bot for Discord not only promises amusement but also introduces an engaging interactive facet to your server. In this comprehensive guide, we'll lead you through the step-by-step process of creating your very own Truth or Dare bot.&lt;/p&gt;

&lt;p&gt;Main Body:&lt;br&gt;
Step 1: Set Up Your Discord Bot&lt;/p&gt;

&lt;p&gt;Create a Discord Developer Account:&lt;/p&gt;

&lt;p&gt;Navigate to the Discord Developer Portal and initiate the creation of a new application.&lt;br&gt;
In the "Bot" tab, click on "Add Bot," and confirm your decision.&lt;br&gt;
Go to the "Bot" tab, click "Add Bot," and confirm.&lt;/p&gt;

&lt;p&gt;Invite the Bot to Your Server:&lt;/p&gt;

&lt;p&gt;Copy the bot token from the "Bot" tab.&lt;/p&gt;

&lt;p&gt;Copy the bot token from the "Bot" tab.&lt;br&gt;
Employ the following link to invite the bot to your server, replacing  with your specific client ID: Invite Link Template&lt;/p&gt;

&lt;p&gt;Step 2: Install Necessary Dependencies&lt;br&gt;
Use a Discord Library:&lt;/p&gt;

&lt;p&gt;Choose a Discord library suitable for your programming language (e.g., Discord.js for JavaScript).&lt;br&gt;
Follow the library's documentation meticulously to set up your project.&lt;/p&gt;

&lt;p&gt;Step 3: Write the Truth or Dare Logic&lt;/p&gt;

&lt;p&gt;Develop Commands:&lt;/p&gt;

&lt;p&gt;Create dedicated commands for "truth" and "dare."&lt;br&gt;
Implement astute logic to randomly select questions or dares from pre-established lists.&lt;/p&gt;

&lt;p&gt;Step 4: Deploy Your Bot&lt;/p&gt;

&lt;p&gt;Select a Hosting Service:&lt;/p&gt;

&lt;p&gt;Choose a reliable hosting service such as Heroku or Repl.it for deploying your bot.&lt;br&gt;
Adhere to the hosting service's guidelines to successfully deploy your bot.&lt;/p&gt;

&lt;p&gt;Step 5: Test Your Bot&lt;/p&gt;

&lt;p&gt;Join Your Server:&lt;/p&gt;

&lt;p&gt;Confirm that your bot is successfully integrated into your Discord server.&lt;br&gt;
Utilize the designated commands to verify the bot's responsiveness with randomly generated truths or dares.&lt;br&gt;
Enhancements:&lt;/p&gt;

&lt;p&gt;Code Snippet - Command Handling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Discord.js Command Handling
const Discord = require('discord.js');
const client = new Discord.Client();

client.on('message', (message) =&amp;gt; {
  if (message.content.startsWith('!truth')) {
    // Logic for handling truth command
    // ...
  } else if (message.content.startsWith('!dare')) {
    // Logic for handling dare command
    // ...
  }
});

client.login('YOUR_BOT_TOKEN');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code snippet showcases basic command handling using Discord.js. Adjust the logic inside the commands to suit your Truth or Dare functionality.&lt;/p&gt;

&lt;p&gt;Relevant Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const truths = [
  "If you could time travel, where would you go?",
  "What's your weirdest habit?",
  // Add more personalized truths
];

const dares = [
  "Do your best dance right now.",
  "Speak in an accent for the next 3 minutes.",
  // Add more personalized dares
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Customize your Truth and Dare arrays with unique and entertaining prompts that suit your server's vibe.&lt;/p&gt;

&lt;p&gt;Example 2: Embedding Responses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Post Title
How To Make A Truth Or Dare Bot Discord


Normal


















Introduction:
Embark on a thrilling journey into the realm of Discord bots! If you've ever yearned to inject a dose of excitement into your server through a lively game of Truth or Dare, you're in for a delightful experience. Crafting your own Truth or Dare bot for Discord not only promises amusement but also introduces an engaging interactive facet to your server. In this comprehensive guide, we'll lead you through the step-by-step process of creating your very own Truth or Dare bot.

Main Body:
Step 1: Set Up Your Discord Bot



Create a Discord Developer Account:

Navigate to the Discord Developer Portal and initiate the creation of a new application.
In the "Bot" tab, click on "Add Bot," and confirm your decision.
Go to the "Bot" tab, click "Add Bot," and confirm.




Invite the Bot to Your Server:




Copy the bot token from the "Bot" tab.

Copy the bot token from the "Bot" tab.
Employ the following link to invite the bot to your server, replacing &amp;lt;YOUR_CLIENT_ID&amp;gt; with your specific client ID: Invite Link Template



Step 2: Install Necessary Dependencies
Use a Discord Library:

Choose a Discord library suitable for your programming language (e.g., Discord.js for JavaScript).
Follow the library's documentation meticulously to set up your project.



Step 3: Write the Truth or Dare Logic

Develop Commands:

Create dedicated commands for "truth" and "dare."
Implement astute logic to randomly select questions or dares from pre-established lists.



Step 4: Deploy Your Bot

Select a Hosting Service:

Choose a reliable hosting service such as Heroku or Repl.it for deploying your bot.
Adhere to the hosting service's guidelines to successfully deploy your bot.



Step 5: Test Your Bot

Join Your Server:

Confirm that your bot is successfully integrated into your Discord server.
Utilize the designated commands to verify the bot's responsiveness with randomly generated truths or dares.
Enhancements:

Code Snippet - Command Handling:

// Discord.js Command Handling
const Discord = require('discord.js');
const client = new Discord.Client();

client.on('message', (message) =&amp;gt; {
  if (message.content.startsWith('!truth')) {
    // Logic for handling truth command
    // ...
  } else if (message.content.startsWith('!dare')) {
    // Logic for handling dare command
    // ...
  }
});

client.login('YOUR_BOT_TOKEN');
This code snippet showcases basic command handling using Discord.js. Adjust the logic inside the commands to suit your Truth or Dare functionality.

Relevant Examples:

const truths = [
  "If you could time travel, where would you go?",
  "What's your weirdest habit?",
  // Add more personalized truths
];

const dares = [
  "Do your best dance right now.",
  "Speak in an accent for the next 3 minutes.",
  // Add more personalized dares
];
Customize your Truth and Dare arrays with unique and entertaining prompts that suit your server's vibe.

Example 2: Embedding Responses:

// Discord.js Embed Example
const embed = new Discord.MessageEmbed()
  .setTitle('Truth or Dare')
  .setColor('#0099ff')
  .setDescription(`**Truth:** ${randomTruth}\n**Dare:** ${randomDare}`)
  .setTimestamp();

message.channel.send(embed);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enhance the visual appeal by using Discord.js embeds to display Truth or Dare responses.&lt;br&gt;
Examples of Interesting Truths and Dares:&lt;br&gt;
Truths:&lt;br&gt;
Question the Inner Explorer:&lt;/p&gt;

&lt;p&gt;"If you could swap lives with any fictional character for a day, who would it be and why?"&lt;br&gt;
Guilty Pleasures Revealed:&lt;br&gt;
"Share a song you secretly enjoy but would never admit to in public."&lt;br&gt;
Time-Traveling Confession:&lt;br&gt;
"If you could give your younger self advice, what would it be?"&lt;br&gt;
Dares:&lt;/p&gt;

&lt;p&gt;Dance Like Nobody's Watching:&lt;br&gt;
Record a short video of yourself doing an impromptu dance and share it in the chat.&lt;br&gt;
Accent Challenge:&lt;br&gt;
 Speak in a different accent of your choice for the next three messages.&lt;br&gt;
Meme Generator:&lt;br&gt;
Create a funny meme related to the last thing you ate and share it with the group&lt;/p&gt;

&lt;p&gt;Code Snippet - Custom Truth Command Logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const truths = [
  "If you could time travel, where would you go?",
  "What's the weirdest dream you've ever had?",
  "Share a goal you've never told anyone about.",
  // Add more personalized truths
];

// Custom truth command logic
if (message.content.startsWith('!truth')) {
  const randomTruth = truths[Math.floor(Math.random() * truths.length)];
  message.channel.send(`Truth: ${randomTruth}`);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Code Snippet - Custom Dare Command Logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const dares = [
  "Do your best impression of a famous celebrity.",
  "Send the last meme in your gallery to the group.",
  "Speak in rhyme for the next five minutes.",
  // Add more personalized dares
];

// Custom dare command logic
if (message.content.startsWith('!dare')) {
  const randomDare = dares[Math.floor(Math.random() * dares.length)];
  message.channel.send(`Dare: ${randomDare}`);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conclusion: Unleash the Fun!&lt;br&gt;
Congratulations, you've now unlocked the potential for endless laughter and enjoyment on your Discord server with your very own Truth or Dare bot! As your community engages in the unpredictable world of truths and dares, the bonds within your server are bound to strengthen.&lt;/p&gt;

&lt;p&gt;Remember, the he&lt;/p&gt;

&lt;p&gt;art of any thriving Discord server lies in the unique experiences it offers. Your Truth or Dare bot adds a touch of spontaneity, turning mundane moments into memorable ones. Whether your members are confessing their weirdest habits or busting out unexpected dance moves, the possibilities are as diverse as your community.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create a Form using ReactJS</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Thu, 29 Feb 2024 16:37:51 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/create-a-form-using-reactjs-4l0b</link>
      <guid>https://dev.to/siddheshuncodes/create-a-form-using-reactjs-4l0b</guid>
      <description>&lt;p&gt;In this tutorial, we'll explore the process of creating a form using React.js. The form will be constructed using JSX elements, and we'll utilize a functional component to render these elements. Various HTML elements will be generated within the project. To implement the project, we'll apply styling using CSS.&lt;/p&gt;

&lt;p&gt;Now, let's take a glimpse of the envisioned final project:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapmirqxdgljfaw33syj8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapmirqxdgljfaw33syj8.png" alt="Image description" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Prerequisites: The pre-requisites for this project are:&lt;/p&gt;

&lt;p&gt;HTML and CSS&lt;br&gt;
Beginner-level knowledge of React.js&lt;br&gt;
Functional Components&lt;br&gt;
JavaScript ES6&lt;br&gt;
Steps to Create React Application:&lt;/p&gt;

&lt;p&gt;Step 1: Create a React application 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;npx create-react-app react-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: After creating your project folder i.e. react-app, move to 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;cd react-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Project Structure: It will look like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbsz9jdjo59vi6m8iot9n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbsz9jdjo59vi6m8iot9n.png" alt="Image description" width="219" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steps to Run Application:&lt;/p&gt;

&lt;p&gt;Step 1: Run the application using the following command from the root directory of the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Type the following link in your browser&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3000/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example: Write the following code in the respective files&lt;/p&gt;

&lt;p&gt;App.js: This file contains the form element along with its structure&lt;br&gt;
App.css: This file contains the styling of the application&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "./App.css"; 

function App() { 
    return ( 
        &amp;lt;div className="App"&amp;gt; 
            &amp;lt;h1&amp;gt;Form in React&amp;lt;/h1&amp;gt; 
            &amp;lt;fieldset&amp;gt; 
                &amp;lt;form action="#" method="get"&amp;gt; 
                    &amp;lt;label for="firstname"&amp;gt;First Name*&amp;lt;/label&amp;gt; 
                    &amp;lt;input 
                        type="text"
                        name="firstname"
                        id="firstname"
                        placeholder="Enter First Name"
                        required 
                    /&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="lastname"&amp;gt;Last Name*&amp;lt;/label&amp;gt; 
                    &amp;lt;input 
                        type="text"
                        name="lastname"
                        id="lastname"
                        placeholder="Enter Last Name"
                        required 
                    /&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="email"&amp;gt;Enter Email* &amp;lt;/label&amp;gt; 
                    &amp;lt;input 
                        type="email"
                        name="email"
                        id="email"
                        placeholder="Enter email"
                        required 
                    /&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="tel"&amp;gt;Contact*&amp;lt;/label&amp;gt; 
                    &amp;lt;input 
                        type="tel"
                        name="tel"
                        id="tel"
                        placeholder="Enter Mobile number"
                        required 
                    /&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="gender"&amp;gt;Gender*&amp;lt;/label&amp;gt; 
                    &amp;lt;br /&amp;gt; 
                    &amp;lt;input type="radio" name="gender"
                        value="" id="male" /&amp;gt; 
                    Male 
                    &amp;lt;input type="radio" name="gender"
                        value="" id="female" /&amp;gt; 
                    Female 
                    &amp;lt;input type="radio" name="gender"
                        value="" id="other" /&amp;gt; 
                    Other 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="lang"&amp;gt;Your best Subject&amp;lt;/label&amp;gt; 
                    &amp;lt;br /&amp;gt; 
                    &amp;lt;input type="checkbox" name="lang"
                        id="english" checked /&amp;gt; 
                    English 
                    &amp;lt;input type="checkbox" name="lang"
                        id="maths" /&amp;gt; 
                    Maths 
                    &amp;lt;input type="checkbox" name="lang"
                        id="physics" /&amp;gt; 
                    Physics 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="file"&amp;gt;Upload Resume*&amp;lt;/label&amp;gt; 
                    &amp;lt;input 
                        type="file"
                        name="file"
                        id="file"
                        placeholder="Enter Upload File"
                        required 
                    /&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="url"&amp;gt;Enter URL*&amp;lt;/label&amp;gt; 
                    &amp;lt;input 
                        type="url"
                        name="url"
                        id="url"
                        placeholder="Enter url"
                        required 
                    /&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label&amp;gt;Select your choice&amp;lt;/label&amp;gt; 
                    &amp;lt;select name="select" id="select"&amp;gt; 
                        &amp;lt;option value="" disabled selected&amp;gt; 
                            Select your Ans 
                        &amp;lt;/option&amp;gt; 
                        &amp;lt;optgroup label="Beginers"&amp;gt; 
                            &amp;lt;option value="1"&amp;gt;HTML&amp;lt;/option&amp;gt; 
                            &amp;lt;option value="2"&amp;gt;CSS&amp;lt;/option&amp;gt; 
                            &amp;lt;option value="3"&amp;gt;JavaScript&amp;lt;/option&amp;gt; 
                        &amp;lt;/optgroup&amp;gt; 
                        &amp;lt;optgroup label="Advance"&amp;gt; 
                            &amp;lt;option value="1"&amp;gt;React&amp;lt;/option&amp;gt; 
                            &amp;lt;option value="2"&amp;gt;Node&amp;lt;/option&amp;gt; 
                            &amp;lt;option value="3"&amp;gt;Express&amp;lt;/option&amp;gt; 
                            &amp;lt;option value="4"&amp;gt;MongoDB&amp;lt;/option&amp;gt; 
                        &amp;lt;/optgroup&amp;gt; 
                    &amp;lt;/select&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label for="about"&amp;gt;About&amp;lt;/label&amp;gt; 
                    &amp;lt;br /&amp;gt; 
                    &amp;lt;textarea 
                        name="about"
                        id="about"
                        cols="30"
                        rows="10"
                        placeholder="About your self"
                        required 
                    &amp;gt;&amp;lt;/textarea&amp;gt; 
                    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; 
                    &amp;lt;label&amp;gt;Submit OR Reset&amp;lt;/label&amp;gt; 
                    &amp;lt;br /&amp;gt; 
                    &amp;lt;button type="reset" value="reset"&amp;gt; 
                        Reset 
                    &amp;lt;/button&amp;gt; 
                    &amp;lt;button type="submit" value="Submit"&amp;gt; 
                        Submit 
                    &amp;lt;/button&amp;gt; 
                &amp;lt;/form&amp;gt; 
            &amp;lt;/fieldset&amp;gt; 
        &amp;lt;/div&amp;gt; 
    ); 
} 

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx44rghqkuqa7pq22il1q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx44rghqkuqa7pq22il1q.gif" alt="Image description" width="1021" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Summarizer Website using MEAN Stack</title>
      <dc:creator>Siddhesh Rajale</dc:creator>
      <pubDate>Mon, 26 Feb 2024 18:09:34 +0000</pubDate>
      <link>https://dev.to/siddheshuncodes/summarizer-website-using-mean-stack-5hbj</link>
      <guid>https://dev.to/siddheshuncodes/summarizer-website-using-mean-stack-5hbj</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In today's fast-paced world, dealing with information overload is a common challenge. Picture having a tool that swiftly summarizes lengthy articles, allowing you to grasp the main points without spending excessive time reading. In this article, we'll walk you through the process of crafting a Summarizer Website using the MEAN Stack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Preview&lt;/strong&gt;:&lt;br&gt;
Before we jump into the details, let's take a sneak peek at what our Summarizer Website will look like. This project is designed to offer users a straightforward and intuitive interface. Users can input large amounts of text and, in return, receive concise summaries.&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
Prerequisites:**&lt;br&gt;
Before you start coding, make sure you have the following prerequisites installed on your system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;MongoDB&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Express.js&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Angular&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node.js&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Approach:&lt;/strong&gt;&lt;br&gt;
Our approach to building the Summarizer Website using the MEAN Stack involves making the most of each component's strengths:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a. MongoDB: Setting up the Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MongoDB acts as our database to store user data and summarized content. Begin by installing and configuring MongoDB on your system. Create a database for user information and another collection for storing summaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b. Express.js and Node.js: Building the Backend&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Express.js, a web application framework for Node.js, serves as our backend framework. Node.js manages server-side operations. Develop RESTful APIs using Express to handle data flow between the frontend and the MongoDB database. Set up routes for user input, text processing, and summary retrieval.&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
c. Angular: Developing the Frontend**&lt;/p&gt;

&lt;p&gt;Angular is our frontend framework, providing a robust and structured environment for UI development. Design a clean and user-friendly interface where users can input extensive text. Use Angular components to handle different parts of the UI, such as input forms and result displays. Implement services to communicate with backend APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;d. Connecting Frontend and Backend: Ensuring Seamless Communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Establish a seamless connection between the frontend and backend. Use Angular services to make HTTP requests to the Express.js backend. Ensure proper handling of asynchronous operations and error cases. Implement mechanisms for sending user input from the frontend to the backend and receiving summarized content in return.&lt;/p&gt;

&lt;p&gt;This approach ensures that each component in the MEAN Stack performs its specific role effectively. MongoDB stores data, Express.js and Node.js handle server-side operations, and Angular provides a dynamic and interactive user interface. As we proceed with the implementation steps, we'll delve deeper into each aspect, guiding you through the intricacies of building this comprehensive web application.&lt;/p&gt;

&lt;p&gt;Let's break down the steps to create our Summarizer Website:&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
a. Set up the MongoDB Database:**&lt;/p&gt;

&lt;p&gt;Think of the MongoDB database as a digital bookshelf where we neatly organize user data and summaries. To set it up, install MongoDB on your computer. It's like creating different shelves – one for storing user details and another for holding the summaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b. Create the Backend using Express.js and Node.js:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, let's talk about the brain behind our website – the backend. Express.js and Node.js are like a dynamic duo. Express.js is the traffic cop, guiding requests, and Node.js is the hardworking assistant, ensuring everything gets done efficiently. Together, they handle requests and communicate with the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c. Develop the Frontend using Angular:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Moving on to the part users interact with – the frontend. Angular helps us design a visually appealing and user-friendly interface. Think of it as crafting the front cover of a book – it's what users see and engage with. We'll create forms for users to input text and areas to display the summarized results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;d. Connect the Frontend and Backend:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine the frontend and backend as two friends having a conversation. We want them to share information seamlessly. To achieve this, we'll set up a system where the user's input from the frontend travels to the backend. The backend processes it, and then the summarized result smoothly comes back to the frontend. It's like a friendly chat between the user interface and the brain behind the scenes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example&lt;/strong&gt;&lt;br&gt;
a. Set up the MongoDB Database&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Import required module
const mongoose = require('mongoose');

// Connect to MongoDB database
mongoose.connect('mongodb://localhost/summarizerDB', { useNewUrlParser: true, useUnifiedTopology: true });

// Define a schema for user data
const userSchema = new mongoose.Schema({
  username: String,
  email: String,
  // Add more fields as needed
});

// Define a schema for summaries
const summarySchema = new mongoose.Schema({
  userId: mongoose.Schema.Types.ObjectId,
  text: String,
  summary: String,
});

// Create models based on the schemas
const User = mongoose.model('User', userSchema);
const Summary = mongoose.model('Summary', summarySchema);

// Example usage:
// const newUser = new User({ username: 'JohnDoe', email: 'john@example.com' });
// newUser.save();

// const newSummary = new Summary({ userId: newUser._id, text: 'Lorem ipsum...', summary: 'Summary goes here.' });
// newSummary.save();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;b. Create the Backend using Express.js and Node.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Import required modules
const express = require('express');
const bodyParser = require('body-parser');
const mongoose = require('mongoose');

// Create Express application
const app = express();
const port = 3000;

// Connect to MongoDB database
mongoose.connect('mongodb://localhost/summarizerDB', { useNewUrlParser: true, useUnifiedTopology: true });

// Middleware for parsing JSON
app.use(bodyParser.json());

// Define routes for handling user input and summaries
app.post('/api/submitText', async (req, res) =&amp;gt; {
  try {
    // Process the incoming text and generate a summary
    const { userId, text } = req.body;
    const summary = processTextAndGenerateSummary(text);

    // Save the summary to the database
    const newSummary = new Summary({ userId, text, summary });
    await newSummary.save();

    res.status(200).json({ success: true, summary });
  } catch (error) {
    console.error(error);
    res.status(500).json({ success: false, error: 'Internal server error' });
  }
});

// Start the server
app.listen(port, () =&amp;gt; {
  console.log(`Server is running on port ${port}`);
});

// Function to process text and generate a summary (replace with your actual summarization logic)
function processTextAndGenerateSummary(text) {
  // Simplified example: Just return the first 50 characters as a summary
  return text.slice(0, 50);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;c. Develop the Frontend using Angular&lt;/strong&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 required modules
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-summarizer',
  templateUrl: './summarizer.component.html',
  styleUrls: ['./summarizer.component.css'],
})
export class SummarizerComponent {
  userInput = '';
  summary = '';

  constructor(private http: HttpClient) {}

  submitText() {
    // Send user input to the backend for processing
    this.http
      .post&amp;lt;any&amp;gt;('http://localhost:3000/api/submitText', { userId: 'user123', text: this.userInput })
      .subscribe((response) =&amp;gt; {
        if (response.success) {
          // Update the summary on the frontend
          this.summary = response.summary;
        } else {
          console.error(response.error);
        }
      });
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt;&lt;br&gt;
MongoDB Documentation:&lt;/p&gt;

&lt;p&gt;MongoDB official documentation for installation and usage: &lt;/p&gt;

&lt;p&gt;MongoDB Documentation&lt;/p&gt;

&lt;p&gt;Express.js Documentation:&lt;/p&gt;

&lt;p&gt;Express.js official documentation for creating the backend: Express.js Documentation&lt;/p&gt;

&lt;p&gt;Angular Documentation:&lt;/p&gt;

&lt;p&gt;Angular official documentation for building the frontend: Angular Documentation&lt;/p&gt;

&lt;p&gt;Node.js Documentation:&lt;/p&gt;

&lt;p&gt;Node.js official documentation for server-side JavaScript: Node.js Documentation&lt;/p&gt;

&lt;p&gt;MEAN Stack Overview:&lt;/p&gt;

&lt;p&gt;Understanding the MEAN Stack and its components: MEAN Stack &lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTP Client for Angular - HttpClientModule:&lt;/p&gt;

&lt;p&gt;Angular documentation for making HTTP requests: HttpClientModule - Angular Docs&lt;/p&gt;

&lt;p&gt;Body-Parser Middleware for Express.js:&lt;/p&gt;

&lt;p&gt;Body-parser middleware for handling JSON data in Express: Body-parser - npm&lt;/p&gt;

&lt;p&gt;Mongoose Documentation:&lt;/p&gt;

&lt;p&gt;Mongoose documentation for MongoDB object modeling: Mongoose Documentation&lt;/p&gt;

&lt;p&gt;GitHub Repositories for Sample Projects:&lt;/p&gt;

&lt;p&gt;Sample projects on GitHub for reference:&lt;/p&gt;

&lt;p&gt;Angular Sample Project&lt;/p&gt;

&lt;p&gt;Express.js Sample Project&lt;/p&gt;

&lt;p&gt;Node.js Sample Project&lt;/p&gt;

&lt;p&gt;Summarization Algorithms and NLP (Natural Language Processing):&lt;/p&gt;

&lt;p&gt;Research and explore different summarization algorithms and NLP techniques for improving your text summarization logic.&lt;/p&gt;

&lt;p&gt;By referring to these resources, you'll have a comprehensive understanding of the technologies used in your Summarizer Website project.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
