Build a Next.js Interactive Web-Based Digital Business Card

Written by

in

In today’s digital age, a professional online presence is crucial. A digital business card offers a modern, shareable, and eco-friendly alternative to traditional paper cards. Imagine having a dynamic, interactive card that you can update instantly, share with a simple link or QR code, and track engagement with. This tutorial will guide you through building a fully functional digital business card using Next.js, a powerful React framework for building web applications. We’ll cover everything from setting up the project to deploying it, equipping you with the skills to create a compelling digital representation of yourself or your business.

Why Build a Digital Business Card with Next.js?

Next.js provides several advantages for this project:

  • Performance: Next.js offers features like server-side rendering (SSR) and static site generation (SSG), leading to faster load times and improved user experience.
  • SEO-Friendly: SSR and SSG are beneficial for search engine optimization, making your card more discoverable.
  • Ease of Use: Next.js simplifies complex tasks like routing and image optimization, making development smoother.
  • Scalability: Next.js is designed to handle applications of all sizes, ensuring your card can grow with your needs.

This project is ideal for beginners and intermediate developers looking to expand their skills in Next.js. You’ll learn essential concepts like component creation, styling, data fetching, and deployment, all while creating a practical and valuable tool.

Prerequisites

Before we begin, ensure you have the following:

  • Node.js and npm (or yarn) installed on your system.
  • A basic understanding of HTML, CSS, and JavaScript.
  • A code editor (like VS Code) installed.

Step-by-Step Guide

1. Setting Up Your Next.js Project

Let’s start by creating a new Next.js project. Open your terminal and run the following command:

npx create-next-app digital-business-card

This command creates a new directory called `digital-business-card` with the basic structure of a Next.js application. Navigate into the project directory:

cd digital-business-card

Now, start the development server:

npm run dev

Open your browser and go to `http://localhost:3000`. You should see the default Next.js welcome page.

2. Project Structure and File Organization

Next.js uses a file-based routing system. Any file inside the `pages` directory becomes a route. For our digital business card, we’ll primarily work with the `pages/index.js` file, which will serve as our homepage.

Let’s create the following basic project structure:


digital-business-card/
├── pages/
│   └── index.js
├── components/
│   └── Card.js
├── styles/
│   └── Card.module.css
└── public/
    └── images/
        └── profile.jpg

We’ll create a `Card.js` component to encapsulate the business card’s content and styling, and a `Card.module.css` file for styling the card. The `public/images` directory will store our profile picture. This structure keeps our code organized and maintainable.

3. Creating the Card Component (Card.js)

Create a `components/Card.js` file and add the following code:


import styles from '../styles/Card.module.css';
import Image from 'next/image';

function Card() {
  return (
    <div>
      <div>
        
      </div>
      <h1>Your Name</h1>
      <p>Software Engineer</p>
      <div>
        <p>Email: <a href="mailto:your.email@example.com">your.email@example.com</a></p>
        <p>Phone: <a href="tel:+15551234567">+1 (555) 123-4567</a></p>
        <p>Website: <a href="https://www.yourwebsite.com">yourwebsite.com</a></p>
        <p>LinkedIn: <a href="https://www.linkedin.com/in/yourprofile">LinkedIn</a></p>
      </div>
    </div>
  );
}

export default Card;

This component uses the `Image` component from `next/image` for optimized image loading. Replace the placeholder information with your actual details.

4. Styling the Card Component (Card.module.css)

Create a `styles/Card.module.css` file and add the following CSS rules:


.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.imageContainer {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
}

.profileImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.title {
  color: #666;
  margin-bottom: 15px;
}

.contact {
  text-align: center;
}

.contact a {
  color: #0070f3;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

This CSS provides a basic style for the card. Feel free to customize it to match your personal brand. Consider adjusting colors, fonts, and layout.

5. Integrating the Card Component into the Homepage (pages/index.js)

Now, let’s integrate our `Card` component into the `pages/index.js` file. Replace the existing content with the following:


import Head from 'next/head';
import Card from '../components/Card';

export default function Home() {
  return (
    <div>
      
        <title>Your Digital Business Card</title>
        
        
      

      <main>
        
      </main>
    </div>
  );
}

This code imports the `Card` component and renders it within the `main` element. It also includes a `Head` component to manage the page’s title and meta description for SEO.

6. Adding Your Profile Picture

Place your profile picture (e.g., `profile.jpg`) in the `public/images` directory. Make sure the file name matches the one used in the `Card.js` component.

7. Testing and Customization

Save all the files and refresh your browser. You should see your digital business card displayed. Now is the time to customize your card:

  • Update the information: Modify the `Card.js` component with your name, title, contact details, and links.
  • Customize the styling: Adjust the CSS in `Card.module.css` to match your brand’s aesthetic. Experiment with colors, fonts, and layout.
  • Add more information: Consider adding social media links, a brief bio, or a QR code for easy sharing.

Adding Functionality: Making it Interactive

8. Adding a QR Code

A QR code makes it easy for people to scan your card with their phones and save your contact information. We can use a QR code generator library to create one dynamically. Install the `qrcode.react` library:

npm install qrcode.react

Update `Card.js` to include the QR code:


import styles from '../styles/Card.module.css';
import Image from 'next/image';
import QRCode from 'qrcode.react';

function Card() {
  const cardData = `
  BEGIN:VCARD
  VERSION:3.0
  N:Your;Name
  FN:Your Name
  ORG:Your Company
  TITLE:Software Engineer
  TEL;TYPE=WORK,VOICE:+15551234567
  EMAIL:your.email@example.com
  URL:https://www.yourwebsite.com
  URL:https://www.linkedin.com/in/yourprofile
  END:VCARD
  `;

  return (
    <div>
      {/* ... existing card content ... */}
      <div>
        
      </div>
    </div>
  );
}

export default Card;

In this example, we create a `cardData` string containing the vCard data. Replace the placeholder values with your actual contact information. The `QRCode` component from `qrcode.react` generates the QR code. Add the `qrCodeContainer` styling in `Card.module.css`:


.qrCodeContainer {
  margin-top: 20px;
}

9. Adding Social Media Links

Enhance the card by adding social media links. Update `Card.js`:


import styles from '../styles/Card.module.css';
import Image from 'next/image';
import QRCode from 'qrcode.react';

function Card() {
  const cardData = `
  BEGIN:VCARD
  VERSION:3.0
  N:Your;Name
  FN:Your Name
  ORG:Your Company
  TITLE:Software Engineer
  TEL;TYPE=WORK,VOICE:+15551234567
  EMAIL:your.email@example.com
  URL:https://www.yourwebsite.com
  URL:https://www.linkedin.com/in/yourprofile
  END:VCARD
  `;

  return (
    <div>
      {/* ... existing card content ... */}
      <div>
        {/* ... existing contact links ... */}
        <div>
          <a href="https://www.linkedin.com/in/yourprofile" target="_blank" rel="noopener noreferrer">LinkedIn</a>
          <a href="https://twitter.com/yourhandle" target="_blank" rel="noopener noreferrer">Twitter</a>
          {/* Add more social media links here */}   
        </div>
      </div>
      <div>
        
      </div>
    </div>
  );
}

export default Card;

Add the following CSS to `Card.module.css`:


.socialLinks {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.socialLinks a {
  color: #0070f3;
  text-decoration: none;
}

.socialLinks a:hover {
  text-decoration: underline;
}

Deployment

10. Deploying Your Digital Business Card

Next.js makes deployment easy. We’ll use Vercel, the platform created by the Next.js team, for this tutorial. Vercel offers free hosting for personal projects.

  1. Sign up for Vercel: Go to vercel.com and sign up for an account.
  2. Connect your Git repository: If you’ve pushed your code to a Git repository (like GitHub or GitLab), you can connect your repository to Vercel. Vercel will automatically detect your Next.js project and deploy it.
  3. Deploy from the command line: Alternatively, you can deploy directly from your terminal. Install the Vercel CLI:
    npm install -g vercel

    Then, run the following command in your project directory:

    vercel

    Follow the prompts to link your project to Vercel and deploy.

Once deployed, Vercel will provide you with a unique URL for your digital business card. Share this URL with anyone you’d like to share your card with!

Common Mistakes and Troubleshooting

  • Image Path Errors: Double-check the image path in your `Image` component. Make sure it’s correct relative to your `public` directory.
  • CSS Styling Issues: Ensure your CSS class names match the ones used in your components. Use your browser’s developer tools to inspect the elements and identify any styling conflicts.
  • QR Code Not Displaying: If the QR code doesn’t appear, check the console for any errors. Make sure you’ve installed the `qrcode.react` library correctly and that the `cardData` string is formatted correctly.
  • Deployment Problems: If you encounter deployment issues, review the Vercel logs for error messages. Ensure your project is pushed to a Git repository and that your environment variables are configured correctly (if any).

SEO Best Practices

To improve your digital business card’s visibility in search results, follow these SEO best practices:

  • Use a Descriptive Title: The `` tag in your `Head` component should accurately reflect the content of your card.</li> <li><b>Write a Compelling Meta Description:</b> The “ tag should summarize your card and include relevant keywords.</li> <li><b>Optimize Image Alt Text:</b> Use descriptive `alt` text for your profile picture in the `Image` component.</li> <li><b>Use Semantic HTML:</b> Use appropriate HTML tags (e.g., `<br /> <h1>`, `</p> <p>`, `<a>`) to structure your content.</li> <li><b>Ensure Mobile-Friendliness:</b> Your card should be responsive and display correctly on all devices. The CSS we provided is a good starting point.</li> <li><b>Get Backlinks:</b> Share your card’s URL on your other online profiles (LinkedIn, Twitter, etc.) to build backlinks and improve your search ranking.</li> </ul> <h2>Summary/Key Takeaways</h2> <p>In this tutorial, we’ve successfully built a dynamic, interactive digital business card using Next.js. We’ve covered the essential steps from project setup to deployment, including component creation, styling, and adding interactive elements like a QR code and social media links. You’ve also learned about SEO best practices to help your card rank well in search engines. This project empowers you with a modern and shareable way to present yourself professionally online. By following these steps, you now have a solid foundation for creating your own digital business card and customizing it to fit your unique brand. Remember that continuous improvement and adaptation are key in the ever-evolving digital landscape. Embrace the opportunity to refine your card, add new features, and stay ahead of the curve.</p> <h2>FAQ</h2> <ol> <li><b>Can I use a custom domain for my digital business card?</b> Yes, Vercel allows you to configure a custom domain for your project. You can do this in the Vercel dashboard.</li> <li><b>How do I update my digital business card?</b> Simply modify the code in your Next.js project and redeploy it to Vercel. Vercel will automatically rebuild and deploy your changes.</li> <li><b>Is this project mobile-friendly?</b> Yes, the provided CSS is responsive and should display well on mobile devices. You can further enhance the mobile experience by adjusting the styling and layout.</li> <li><b>Can I track analytics for my digital business card?</b> Yes, you can integrate analytics tools like Google Analytics or Vercel Analytics to track views, clicks, and other engagement metrics. You’ll need to sign up for an analytics service and add the tracking code to your project.</li> <li><b>What if I don’t want to use Vercel?</b> You can deploy your Next.js application to other platforms like Netlify, AWS, or Google Cloud. The deployment process will vary depending on the platform.</li> </ol> <p>The journey doesn’t end here. Consider this project a starting point for exploring the vast potential of Next.js. With your digital business card now online, you’re not just presenting information; you’re making a statement. You are demonstrating a forward-thinking approach to self-promotion that reflects the dynamism of the modern world. Take pride in your creation and leverage it to make lasting connections and open doors to new opportunities.</p> <div class="wpzoom-social-sharing-buttons-bottom"><div class="align-none wp-block-wpzoom-blocks-social-sharing"><ul class="social-sharing-icons"><li class="social-sharing-icon-li"><a class="social-sharing-icon social-sharing-icon-facebook" style="padding:5px 15px;margin:5px 5px;border-radius:50px;color:#ffffff;background-color:#0866FF;" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fjavascriptdebugged.com%2Fbuild-a-next-js-interactive-web-based-digital-business-card%2F&t=Build+a+Next.js+Interactive+Web-Based+Digital+Business+Card" title="Facebook" target="_blank" rel="noopener noreferrer" data-platform="facebook"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" /></svg><span class="social-sharing-icon-label" style="font-size:16px;color:inherit;">Facebook</span></a></li><li class="social-sharing-icon-li"><a class="social-sharing-icon social-sharing-icon-x" style="padding:5px 15px;margin:5px 5px;border-radius:50px;color:#ffffff;background-color:#000000;" href="https://x.com/intent/tweet?url=https%3A%2F%2Fjavascriptdebugged.com%2Fbuild-a-next-js-interactive-web-based-digital-business-card%2F&text=Build+a+Next.js+Interactive+Web-Based+Digital+Business+Card" title="Share on X" target="_blank" rel="noopener noreferrer" data-platform="x"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" /></svg><span class="social-sharing-icon-label" style="font-size:16px;color:inherit;">Share on X</span></a></li><li class="social-sharing-icon-li"><a class="social-sharing-icon social-sharing-icon-linkedin" style="padding:5px 15px;margin:5px 5px;border-radius:50px;color:#ffffff;background-color:#0966c2;" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fjavascriptdebugged.com%2Fbuild-a-next-js-interactive-web-based-digital-business-card%2F" title="LinkedIn" target="_blank" rel="noopener noreferrer" data-platform="linkedin"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" /></svg><span class="social-sharing-icon-label" style="font-size:16px;color:inherit;">LinkedIn</span></a></li><li class="social-sharing-icon-li"><a class="social-sharing-icon social-sharing-icon-whatsapp" style="padding:5px 15px;margin:5px 5px;border-radius:50px;color:#ffffff;background-color:#25D366;" href="https://api.whatsapp.com/send?text=Build+a+Next.js+Interactive+Web-Based+Digital+Business+Card+https%3A%2F%2Fjavascriptdebugged.com%2Fbuild-a-next-js-interactive-web-based-digital-business-card%2F" title="WhatsApp" target="_blank" rel="noopener noreferrer" data-platform="whatsapp"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" /></svg><span class="social-sharing-icon-label" style="font-size:16px;color:inherit;">WhatsApp</span></a></li><li class="social-sharing-icon-li"><a class="social-sharing-icon social-sharing-icon-email" style="padding:5px 15px;margin:5px 5px;border-radius:50px;color:#ffffff;background-color:#333333;" href="mailto:?subject=Build+a+Next.js+Interactive+Web-Based+Digital+Business+Card&body=https%3A%2F%2Fjavascriptdebugged.com%2Fbuild-a-next-js-interactive-web-based-digital-business-card%2F" title="Email" target="_blank" rel="noopener noreferrer" data-platform="email"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-.4 4.25l-7.07 4.42c-.32.2-.74.2-1.06 0L4.4 8.25c-.25-.16-.4-.43-.4-.72 0-.67.73-1.07 1.3-.72L12 11l6.7-4.19c.57-.35 1.3.05 1.3.72 0 .29-.15.56-.4.72z" /></svg><span class="social-sharing-icon-label" style="font-size:16px;color:inherit;">Email</span></a></li><li class="social-sharing-icon-li"><a class="social-sharing-icon social-sharing-icon-copy-link" style="padding:5px 15px;margin:5px 5px;border-radius:50px;color:#ffffff;background-color:#333333;" href="#copy-link" title="Copy Link" data-platform="copy-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" /></svg><span class="social-sharing-icon-label" style="font-size:16px;color:inherit;">Copy Link</span></a></li></ul><script> document.addEventListener("DOMContentLoaded", function() { var copyLinks = document.querySelectorAll("a[data-platform='copy-link']"); copyLinks.forEach(function(link) { if (link.hasAttribute("data-listener-added")) return; link.setAttribute("data-listener-added", "true"); link.addEventListener("click", function(e) { e.preventDefault(); var tempInput = document.createElement("input"); tempInput.value = window.location.href; document.body.appendChild(tempInput); tempInput.select(); document.execCommand("copy"); document.body.removeChild(tempInput); var originalText = this.querySelector(".social-sharing-icon-label")?.textContent || ""; var originalTitle = this.getAttribute("title"); var originalIcon = this.querySelector("svg").outerHTML; // Show success feedback this.setAttribute("title", "Copied!"); this.classList.add("copied"); if (this.querySelector(".social-sharing-icon-label")) { this.querySelector(".social-sharing-icon-label").textContent = "Copied!"; } else { this.querySelector("svg").outerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" style="fill:#ffffff;" aria-hidden="true" focusable="false"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" /></svg>'; } var self = this; setTimeout(function() { self.setAttribute("title", originalTitle); self.classList.remove("copied"); if (self.querySelector(".social-sharing-icon-label")) { self.querySelector(".social-sharing-icon-label").textContent = originalText; } else { self.querySelector("svg").outerHTML = originalIcon; } }, 2000); }); }); }); </script></div></div></div> <div class="wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)"> <div class="taxonomy-post_tag is-style-post-terms-1 is-style-post-terms-1--2 wp-block-post-terms"><a href="https://javascriptdebugged.com/tag/digital-business-card/" rel="tag">Digital Business Card</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/frontend/" rel="tag">Frontend</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/next-js/" rel="tag">Next.js</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/qr-code/" rel="tag">QR Code</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/react/" rel="tag">React</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/seo/" rel="tag">SEO</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/social-media/" rel="tag">Social Media</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/tutorial/" rel="tag">Tutorial</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/vercel/" rel="tag">Vercel</a><span class="wp-block-post-terms__separator"> </span><a href="https://javascriptdebugged.com/tag/web-development/" rel="tag">Web Development</a></div> </div> <div class="wp-block-group alignwide is-layout-flow wp-block-group-is-layout-flow" style="margin-top:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--60);"> <nav class="wp-block-group alignwide is-content-justification-space-between is-nowrap is-layout-flex wp-container-core-group-is-layout-878fe601 wp-block-group-is-layout-flex" aria-label="Post navigation" style="border-top-color:var(--wp--preset--color--accent-6);border-top-width:1px;padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)"> <div class="post-navigation-link-previous wp-block-post-navigation-link"><span class="wp-block-post-navigation-link__arrow-previous is-arrow-arrow" aria-hidden="true">←</span><a href="https://javascriptdebugged.com/build-a-next-js-interactive-web-based-event-calendar/" rel="prev">Build a Next.js Interactive Web-Based Event Calendar</a></div> <div class="post-navigation-link-next wp-block-post-navigation-link"><a href="https://javascriptdebugged.com/build-a-next-js-interactive-web-based-recipe-search-app/" rel="next">Build a Next.js Interactive Web-Based Recipe Search App</a><span class="wp-block-post-navigation-link__arrow-next is-arrow-arrow" aria-hidden="true">→</span></div> </nav> </div> </div> <div class="wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)"> <h2 class="wp-block-heading alignwide has-small-font-size" style="font-style:normal;font-weight:700;letter-spacing:1.4px;text-transform:uppercase">More posts</h2> <div class="wp-block-query alignwide is-layout-flow wp-block-query-is-layout-flow"> <ul class="alignfull wp-block-post-template is-layout-flow wp-container-core-post-template-is-layout-b4d04ffe wp-block-post-template-is-layout-flow"><li class="wp-block-post post-1754 post type-post status-publish format-standard hentry category-node-js tag-api tag-backend tag-beginner tag-express-js tag-frontend tag-intermediate tag-javascript tag-node-js tag-tutorial tag-url-analyzer tag-web-development"> <div class="wp-block-group alignfull is-content-justification-space-between is-nowrap is-layout-flex wp-container-core-group-is-layout-cba70755 wp-block-group-is-layout-flex" style="border-bottom-color:var(--wp--preset--color--accent-6);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30)"> <h3 class="wp-block-post-title has-large-font-size"><a href="https://javascriptdebugged.com/build-a-simple-node-js-interactive-web-based-url-analyzer/" target="_self" >Build a Simple Node.js Interactive Web-Based URL Analyzer</a></h3> <div class="has-text-align-right wp-block-post-date"><a href="https://javascriptdebugged.com/build-a-simple-node-js-interactive-web-based-url-analyzer/"><time datetime="2026-02-23T10:21:24+00:00">February 23, 2026</time></a></div> </div> </li><li class="wp-block-post post-1749 post type-post status-publish format-standard hentry category-node-js tag-beginner tag-code-review tag-diff tag-express tag-intermediate tag-javascript tag-node-js tag-software-engineering tag-syntax-highlighting tag-tutorial tag-web-development"> <div class="wp-block-group alignfull is-content-justification-space-between is-nowrap is-layout-flex wp-container-core-group-is-layout-cba70755 wp-block-group-is-layout-flex" style="border-bottom-color:var(--wp--preset--color--accent-6);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30)"> <h3 class="wp-block-post-title has-large-font-size"><a href="https://javascriptdebugged.com/build-a-node-js-interactive-web-based-simple-code-review-tool/" target="_self" >Build a Node.js Interactive Web-Based Simple Code Review Tool</a></h3> <div class="has-text-align-right wp-block-post-date"><a href="https://javascriptdebugged.com/build-a-node-js-interactive-web-based-simple-code-review-tool/"><time datetime="2026-02-23T10:15:04+00:00">February 23, 2026</time></a></div> </div> </li><li class="wp-block-post post-1748 post type-post status-publish format-standard hentry category-node-js tag-code-diff tag-ejs tag-express-js tag-javascript tag-node-js tag-tutorial tag-web-development"> <div class="wp-block-group alignfull is-content-justification-space-between is-nowrap is-layout-flex wp-container-core-group-is-layout-cba70755 wp-block-group-is-layout-flex" style="border-bottom-color:var(--wp--preset--color--accent-6);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30)"> <h3 class="wp-block-post-title has-large-font-size"><a href="https://javascriptdebugged.com/build-a-node-js-interactive-web-based-simple-code-diff-tool/" target="_self" >Build a Node.js Interactive Web-Based Simple Code Diff Tool</a></h3> <div class="has-text-align-right wp-block-post-date"><a href="https://javascriptdebugged.com/build-a-node-js-interactive-web-based-simple-code-diff-tool/"><time datetime="2026-02-23T10:10:48+00:00">February 23, 2026</time></a></div> </div> </li><li class="wp-block-post post-1747 post type-post status-publish format-standard hentry category-node-js tag-beginner tag-code-playground tag-coding tag-express tag-intermediate tag-javascript tag-node-js tag-tutorial tag-web-development"> <div class="wp-block-group alignfull is-content-justification-space-between is-nowrap is-layout-flex wp-container-core-group-is-layout-cba70755 wp-block-group-is-layout-flex" style="border-bottom-color:var(--wp--preset--color--accent-6);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30)"> <h3 class="wp-block-post-title has-large-font-size"><a href="https://javascriptdebugged.com/build-a-node-js-interactive-web-based-simple-code-playground/" target="_self" >Build a Node.js Interactive Web-Based Simple Code Playground</a></h3> <div class="has-text-align-right wp-block-post-date"><a href="https://javascriptdebugged.com/build-a-node-js-interactive-web-based-simple-code-playground/"><time datetime="2026-02-23T09:59:35+00:00">February 23, 2026</time></a></div> </div> </li></ul> </div> </div> </main> <footer class="wp-block-template-part"> <div class="wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--50)"> <div class="wp-block-group alignwide is-layout-flow wp-block-group-is-layout-flow"><div class="is-default-size wp-block-site-logo"><a href="https://javascriptdebugged.com/" class="custom-logo-link" rel="home"><img width="434" height="289" src="https://javascriptdebugged.com/wp-content/uploads/2026/02/ChatGPT_Image_Feb_6__2026__02_59_52_PM-removebg-preview-edited.png" class="custom-logo" alt="Javascriptdebugged" decoding="async" fetchpriority="high" srcset="https://javascriptdebugged.com/wp-content/uploads/2026/02/ChatGPT_Image_Feb_6__2026__02_59_52_PM-removebg-preview-edited.png 434w, https://javascriptdebugged.com/wp-content/uploads/2026/02/ChatGPT_Image_Feb_6__2026__02_59_52_PM-removebg-preview-edited-300x200.png 300w" sizes="(max-width: 434px) 100vw, 434px" /></a></div> <div class="wp-block-group alignfull is-content-justification-space-between is-layout-flex wp-container-core-group-is-layout-cf54d0a6 wp-block-group-is-layout-flex"> <div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-794e3cfa wp-block-columns-is-layout-flex"> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%"><p class="wp-block-site-tagline">Making JavaScript Clear and Practical</p></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"> <div style="height:var(--wp--preset--spacing--40);width:0px" aria-hidden="true" class="wp-block-spacer"></div> </div> </div> </div> <div class="wp-block-group alignfull is-content-justification-space-between is-layout-flex wp-container-core-group-is-layout-2ab8c7fb wp-block-group-is-layout-flex"> <p class="has-small-font-size wp-block-paragraph">© 2026 • JavascriptDebugged</p> <p class="has-small-font-size wp-block-paragraph">Inquiries: <strong><a href="mailto:admin@codingeasypeasy.com">admin@javascriptdebugged.com</a></strong></p> </div> </div> </div> </footer> </div> <script type="speculationrules"> {"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/wp-content/uploads/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/twentytwentyfive/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]} </script> <div class="wp-dark-mode-floating-switch wp-dark-mode-ignore wp-dark-mode-animation wp-dark-mode-animation-bounce " style="right: 10px; bottom: 10px;"> <!-- call to action --> <div class="wp-dark-mode-switch wp-dark-mode-ignore " tabindex="0" role="switch" aria-label="Dark Mode Toggle" aria-checked="false" data-style="1" data-size="1" data-text-light="" data-text-dark="" data-icon-light="" data-icon-dark=""></div></div><script data-wp-router-options="{"loadOnClientNavigation":true}" fetchpriority="low" id="@wordpress/block-library/navigation/view-js-module" src="https://javascriptdebugged.com/wp-includes/js/dist/script-modules/block-library/navigation/view.min.js?ver=1bf28ded04f9f188bdcb" type="module"></script> <!-- Koko Analytics v2.5.3 - https://www.kokoanalytics.com/ --> <script> (()=>{var e=window.koko_analytics,s=["utm_source","utm_medium","utm_campaign"],d=/bot|crawl|spider|seo|lighthouse|facebookexternalhit|preview|prerender|headless|phantom|scrapy|python|curl|wget|go-http|okhttp|node-fetch|axios|java\/|libwww|http[-_]?client|monitor|uptime|pingdom|statuscake|validator|scanner/i;function u(){let t={},n=new URLSearchParams(window.location.search),c=new URLSearchParams(window.location.hash.substring(1));return s.forEach(a=>{let o=n.get(a)||c.get(a);o&&(t[a]=o)}),t}function h(t,n){if(typeof navigator.sendBeacon=="function"){navigator.sendBeacon(t,n);return}fetch(t,{method:"POST",body:n,keepalive:!0,credentials:"same-origin"}).catch(()=>{})}e.trackPageview=function(t,n){if(d.test(navigator.userAgent)||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress){console.debug("Koko Analytics: Ignoring call to trackPageview because user agent is a bot or this is a headless browser.");return}h(e.url,new URLSearchParams({action:"koko_analytics_collect",pa:t,po:n,r:document.referrer.indexOf(e.site_url)==0?"":document.referrer,m:e.use_cookie?"c":e.method[0],...u()}))};function r(){e.trackPageview(e.path,e.post_id)}function i(){e.autotracked||(r(),e.autotracked=!0)}document.prerendering?document.addEventListener("prerenderingchange",i,{once:!0}):document.visibilityState==="hidden"||document.visibilityState==="prerender"?document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&i()}):i();window.addEventListener("pageshow",t=>{t.persisted&&r()});})(); </script> <script id="prismatic-prism-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/prism-core.js?ver=3.7.5"></script> <script id="prismatic-prism-toolbar-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/plugin-toolbar.js?ver=3.7.5"></script> <script id="prismatic-prism-line-highlight-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/plugin-line-highlight.js?ver=3.7.5"></script> <script id="prismatic-prism-line-numbers-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/plugin-line-numbers.js?ver=3.7.5"></script> <script id="prismatic-copy-clipboard-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/plugin-copy-clipboard.js?ver=3.7.5"></script> <script id="prismatic-command-line-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/plugin-command-line.js?ver=3.7.5"></script> <script id="prismatic-prism-bash-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/lang-bash.js?ver=3.7.5"></script> <script id="prismatic-prism-css-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/lang-css.js?ver=3.7.5"></script> <script id="prismatic-prism-jsx-js" src="https://javascriptdebugged.com/wp-content/plugins/prismatic/lib/prism/js/lang-jsx.js?ver=3.7.5"></script> <script id="zoom-social-icons-widget-frontend-js" src="https://javascriptdebugged.com/wp-content/plugins/social-icons-widget-by-wpzoom/assets/js/social-icons-widget-frontend.js?ver=1793159143"></script> <script id="wp-emoji-settings" type="application/json"> {"baseUrl":"https://s.w.org/images/core/emoji/17.0.2/72x72/","ext":".png","svgUrl":"https://s.w.org/images/core/emoji/17.0.2/svg/","svgExt":".svg","source":{"concatemoji":"https://javascriptdebugged.com/wp-includes/js/wp-emoji-release.min.js?ver=7.1.3"}} </script> <script type="module"> /*! This file is auto-generated */ var e="script#wp-emoji-settings",t=document.querySelector(e);if(!(t instanceof HTMLScriptElement))throw new Error("Element missing: "+e);const r=JSON.parse(t.text),s=(window._wpemojiSettings=r,"wpEmojiSettingsSupports"),o=["flag","emoji"];function i(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(s,JSON.stringify(t))}catch(e){}}function c(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0);const r=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);return t.every((e,t)=>e===r[t])}function p(e,t){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var n=e.getImageData(16,16,1,1);for(let e=0;e<n.data.length;e++)if(0!==n.data[e])return!1;return!0}function u(e,t,n,r){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\udde8\ud83c\uddf6","\ud83c\udde8\u200b\ud83c\uddf6")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!r(e,"\ud83e\u1fac8")}return!1}function f(e,t,n,r){let a;const s=(a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):document.createElement("canvas")).getContext("2d",{willReadFrequently:!0}),o=(s.textBaseline="top",s.font="600 32px Arial",{});return e.forEach(e=>{o[e]=t(s,e,n,r)}),o}function a(e){var t=document.createElement("script");t.src=e,t.defer=!0,document.head.appendChild(t)}r.supports={everything:!0,everythingExceptFlag:!0},new Promise(t=>{let n=function(){try{var e=JSON.parse(sessionStorage.getItem(s));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(o),u.toString(),c.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"});const a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=e=>{i(n=e.data),a.terminate(),t(n)})}catch(e){}i(n=f(o,u,c,p))}t(n)}).then(e=>{for(const n in e)r.supports[n]=e[n],r.supports.everything=r.supports.everything&&r.supports[n],"flag"!==n&&(r.supports.everythingExceptFlag=r.supports.everythingExceptFlag&&r.supports[n]);var t;r.supports.everythingExceptFlag=r.supports.everythingExceptFlag&&!r.supports.flag,r.supports.everything||((t=r.source||{}).concatemoji?a(t.concatemoji):t.wpemoji&&t.twemoji&&(a(t.twemoji),a(t.wpemoji)))}); //# sourceURL=https://javascriptdebugged.com/wp-includes/js/wp-emoji-loader.min.js </script> <script> (function() { function applyScrollbarStyles() { if (!document.documentElement.hasAttribute('data-wp-dark-mode-active')) { document.documentElement.style.removeProperty('scrollbar-color'); return; } document.documentElement.style.setProperty('scrollbar-color', '#2E334D #1D2033', 'important'); // Find and remove dark mode engine scrollbar styles. var styles = document.querySelectorAll('style'); styles.forEach(function(style) { if (style.id === 'wp-dark-mode-scrollbar-custom') return; if (style.textContent && style.textContent.indexOf('::-webkit-scrollbar') !== -1 && style.textContent.indexOf('#1D2033') === -1) { style.textContent = style.textContent.replace(/::-webkit-scrollbar[^}]*\{[^}]*\}/g, ''); style.textContent = style.textContent.replace(/::-webkit-scrollbar-track[^}]*\{[^}]*\}/g, ''); style.textContent = style.textContent.replace(/::-webkit-scrollbar-thumb[^{]*\{[^}]*\}/g, ''); style.textContent = style.textContent.replace(/::-webkit-scrollbar-corner[^}]*\{[^}]*\}/g, ''); } }); // Inject our styles. var existing = document.getElementById('wp-dark-mode-scrollbar-custom'); if (!existing) { var customStyle = document.createElement('style'); customStyle.id = 'wp-dark-mode-scrollbar-custom'; customStyle.textContent = '::-webkit-scrollbar { width: 12px !important; height: 12px !important; background: #1D2033 !important; }' + '::-webkit-scrollbar-track { background: #1D2033 !important; }' + '::-webkit-scrollbar-thumb { background: #2E334D !important; border-radius: 6px; }' + '::-webkit-scrollbar-thumb:hover { filter: brightness(1.2); }' + '::-webkit-scrollbar-corner { background: #1D2033 !important; }'; document.body.appendChild(customStyle); } } // Listen for dark mode changes. document.addEventListener('wp_dark_mode', function(e) { setTimeout(applyScrollbarStyles, 100); setTimeout(applyScrollbarStyles, 500); setTimeout(applyScrollbarStyles, 1000); }); // Observe attribute changes. var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.attributeName === 'data-wp-dark-mode-active') { var existing = document.getElementById('wp-dark-mode-scrollbar-custom'); if (existing && !document.documentElement.hasAttribute('data-wp-dark-mode-active')) { existing.remove(); } setTimeout(applyScrollbarStyles, 100); setTimeout(applyScrollbarStyles, 500); } }); }); observer.observe(document.documentElement, { attributes: true }); // Initial apply. setTimeout(applyScrollbarStyles, 100); setTimeout(applyScrollbarStyles, 500); setTimeout(applyScrollbarStyles, 1000); })(); </script> </body> </html>