<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ programming - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ programming - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 05:06:00 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/programming-ciovqvfcb008mb253jrczo9ye/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Install Java on Mac in 2026 ]]>
                </title>
                <description>
                    <![CDATA[ Java is the most widely used programming language for enterprise software, Android development, and university computer science courses. Apple doesn't include Java with macOS, so you need to install i ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-install-java-on-mac/</link>
                <guid isPermaLink="false">69987a933dc17c4862f4c18d</guid>
                
                    <category>
                        <![CDATA[ Java ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Development Tools ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Kehoe ]]>
                </dc:creator>
                <pubDate>Fri, 20 Feb 2026 15:15:31 +0000</pubDate>
                <media:content url="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/5e1e335a7a1d3fcc59028c64/ab23255a-f10d-485b-9fd2-ee247138ed9e.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Java is the most widely used programming language for enterprise software, Android development, and university computer science courses. Apple doesn't include Java with macOS, so you need to install it yourself.</p>
<p>If you search for "install Java on Mac," you'll find a confusing number of vendors, version numbers, and installation methods. To make it easy, I'll cut through the confusion and show you a recommended Java installation path that takes about five minutes.</p>
<p>Here's my recommendation: Install <strong>Java 25</strong> using <strong>Homebrew</strong> with the <strong>Eclipse Temurin</strong> distribution. Java 25 is the current LTS (Long-Term Support) release and your best choice unless your work team or university course uses an older version. With Homebrew, one terminal command accommodates the entire installation. The Temurin distribution is free, certified, and unencumbered by Oracle's licensing restrictions.</p>
<p>Now I’ll walk you through the process.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ol>
<li><p><a href="#heading-what-you-need-before-you-begin">What You Need Before You Begin</a></p>
</li>
<li><p><a href="#heading-how-to-check-if-java-is-already-installed">How to Check if Java Is Already Installed</a></p>
</li>
<li><p><a href="#heading-why-eclipse-temurin-and-why-not-oracle">Why Eclipse Temurin and Why Not Oracle</a></p>
</li>
<li><p><a href="#heading-how-to-install-java-with-homebrew">How to Install Java with Homebrew</a></p>
</li>
<li><p><a href="#heading-how-to-verify-the-installation">How to Verify the Installation</a></p>
</li>
<li><p><a href="#heading-how-to-set-javahome-for-build-tools">How to Set JAVA_HOME for Build Tools</a></p>
</li>
<li><p><a href="#heading-how-to-troubleshoot-common-problems">How to Troubleshoot Common Problems</a></p>
</li>
<li><p><a href="#heading-alternative-installation-methods">Alternative Installation Methods</a></p>
</li>
<li><p><a href="#heading-whats-next">What's Next</a></p>
</li>
</ol>
<h2 id="heading-what-you-need-before-you-begin">What You Need Before You Begin</h2>
<p>With this recommended path, you only need two things before you install Java: a terminal application and the Homebrew package manager.</p>
<h3 id="heading-terminal">Terminal</h3>
<p>Terminal is the built-in <a href="https://mac.install.guide/terminal/">Mac terminal application</a>. If you don’t know, you can learn <a href="https://mac.install.guide/terminal/open">how to open Terminal here</a>. You'll use it to run the installation commands.</p>
<h3 id="heading-homebrew">Homebrew</h3>
<p>Homebrew is a package manager you can use to install software programs for the command line. Check if you already have it like this:</p>
<pre><code class="language-bash">$ brew --version
Homebrew 5.0.11
</code></pre>
<p>If you see a version number, you're ready. If you see <a href="https://mac.install.guide/homebrew/zsh-command-not-found-brew">zsh: command not found: brew</a> you need to install Homebrew first. Follow the instructions at <a href="https://mac.install.guide/homebrew/3">Install Homebrew</a>.</p>
<h2 id="heading-how-to-check-if-java-is-already-installed">How to Check if Java Is Already Installed</h2>
<p>Run this command to check for an existing Java installation:</p>
<pre><code class="language-bash">$ java -version
</code></pre>
<p>You'll see one of two results.</p>
<p><strong>If Java is installed,</strong> you'll see output like this:</p>
<pre><code class="language-bash">openjdk version "25.0.1" 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-25.0.1+8 (build 25.0.1+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.1+8 (build 25.0.1+8-LTS, mixed mode)
</code></pre>
<p>If the version number shows 25, you already have the latest Java and you can stop here.</p>
<p><strong>If Java is not installed,</strong> you'll see a message, "The operation couldn't be completed. Unable to locate a Java Runtime." You'll need to install Java as described below.</p>
<p>If you previously installed Java but see this dialog, something is wrong with your installation. See <a href="https://mac.install.guide/java/unable-to-locate">Unable to Locate a Java Runtime</a> for troubleshooting. For detailed guidance on Java version output, see <a href="https://mac.install.guide/java/version">Check Java Version on Mac</a>.</p>
<h2 id="heading-why-eclipse-temurin-and-why-not-oracle">Why Eclipse Temurin and Why Not Oracle</h2>
<p>If you search for Java downloads, you'll encounter several potentially confusing terms. Here's what they mean.</p>
<p><strong>JDK</strong> stands for Java Development Kit. It contains the compiler, runtime, and developer tools you need to build and run Java applications. Vendors used to offer a JRE (Java Runtime Environment) for non-developers, but now the JDK does everything.</p>
<p><strong>OpenJDK</strong> is the official open-source implementation of Java. All major Java vendors build from this same source code, so the core functionality is identical across vendors.</p>
<p><strong>Eclipse Temurin</strong> is the distribution many developers recommend. It comes from the Adoptium project and is backed by IBM, Microsoft, Red Hat, and Google, among others. It's completely free for any use, including commercial production. Temurin is TCK-certified, meaning it passes Oracle's official compatibility tests (over 139,000 of them). You can trust that your Java code will run correctly.</p>
<p><strong>Why not Oracle JDK?</strong> Oracle changed its licensing in January 2023. The new model charges per employee across the entire organization, not per Java user. A 500-person company would pay $90,000 per year. Oracle actively audits for compliance.</p>
<p>Temurin is functionally identical to Oracle JDK and is free to use under its open‑source license, avoiding Oracle’s Java subscription fees.</p>
<p>If you deploy to AWS, Amazon Corretto is another good free option. If you need Java 8 for legacy code, Azul Zulu provides well-supported builds. For a comparison of Java distributions, see <a href="https://mac.install.guide/java/jdk">Install JDK on Mac</a>.</p>
<h2 id="heading-how-to-install-java-with-homebrew">How to Install Java with Homebrew</h2>
<p>Homebrew offers two ways to install Java: the cask method and the formula method. The cask method is easier because it installs the vendor's macOS package to the standard system location. Apple's macOS discovers it automatically with no extra configuration.</p>
<p>Run these two commands:</p>
<pre><code class="language-bash">$ brew update
$ brew install --cask temurin@25
</code></pre>
<p>The first command refreshes Homebrew's package list. The second downloads and installs Eclipse Temurin JDK 25.</p>
<p>Homebrew places the JDK at <code>/Library/Java/JavaVirtualMachines/temurin-25.jdk/</code>. This is the standard macOS location for Java installations. Apple's macOS includes a Java launcher at <code>/usr/bin/java</code> that automatically searches this directory. You don't need to configure your PATH.</p>
<p>Homebrew also detects your Mac's chip architecture automatically. You'll get the correct native build whether you have an Apple Silicon or Intel Mac.</p>
<p>For more details about the Homebrew installation process, including the alternative formula method and troubleshooting, see <a href="https://mac.install.guide/java/brew-cask">Brew Install Java, Cask Method</a>.</p>
<h2 id="heading-how-to-verify-the-installation">How to Verify the Installation</h2>
<p>After installation, open a new Terminal window. Existing windows may not detect the new installation.</p>
<p>Check the Java version:</p>
<pre><code class="language-bash">$ java -version
openjdk version "25.0.1" 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-25.0.1+8 (build 25.0.1+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.1+8 (build 25.0.1+8-LTS, mixed mode)
</code></pre>
<p>This confirms three things: the version number (25.0.1), the distribution (Temurin), and that the 64-Bit Server VM is active.</p>
<p>Check the compiler:</p>
<pre><code class="language-bash">$ javac -version
javac 25.0.1
</code></pre>
<p>List all installed JDKs:</p>
<pre><code class="language-bash">$ /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
    25.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 25.0.1" /Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home
</code></pre>
<p>If all three commands produce the expected output, Java is installed and working.</p>
<h2 id="heading-how-to-set-javahome-for-build-tools">How to Set JAVA_HOME for Build Tools</h2>
<p>For most users, Java works immediately after installation. The <code>java</code> and <code>javac</code> commands are available with no additional setup.</p>
<p>However, some build tools require the <code>JAVA_HOME</code> environment variable. Apache Maven, Gradle, and Android SDK all look for it. If you see errors mentioning "JAVA_HOME is not set," you need this step.</p>
<p>If you only run Java applications or use IntelliJ IDEA (which manages Java paths internally), you can skip this section.</p>
<p>Add this line to your <code>~/.zprofile</code> file:</p>
<pre><code class="language-bash">export JAVA_HOME=$(/usr/libexec/java_home)
</code></pre>
<p>This uses Apple's <code>java_home</code> utility to find the installed JDK automatically. After saving the file, you'll need to run <code>source ~/.zprofile</code> or close and reopen your terminal. Verify it works:</p>
<pre><code class="language-bash">\( echo \)JAVA_HOME
/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home
</code></pre>
<p>For complete configuration instructions, see <a href="https://mac.install.guide/java/java-home">Set JAVA_HOME on Mac</a>.</p>
<h2 id="heading-how-to-troubleshoot-common-problems">How to Troubleshoot Common Problems</h2>
<p><strong>"Unable to locate a Java Runtime" message keeps appearing.</strong> Run <code>java -version</code> to verify Java is installed. If you just installed Java, see <a href="https://mac.install.guide/java/unable-to-locate">Unable to Locate a Java Runtime</a>.</p>
<p><strong>Wrong Java version appears.</strong> You have multiple JDKs installed and macOS selected a different one. Run <code>/usr/libexec/java_home -V</code> to list all installed versions. See <a href="https://mac.install.guide/java/java-home">Set JAVA_HOME on Mac</a> to point to the version you want.</p>
<h2 id="heading-alternative-installation-methods">Alternative Installation Methods</h2>
<p>Homebrew is the fastest path, but other options exist.</p>
<ol>
<li><p><strong>Manual download</strong>: You can download the .pkg installer directly from <a href="http://adoptium.net">adoptium.net</a> and double-click to install. This is a good choice if you don't use Homebrew. See <a href="https://mac.install.guide/java/install">Install Java on Mac</a> for detailed instructions.</p>
</li>
<li><p><strong>Homebrew formula.</strong> The command <code>brew install openjdk@25</code> installs a Homebrew-managed build. This approach requires manual symlink configuration before macOS can discover it. See <a href="https://mac.install.guide/java/brew-formula">Brew Install Java, Formula Method</a> for details.</p>
</li>
<li><p><strong>Version managers.</strong> Tools like SDKMAN and mise can install and switch between multiple Java versions per project. If you work on codebases that require different Java versions, see <a href="https://mac.install.guide/java/version-managers">Java Version Managers</a>.</p>
</li>
</ol>
<h2 id="heading-whats-next">What's Next</h2>
<p>You now have Java 25 installed on your Mac. You've verified it works and configured <code>JAVA_HOME</code> for build tools. You're ready to compile and run Java applications.</p>
<p>If your team or university course requires Java 21 instead, see <a href="https://mac.install.guide/java/java-21">Install Java 21 on Mac</a>. If you need to remove Java, see <a href="https://mac.install.guide/java/uninstall">Uninstall Java on Mac</a>.</p>
<p>This article is based on my guides that offer additional details about how to <a href="https://mac.install.guide/java/install">install Java on Mac</a> and choose the <a href="https://mac.install.guide/java/new">latest Java version</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Automate Information Gathering for Ethical Hackers — AutoRecon Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ When you’re doing a penetration test, your first job is to understand the target. Before you touch a single exploit or send a single payload, you need to know what services are running, what ports are open, what technologies are in play, and where th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-automate-information-gathering-for-ethical-hackers-autorecon-tutorial/</link>
                <guid isPermaLink="false">680a540ef12791f5c752af5e</guid>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information gathering ]]>
                    </category>
                
                    <category>
                        <![CDATA[ nmap ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 24 Apr 2025 15:09:02 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745507318904/b27dc949-dbbb-43c2-85e1-072f91f3971f.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When you’re doing a penetration test, your first job is to understand the target.</p>
<p>Before you touch a single exploit or send a single payload, you need to know what services are running, what ports are open, what technologies are in play, and where the weak spots might be.</p>
<p>This phase is called <strong>reconnaissance</strong>. It can eat up hours – sometimes even days – if you’re doing it manually.</p>
<p>That’s where <a target="_blank" href="https://github.com/Tib3rius/AutoRecon"><strong>Autorecon</strong></a> comes in.</p>
<h2 id="heading-what-is-autorecon"><strong>What is AutoRecon?</strong></h2>
<p>Autorecon is a tool that automates most of the initial recon work. It’s not a magic box, but it’s close.</p>
<p>Autorecon takes a list of IPs or domain names and runs a series of predefined scans. Then it organizes the output neatly so you don’t waste time parsing through raw Nmap files or rerunning missed commands.</p>
<p>If you’re just starting out with pentesting – whether you’re on your first TryHackMe box or your tenth OSCP practice lab – Autorecon can save you a ton of time. Let’s break down how it works.</p>
<h2 id="heading-what-exactly-does-autorecon-do"><strong>What Exactly Does Autorecon Do?</strong></h2>
<p>At its core, Autorecon does three things:</p>
<ol>
<li><p><strong>Runs Nmap scans</strong> on each target IP or hostname.</p>
</li>
<li><p><strong>Identifies services</strong> running on open ports.</p>
</li>
<li><p><strong>Runs specific enumeration tools</strong> based on those services.</p>
</li>
</ol>
<p>Let’s say you run it against an IP that has ports 22 (SSH), 80 (HTTP), and 139/445 (SMB) open. Autorecon will:</p>
<ul>
<li><p>Use Nmap to check versions and scripts for each port.</p>
</li>
<li><p>Run <code>nikto</code> or <code>gobuster</code> on port 80.</p>
</li>
<li><p>Run <code>enum4linux</code> or <code>smbmap</code> on SMB.</p>
</li>
<li><p>Store everything in organized folders for later review.</p>
</li>
</ul>
<p>That’s what you’d do manually – but faster, cleaner, and without forgetting steps.</p>
<h2 id="heading-how-to-use-autorecon"><strong>How to Use Autorecon</strong></h2>
<p>Let’s walk through a quick example. Assume you have a target at <code>10.129.8.143</code>.</p>
<p>Here’s the basic command:</p>
<pre><code class="lang-plaintext">autorecon 10.129.8.143
</code></pre>
<p>That’s it. No flags, no extra setup. Autorecon takes care of the rest. To understand what is going on behind the scenes, let's add the verbosity <code>-v</code> flag.</p>
<p>Here is a sample result.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745145447038/9132b17d-417e-464b-894e-fb68256e88f8.webp" alt="Autorecon scan result" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Behind the scenes, it creates a folder structure like this:</p>
<pre><code class="lang-plaintext">results/
├── 10.129.8.143/
│   ├── scans/
│   │   ├── nmap/
│   │   └── gobuster/
│   ├── reports/
│   └── notes.txt
</code></pre>
<p>You’ll find full Nmap outputs, service-specific tool results, and even a place to jot down your own observations. All ready to go.</p>
<p>If you want to scan multiple targets, just pass a list:</p>
<pre><code class="lang-plaintext">autorecon targets.txt
</code></pre>
<p>Once Autorecon completes a scan, go to the <code>results/&lt;IP&gt;/scans/</code> folder. Start with the Nmap outputs.</p>
<p>Look for open ports and services:</p>
<ul>
<li><p><strong>Port 80 open?</strong> Check <code>gobuster</code> and <code>nikto</code> outputs in the HTTP folder.</p>
</li>
<li><p><strong>SMB ports open?</strong> Look in the <code>enum4linux</code> and <code>smbmap</code> results to find shared drives or user info.</p>
</li>
<li><p><strong>FTP anonymous login allowed?</strong> Use that access to explore directories.</p>
</li>
</ul>
<p>These findings will give you the next steps – like browsing a web service, crafting a payload, or checking for known exploits.</p>
<h2 id="heading-why-its-a-big-deal-for-beginners"><strong>Why It’s a Big Deal for Beginners</strong></h2>
<p>If you’re new to pentesting, one of the hardest parts is remembering <em>everything</em> you’re supposed to check. You pop open a port, and you think:</p>
<ul>
<li><p>“Wait… Should I run <code>enum4linux</code> on this?”</p>
</li>
<li><p>“What was that flag for aggressive Nmap scanning again?”</p>
</li>
<li><p>“Did I already check this web service with <code>nikto</code>?”</p>
</li>
</ul>
<p>Autorecon takes that mental load off your shoulders. You can focus on analysis, not babysitting scans.</p>
<p>And here’s another benefit: it helps you <strong>learn the process</strong>.</p>
<p>While Autorecon automates recon, it <em>shows you every tool and command</em> it runs. You can open the raw output, read the flags, and understand <em>why</em> it ran those scans.</p>
<p>Example: You’ll see it runs <code>nmap -sV -sC</code> for version detection and scripts. This helps beginners understand which scans map to which services and why they matter.</p>
<p>As it runs, you’ll see all the tools and commands it’s using. You can look at the raw results, see what worked, and gradually build your own workflow.</p>
<h2 id="heading-what-it-scans-by-default"><strong>What It Scans (By Default)</strong></h2>
<p>Here’s a quick overview of what Autorecon runs based on port and service:</p>
<p><strong>Nmap</strong>:</p>
<ul>
<li><p>Quick scan</p>
</li>
<li><p>Full TCP port scan</p>
</li>
<li><p>Service/version detection</p>
</li>
<li><p>NSE scripts</p>
</li>
</ul>
<p><strong>HTTP/HTTPS</strong>:</p>
<ul>
<li><p><code>gobuster</code> (directory brute-forcing)</p>
</li>
<li><p><code>nikto</code> (vulnerability scanner)</p>
</li>
<li><p><code>whatweb</code> (tech detection)</p>
</li>
</ul>
<p><strong>SMB</strong>:</p>
<ul>
<li><p><code>enum4linux-ng</code></p>
</li>
<li><p><code>smbmap</code></p>
</li>
<li><p>Nmap SMB scripts</p>
</li>
</ul>
<p><strong>FTP</strong>:</p>
<ul>
<li><p>Anonymous login check</p>
</li>
<li><p>Nmap FTP scripts</p>
</li>
</ul>
<p><strong>SSH</strong>:</p>
<ul>
<li><p>Banner grab</p>
</li>
<li><p>SSH version check</p>
</li>
</ul>
<p>And that’s just a slice. It handles other services too, like MySQL, SNMP, SMTP, and even RPC.</p>
<h2 id="heading-when-autorecon-is-most-useful"><strong>When Autorecon Is Most Useful</strong></h2>
<p>Autorecon shines in certain situations:</p>
<ul>
<li><p><strong>Training labs</strong>: You get a clear view of your target with minimal setup.</p>
</li>
<li><p><strong>OSCP preparation</strong>: It runs the exact recon tools you’ll need to use on the OSCP exam.</p>
</li>
<li><p><strong>Time-limited pentests</strong>: When you need to hit multiple targets fast, Autorecon keeps your output consistent and saves you from retyping everything.</p>
</li>
</ul>
<p>But it’s not just about speed. It’s about being thorough. With manual scanning, it’s easy to miss something small. Autorecon doesn’t forget.</p>
<h2 id="heading-what-autorecon-doesnt-do"><strong>What Autorecon Doesn’t Do</strong></h2>
<p>Autorecon isn’t an exploit tool. It doesn’t hack anything for you. It doesn’t guess credentials or bypass login pages.</p>
<p>It’s focused purely on reconnaissance. That means you still have to:</p>
<ul>
<li><p>Review scan results</p>
</li>
<li><p>Analyze web services manually (for example, browse the site, test inputs)</p>
</li>
<li><p>Decide which exploits or payloads to run</p>
</li>
</ul>
<p>Also, it can be noisy. If you’re on a real engagement where stealth matters, some scans might raise alarms. In that case, you’d want to run more controlled commands manually.</p>
<h2 id="heading-tips-for-using-autorecon-effectively"><strong>Tips for Using Autorecon Effectively</strong></h2>
<p><strong>Use flags to control scans:</strong><br>To increase verbosity and skip previously scanned hosts:</p>
<pre><code class="lang-plaintext">autorecon -v --only-scans-dir 10.129.8.143
</code></pre>
<p><strong>Customize wordlists for better results:</strong><br>By default, Autorecon uses small wordlists. You can improve this:</p>
<pre><code class="lang-plaintext">autorecon --dirbuster.wordlist /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt 10.129.8.143
</code></pre>
<p>This makes directory brute-forcing more effective, especially on web targets.</p>
<p><strong>Don’t skip the output</strong>: Read the Nmap files, check the HTML reports. Tools don’t think like humans. You still have to connect the dots.</p>
<h2 id="heading-final-thoughts"><strong>Final Thoughts</strong></h2>
<p>Autorecon doesn’t replace your skills – but it helps supercharge them. Instead of spending 30 minutes typing out scan commands, you can run one command and start analyzing in minutes. This helps beginners stay focused, and it helps pros save time.</p>
<p>So if you’re tired of rerunning the same Nmap scans over and over, or you just want cleaner results and fewer mistakes, let Autorecon do the heavy lifting – so you can focus on the part that really matters: breaking stuff.</p>
<p><em>For more cybersecurity tutorials,</em> <a target="_blank" href="https://newsletter.stealthsecurity.sh/"><strong><em>join our newsletter</em></strong></a><em>. To learn the basics of Offensive Cybersecurity, check out our</em> <a target="_blank" href="https://start.stealthsecurity.sh/"><strong><em>Security Starter Course</em></strong></a><em>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build a Team of AI Agents for Your Website for Free Using Agno and Groq ]]>
                </title>
                <description>
                    <![CDATA[ AI is quickly changing the way we work, and more and more companies are using it to help them get and retain clients. Teams are also using AI to create innovative and responsive websites capable of engaging visitors while also providing helpful infor... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-a-team-of-ai-agents-for-your-website-for-free/</link>
                <guid isPermaLink="false">67eb1b3398e2cf5154940366</guid>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ react js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Andrew Baisden ]]>
                </dc:creator>
                <pubDate>Mon, 31 Mar 2025 22:46:11 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1742397437476/0ffa13b0-c668-40d7-864f-596f523f6101.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>AI is quickly changing the way we work, and more and more companies are using it to help them get and retain clients. Teams are also using AI to create innovative and responsive websites capable of engaging visitors while also providing helpful information.</p>
<p>AI agents are powerful tools for customer services. Having them power your platforms and websites might sound like an expensive proposition with high technical expertise required. But with the emergence of new modern platforms like Agno and Groq, it’s now easier to integrate an AI agent system into your website while still staying within budget.</p>
<p>In this article, you’ll go through the process of developing your own AI agent ecosystem (for free). This will enable you to have a website that can handle customer enquiries, create content, analyse a user's behaviour, and provide custom personal experiences for each user. It's a fantastic setup because you can automate part of your business, speeding up lead generation and freeing up your time to work on more high-priority tasks.</p>
<p>This article is for developers who are familiar with JavaScript, React, and Python. Even if you don’t have a complete understanding of all three, as long as you are a beginner or junior with some knowledge, you should be able to understand at least some of the code. For example, JavaScript and Python are pretty similar syntax-wise, so if you have experience with either of them, then just reading through the codebase will give you an idea of how everything works.</p>
<p>For this tutorial, we’ll build a portfolio website. But you can use the ideas and concepts you learn here for any type of website, regardless of whether you are a solo entrepreneur or part of a large company. With these tools and frameworks, it's possible to transform your web presence without going over budget.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#prerequisites">Prerequisites</a></p>
</li>
<li><p><a class="post-section-overview" href="#what-are-ai-agents">What Are AI Agents?</a></p>
</li>
<li><p><a class="post-section-overview" href="#what-are-agno-and-groq-cloud">What Are Agno and Groq Cloud?</a></p>
</li>
<li><p><a class="post-section-overview" href="#what-you-will-be-building">What You Will Be Building</a></p>
</li>
<li><p><a class="post-section-overview" href="#building-our-python-backend">Building Our Python Backend</a></p>
<ul>
<li><p><a class="post-section-overview" href="#creating-an-account-on-groq-cloud">Creating an Account on Groq Cloud</a></p>
</li>
<li><p><a class="post-section-overview" href="#setting-up-our-python-project">Setting Up Our Python Project</a></p>
</li>
<li><p><a class="post-section-overview" href="#working-on-the-python-codebase">Working on the Python Codebase</a></p>
</li>
<li><p><a class="post-section-overview" href="#running-our-python-backend">Running Our Python Backend</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#building-our-react-frontend">Building Our React Frontend</a></p>
</li>
<li><p><a class="post-section-overview" href="#conclusion">Conclusion</a></p>
</li>
<li><p><a class="post-section-overview" href="#stay-up-to-date-with-tech-programming-productivity-and-ai">Stay Up to Date with Tech, Programming, Productivity, and AI</a></p>
</li>
</ul>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li><p>Prior knowledge of JavaScript, React, and Python</p>
</li>
<li><p><a target="_blank" href="https://www.python.org/">Python</a> installed and setup locally on your computer</p>
</li>
<li><p>An account on <a target="_blank" href="https://groq.com/">Groq Cloud</a></p>
</li>
<li><p>A code editor/IDE installed like <a target="_blank" href="https://www.cursor.com/en">Cursor</a>, <a target="_blank" href="https://codeium.com/windsurf">Windsurf</a>, or <a target="_blank" href="https://code.visualstudio.com/">VS Code</a></p>
</li>
</ul>
<h2 id="heading-what-are-ai-agents">What Are AI Agents?</h2>
<p>AI agents are computer systems or programs that are designed to use artificial intelligence to interact with their world and achieve certain objectives. They are able to perceive their world – through sensors, user input, or data – and act to achieve goals, typically with some degree of autonomy. This means that they will decide things for themselves, sometimes with little to no human intervention, depending on how they were designed.</p>
<h2 id="heading-what-are-agno-and-groq-cloud">What are Agno and Groq Cloud?</h2>
<p>Agno is a lightweight library that lets you build Multimodal Agents. It’s an AI inference engine designed to optimise LLMs for speed and performance. This means it can provide super-fast AI model inference with reduced latency and improved resource utilisation. It has the potential to replace current inference platforms like NVIDIA TensorRT or Hugging Face's Text Generation Inference (TGI).</p>
<p>Groq Cloud is a cloud-based AI inference platform based on Groq LPU (Language Processing Unit) chips, which are optimised for ultra-low-latency AI workloads. Groq is great at high-speed token generation rates, making it perfect for real-time AI applications like chatbots, AI coding help, and other latency-sensitive workloads. The Groq Cloud platform offers free access to its large language models (LLMs) through a free tier, but there are some usage limits.</p>
<p>If you go to the <a target="_blank" href="https://console.groq.com/playground">Groq Cloud Playground</a> you can find LLM models from different companies like:</p>
<ul>
<li><p>Qwen</p>
</li>
<li><p>DeepSeek R1</p>
</li>
<li><p>Google Gemma 2</p>
</li>
<li><p>Hugging Face</p>
</li>
<li><p>Meta llama</p>
</li>
<li><p>Mistral AI</p>
</li>
<li><p>OpenAI</p>
</li>
</ul>
<p>This is great because Groq Cloud gives us the flexibility to choose from any of these AI LLM models for our AI agent application. Agno basically acts as the orchestration layer for multiple AI agents. In our case, that would be WelcomeAgent, ProjectAgent, CareerAgent, BusinessAdvisor and ResearchAgent.</p>
<p>The platform is able to manage their conversations, task delegation, and memory. When any of our AI agents need to reason or generate output, Agno then uses Groq Cloud, which can run large language models (LLMs), and it does this with ultra-low latency. The advantage to this is that it ensures that it has fast and efficient responses. Groq Cloud itself is not an LLM – rather, it is a high-performance inference engine which hosts and serves LLMs from lots of different providers.</p>
<p>For this project, we will use Meta’s LLaMA 3 model because it strikes a strong balance between performance and accuracy and is openly accessible. This means that it is well-suited for the AI agents in our portfolio website.</p>
<p>It's worth mentioning that we could have used the LLaMA model from <a target="_blank" href="http://llama.com">llama.com</a>. Still, instead we will use it via Groq Cloud, because, this way, we get better optimisation, more capabilities, and better-quality responses for each AI agent. This is because Groq Cloud gives us the flexibility to test and choose between different AI models if we wish to do so, and that means that we can get the best one for our needs.</p>
<h2 id="heading-what-you-will-be-building">What You Will Be Building</h2>
<p>Today, you will be building a portfolio website that incorporates AI agents with which anyone can interact. These AI agents are like customer service representatives because anyone can ask them questions about your skills and portfolio, and they will provide the person with information.</p>
<p>This is great because it means that potential clients can learn anything about you 24/7 without having actually to talk to you when you are unavailable. You could even use this portfolio as a template for building your portfolio website or as inspiration for creating one.</p>
<p>In total, there will be five AI agents on your portfolio website:</p>
<ul>
<li><p>WelcomeAgent: a specialist in helping users navigate the website, whether the user is an employer, client, or fellow programmer</p>
</li>
<li><p>ProjectAgent: a project specialist that can provide information about projects, technology, and challenges</p>
</li>
<li><p>CareerAgent: a career specialist that can provide information about skills, experience, and professional background</p>
</li>
<li><p>BusinessAdvisor: a client specialist that can provide information about services, pricing, and project details</p>
</li>
<li><p>ResearchAgent: a research specialist that can provide information about technology, trends, and industry news</p>
</li>
</ul>
<p>The massive benefit of incorporating AI agents into a portfolio website is that they can create a personalised experience by providing an interactive experience which is tailor-made and not as easily replicated on other, more generic websites.</p>
<p>This can set your website apart because, as opposed to having a static website for showcasing your talent, an AI agent is capable of guiding visitors, answering queries about your projects, and recommending relevant work based on an interest.</p>
<p>Another great feature is the ability to simulate a conversation, which can make the portfolio feel more dynamic, engaging, and immersive while also demonstrating how good you are at working with modern tooling.</p>
<p>All of this combined provides you with a practical and approachable way to explore AI agents. This can be a real-world example and a personal project that does not require the implementation of a full-scale business application to see how valuable this type of concept can be.</p>
<p>The website will have the following six pages:</p>
<ul>
<li><p>Home – the main webpage</p>
</li>
<li><p>Projects – showcasing some featured projects and technical skills</p>
</li>
<li><p>Career – showing skills, experience, education, and certifications</p>
</li>
<li><p>Services – client services and the engagement process</p>
</li>
<li><p>Research – a way to search the web regarding the tech industry</p>
</li>
<li><p>Contact – a page with a form to contact the user</p>
</li>
</ul>
<p>You can see what your frontend React application will look like below:</p>
<p>First, you have your portfolio homepage:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977313487/4ac8fd65-4d3a-4da1-80b8-4b4ff5136e7e.png" alt="AI Portfolio Home Page" class="image--center mx-auto" width="2538" height="2668" loading="lazy"></p>
<p>Next is your Projects page:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977426609/1c05544d-5255-40c2-85da-d072c8ecd6fc.png" alt="AI Portfolio Projects Page" class="image--center mx-auto" width="2492" height="2656" loading="lazy"></p>
<p>Now you have your Career page:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977482985/ce61c17e-d948-49b5-83fa-7a77556796b5.png" alt="AI Portfolio Career Page" class="image--center mx-auto" width="2478" height="2664" loading="lazy"></p>
<p>Then you have the Services page:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977517562/45614042-68b1-466a-9c43-b5f6aa5fde26.png" alt="AI Portfolio Services Page" class="image--center mx-auto" width="2488" height="2666" loading="lazy"></p>
<p>Then you can see your Research and Insights page:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977558018/c2c083be-bd9a-4fac-9713-ff6c895d0cb0.png" alt="AI Portfolio Research &amp; Insights Page" class="image--center mx-auto" width="2512" height="2664" loading="lazy"></p>
<p>Lastly, you have your Contact page:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977630020/3c73726a-7de2-46af-a474-ce03fa3ace7b.png" alt="AI Contact Me Page" class="image--center mx-auto" width="2498" height="2654" loading="lazy"></p>
<p>Now, let's begin building your application, starting with the Python Backend.</p>
<h2 id="heading-building-our-python-backend">Building Our Python Backend</h2>
<p>For this tutorial I will be using macOS, and the commands should also work on Linux. If you’re a Windows user, most of the commands should work (although there are some differences like activating a Python environment). You can find the correct commands by searching if need be – and you’ll know if your terminal gives you errors when trying to run a command.</p>
<h3 id="heading-creating-an-account-on-groq-cloud">Creating An Account On Groq Cloud</h3>
<p>As mentioned earlier, we will use Meta’s LLaMA 3 via Groq Cloud, which is ideal. So, first, we have to create an account on <a target="_blank" href="https://console.groq.com/login">Groq Cloud</a>, as shown here.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977123301/80f8a1a6-de52-4a3d-870a-25c1067c13eb.png" alt="Creating an account on Groq Cloud" class="image--center mx-auto" width="2052" height="1350" loading="lazy"></p>
<p>Once you have created an account on Groq Cloud, go to the API Keys page and create an API Key as shown in this example. I gave mine the name <code>team-ai-agents</code>:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977205655/7c7dcc3e-685b-4383-b80a-4d8088be7d2d.png" alt="Creating a Groq Cloud API Key" class="image--center mx-auto" width="1498" height="321" loading="lazy"></p>
<p>You should have an API Key that looks like this example, so make sure that you save it somewhere safe – we will need it later.</p>
<pre><code class="lang-shell">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
</code></pre>
<h3 id="heading-setting-up-our-python-project">Setting Up Our Python Project</h3>
<p>Ok, now let's quickly set up our project. Navigate to a location on your computer, like the desktop, and create a folder called <code>ai-agent-app</code>. <code>cd</code> into the project folder and get ready – we’re going to start building our backend using Python.</p>
<p>I recommend installing <code>agno</code> and <code>groq</code> locally in a Python virtual environment. First, use this terminal command to setup a Python virtual environment inside of your <code>ai-agent-app</code> folder:</p>
<pre><code class="lang-shell">python3 -m venv venv
source venv/bin/activate
cd venv
</code></pre>
<p>Note: depending on your local Python environment, you might need to use either the <code>python</code> or <code>python3</code> command for running Python commands. In my environment and examples, I use <code>python3</code>, so adjust the command to suit your needs.</p>
<p>The same applies when using either <code>pip</code> or <code>pip3</code> when installing Python packages. You can check to see which version of Python and pip you have installed with the <code>python --version</code>, <code>python3 --version</code> , <code>pip --version</code> and <code>pip3 --version</code> commands in your terminal window.</p>
<p>The above command should create a <code>venv</code> folder inside of your <code>ai-agent-app</code> folder. This will be your REST backend with all of your API endpoints which your React frontend will use later on in this tutorial. Your Python virtual environment has also been activated.</p>
<p>To activate and deactivate your Python environment, you can use these commands:</p>
<pre><code class="lang-shell"># Activate on macOS/Linux
source venv/bin/activate

# Activate on Windows
venv\Scripts\activate

# Deactivate works on all platforms
conda deactivate
</code></pre>
<p>At this point, its a good idea to open the project in your code editor. Now you’ll need to install <code>agno</code> and <code>groq</code> using <code>pip</code> alongside a few other packages: <code>flask</code>, <code>requests</code>, and <code>python-dotenv</code>. You need these packages for setting up your server environment, so go ahead and install them all with this command:</p>
<pre><code class="lang-shell">pip install agno
pip install groq
pip install flask
pip install flask_cors
pip install requests
pip install python-dotenv
</code></pre>
<p>With these Python packages installed, you’re now ready to set up your API for this project. We’ll be using the Python web application framework Flask, along with the CORS package so that we can access the server anywhere. At the same time, we’ll also use the requests module, which allows us to send HTTP requests using Python.</p>
<p>Note that you’ll also need a <code>.env</code> file for your API keys, so make sure you have installed the <code>python-dotenv</code> package in your Python environment, although in some cases, it's installed automatically.</p>
<h3 id="heading-working-on-the-python-codebase">Working On The Python Codebase</h3>
<p>Alright, time to make a start on the codebase. But first, let's generate all of the files for your project. You can do this simply by running the run script I created for the project. Run this command in the <code>venv</code> folder:</p>
<pre><code class="lang-shell">mkdir agents
touch .env main.py
cd agents
touch __init__.py base_agent.py career_agent.py client_agent.py project_agent.py research_agent.py welcome_agent.py
</code></pre>
<p>With this script, you should now have:</p>
<ul>
<li><p>Created a <code>.env</code> file for your API Keys</p>
</li>
<li><p>Created an agents folder with all of the files for creating your different AI agents</p>
</li>
<li><p>Created a <code>main.py</code> file, which will be the main project file for your entire backend app</p>
</li>
</ul>
<p>Ok, your files are set. All that’s left is to add the codebase, and the backend is complete. Let's start with the <code>.env</code> file, as it only needs one line of code and that is for your API key. See my example and update it with your own API Key:</p>
<pre><code class="lang-shell">GROQ_API_KEY="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"
</code></pre>
<p>Your application now has an API key, which gives you access to Groq Cloud. Now let’s start to add the code for all the various AI agents. The first file we’ll work on will be the <code>__init__.py</code> which holds the imports for all of the AI agent files.</p>
<p>Add this code to the file:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agents.welcome_agent <span class="hljs-keyword">import</span> WelcomeAgent
<span class="hljs-keyword">from</span> agents.project_agent <span class="hljs-keyword">import</span> ProjectAgent
<span class="hljs-keyword">from</span> agents.career_agent <span class="hljs-keyword">import</span> CareerAgent
<span class="hljs-keyword">from</span> agents.client_agent <span class="hljs-keyword">import</span> ClientAgent
<span class="hljs-keyword">from</span> agents.research_agent <span class="hljs-keyword">import</span> ResearchAgent

<span class="hljs-comment"># Export all agents</span>
__all__ = [<span class="hljs-string">'WelcomeAgent'</span>, <span class="hljs-string">'ProjectAgent'</span>, <span class="hljs-string">'CareerAgent'</span>, <span class="hljs-string">'ClientAgent'</span>, <span class="hljs-string">'ResearchAgent'</span>]
</code></pre>
<p>As you can see, all of the classes for the AI agents will be imported and exported from here so you can use them in your <code>main.py</code> file later.</p>
<p>Ok, good. Now, we have 6 AI agent files to work on, beginning with the <code>base_agent.py</code> file.</p>
<p>Make sure that you add this code to the file:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agno.agent <span class="hljs-keyword">import</span> Agent
<span class="hljs-keyword">from</span> agno.models.groq <span class="hljs-keyword">import</span> Groq
<span class="hljs-keyword">import</span> os


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BaseAgent</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, name, description, avatar=<span class="hljs-string">"default_avatar.png"</span></span>):</span>

        self.name = name
        self.description = description
        self.avatar = avatar
        self.model = Groq(id=<span class="hljs-string">"llama-3.3-70b-versatile"</span>)
        self.agent = Agent(model=self.model, markdown=<span class="hljs-literal">True</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_response</span>(<span class="hljs-params">self, query, stream=False</span>):</span>

        <span class="hljs-keyword">return</span> self.agent.get_response(query, stream=stream)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">print_response</span>(<span class="hljs-params">self, query, stream=True</span>):</span>

        <span class="hljs-keyword">return</span> self.agent.print_response(query, stream=stream)
</code></pre>
<p>This class uses the <code>agno</code> framework to create AI agents powered by Groq's LLama 3.3 70B model, which is free to use with some usage restrictions for API calls. This should be fine for your project. It provides the basic structure that other specialised agents in the application can inherit from and extend with domain-specific functionality.</p>
<p>The model we chose is available on the Groq Cloud platform, and we can change it if we want to. Each model has pros and cons, and a cut-off date for how up-to-date it is, so you can expect to get different results. Just keep in mind that using an up to date LLM like OpenAI will provide better results, but you might have to pay for it.</p>
<p>The next file we will work on will be the <code>career_agent.py</code> file.</p>
<p>And this is this code required for it:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agents.base_agent <span class="hljs-keyword">import</span> BaseAgent


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">CareerAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            name=<span class="hljs-string">"CareerGuide"</span>,
            description=<span class="hljs-string">"I'm the career specialist. I can provide information about skills, experience, and job suitability."</span>,
            avatar=<span class="hljs-string">"career_avatar.png"</span>
        )

        self.skills = {
            <span class="hljs-string">"languages"</span>: [<span class="hljs-string">"Python"</span>, <span class="hljs-string">"JavaScript"</span>, <span class="hljs-string">"TypeScript"</span>, <span class="hljs-string">"Java"</span>, <span class="hljs-string">"SQL"</span>],
            <span class="hljs-string">"frameworks"</span>: [<span class="hljs-string">"React"</span>, <span class="hljs-string">"Vue.js"</span>, <span class="hljs-string">"Node.js"</span>, <span class="hljs-string">"Django"</span>, <span class="hljs-string">"Flask"</span>, <span class="hljs-string">"Spring Boot"</span>],
            <span class="hljs-string">"tools"</span>: [<span class="hljs-string">"Git"</span>, <span class="hljs-string">"Docker"</span>, <span class="hljs-string">"AWS"</span>, <span class="hljs-string">"Azure"</span>, <span class="hljs-string">"CI/CD"</span>, <span class="hljs-string">"Kubernetes"</span>],
            <span class="hljs-string">"soft_skills"</span>: [<span class="hljs-string">"Team leadership"</span>, <span class="hljs-string">"Project management"</span>, <span class="hljs-string">"Agile methodologies"</span>, <span class="hljs-string">"Technical writing"</span>, <span class="hljs-string">"Client communication"</span>]
        }

        self.experience = [
            {
                <span class="hljs-string">"title"</span>: <span class="hljs-string">"Senior Full Stack Developer"</span>,
                <span class="hljs-string">"company"</span>: <span class="hljs-string">"Tech Innovations Inc."</span>,
                <span class="hljs-string">"period"</span>: <span class="hljs-string">"2020-Present"</span>,
                <span class="hljs-string">"responsibilities"</span>: [
                    <span class="hljs-string">"Led development of cloud-based SaaS platform"</span>,
                    <span class="hljs-string">"Managed team of 5 developers"</span>,
                    <span class="hljs-string">"Implemented CI/CD pipeline reducing deployment time by 40%"</span>,
                    <span class="hljs-string">"Architected microservices infrastructure"</span>
                ]
            },
            {
                <span class="hljs-string">"title"</span>: <span class="hljs-string">"Full Stack Developer"</span>,
                <span class="hljs-string">"company"</span>: <span class="hljs-string">"WebSolutions Co."</span>,
                <span class="hljs-string">"period"</span>: <span class="hljs-string">"2017-2020"</span>,
                <span class="hljs-string">"responsibilities"</span>: [
                    <span class="hljs-string">"Developed responsive web applications using React and Node.js"</span>,
                    <span class="hljs-string">"Implemented RESTful APIs and database schemas"</span>,
                    <span class="hljs-string">"Collaborated with UX/UI designers to implement user-friendly interfaces"</span>,
                    <span class="hljs-string">"Participated in code reviews and mentored junior developers"</span>
                ]
            },
            {
                <span class="hljs-string">"title"</span>: <span class="hljs-string">"Junior Developer"</span>,
                <span class="hljs-string">"company"</span>: <span class="hljs-string">"StartUp Labs"</span>,
                <span class="hljs-string">"period"</span>: <span class="hljs-string">"2015-2017"</span>,
                <span class="hljs-string">"responsibilities"</span>: [
                    <span class="hljs-string">"Built and maintained client websites"</span>,
                    <span class="hljs-string">"Developed custom WordPress plugins"</span>,
                    <span class="hljs-string">"Implemented responsive designs and cross-browser compatibility"</span>,
                    <span class="hljs-string">"Assisted in database design and optimization"</span>
                ]
            }
        ]

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_skills_summary</span>(<span class="hljs-params">self</span>):</span>

        prompt = <span class="hljs-string">f"""
        Generate a professional summary of the following skills for a portfolio website:

        Programming Languages: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(self.skills[<span class="hljs-string">'languages'</span>])}</span>
        Frameworks &amp; Libraries: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(self.skills[<span class="hljs-string">'frameworks'</span>])}</span>
        Tools &amp; Platforms: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(self.skills[<span class="hljs-string">'tools'</span>])}</span>
        Soft Skills: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(self.skills[<span class="hljs-string">'soft_skills'</span>])}</span>

        Format the response in markdown with appropriate sections and highlights.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_experience_summary</span>(<span class="hljs-params">self</span>):</span>

        experience_text = <span class="hljs-string">"# Work Experience\n\n"</span>
        <span class="hljs-keyword">for</span> job <span class="hljs-keyword">in</span> self.experience:
            experience_text += <span class="hljs-string">f"## <span class="hljs-subst">{job[<span class="hljs-string">'title'</span>]}</span> at <span class="hljs-subst">{job[<span class="hljs-string">'company'</span>]}</span>\n"</span>
            experience_text += <span class="hljs-string">f"**<span class="hljs-subst">{job[<span class="hljs-string">'period'</span>]}</span>**\n\n"</span>
            experience_text += <span class="hljs-string">"**Responsibilities:**\n"</span>
            <span class="hljs-keyword">for</span> resp <span class="hljs-keyword">in</span> job[<span class="hljs-string">'responsibilities'</span>]:
                experience_text += <span class="hljs-string">f"- <span class="hljs-subst">{resp}</span>\n"</span>
            experience_text += <span class="hljs-string">"\n"</span>

        prompt = <span class="hljs-string">f"""
        Based on the following work experience, generate a professional career summary for a portfolio website:

        <span class="hljs-subst">{experience_text}</span>

        Highlight career progression, key achievements, and growth. Format the response in markdown.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">assess_job_fit</span>(<span class="hljs-params">self, job_description</span>):</span>

        skills_flat = []
        <span class="hljs-keyword">for</span> skill_category <span class="hljs-keyword">in</span> self.skills.values():
            skills_flat.extend(skill_category)

        experience_flat = []
        <span class="hljs-keyword">for</span> job <span class="hljs-keyword">in</span> self.experience:
            experience_flat.extend(job[<span class="hljs-string">'responsibilities'</span>])

        prompt = <span class="hljs-string">f"""
        Assess the fit for the following job description based on the skills and experience provided:

        Job Description:
        <span class="hljs-subst">{job_description}</span>

        Skills:
        <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(skills_flat)}</span>

        Experience:
        <span class="hljs-subst">{<span class="hljs-string">' '</span>.join(experience_flat)}</span>

        Provide an analysis of strengths, potential gaps, and overall suitability for the role. Format the response in markdown.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)
</code></pre>
<p>This agent is designed to help users with career-related tasks such as:</p>
<ul>
<li><p>Creating professional summaries of technical and soft skills</p>
</li>
<li><p>Generating career narratives based on work experience</p>
</li>
<li><p>Evaluating job fit by comparing skills and experience against job descriptions</p>
</li>
</ul>
<p>The agent uses the LLM capabilities of the base agent (using Groq's LLama 3.3 70B model) to generate natural language responses that are formatted in markdown, making them suitable for inclusion in portfolio websites, résumés, or job applications. This file has sample career data, and in a real implementation, this would come from a database</p>
<p>Ok time for the next AI agent – this time it’s <code>client_agent.py</code>, which receives this code:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agents.base_agent <span class="hljs-keyword">import</span> BaseAgent


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ClientAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            name=<span class="hljs-string">"BusinessAdvisor"</span>,
            description=<span class="hljs-string">"I'm the client specialist. I can provide information about services, pricing, and project details."</span>,
            avatar=<span class="hljs-string">"client_avatar.png"</span>
        )

        self.services = {
            <span class="hljs-string">"web_development"</span>: {
                <span class="hljs-string">"name"</span>: <span class="hljs-string">"Web Development"</span>,
                <span class="hljs-string">"description"</span>: <span class="hljs-string">"Custom web application development using modern frameworks and best practices."</span>,
                <span class="hljs-string">"pricing_model"</span>: <span class="hljs-string">"Project-based or hourly"</span>,
                <span class="hljs-string">"price_range"</span>: <span class="hljs-string">"$5,000 - $50,000 depending on complexity"</span>,
                <span class="hljs-string">"timeline"</span>: <span class="hljs-string">"4-12 weeks depending on scope"</span>,
                <span class="hljs-string">"technologies"</span>: [<span class="hljs-string">"React"</span>, <span class="hljs-string">"Vue.js"</span>, <span class="hljs-string">"Node.js"</span>, <span class="hljs-string">"Django"</span>, <span class="hljs-string">"Flask"</span>]
            },
            <span class="hljs-string">"mobile_development"</span>: {
                <span class="hljs-string">"name"</span>: <span class="hljs-string">"Mobile App Development"</span>,
                <span class="hljs-string">"description"</span>: <span class="hljs-string">"Native and cross-platform mobile application development for iOS and Android."</span>,
                <span class="hljs-string">"pricing_model"</span>: <span class="hljs-string">"Project-based"</span>,
                <span class="hljs-string">"price_range"</span>: <span class="hljs-string">"$8,000 - $60,000 depending on complexity"</span>,
                <span class="hljs-string">"timeline"</span>: <span class="hljs-string">"6-16 weeks depending on scope"</span>,
                <span class="hljs-string">"technologies"</span>: [<span class="hljs-string">"React Native"</span>, <span class="hljs-string">"Flutter"</span>, <span class="hljs-string">"Swift"</span>, <span class="hljs-string">"Kotlin"</span>]
            },
            <span class="hljs-string">"consulting"</span>: {
                <span class="hljs-string">"name"</span>: <span class="hljs-string">"Technical Consulting"</span>,
                <span class="hljs-string">"description"</span>: <span class="hljs-string">"Expert advice on architecture, technology stack, and development practices."</span>,
                <span class="hljs-string">"pricing_model"</span>: <span class="hljs-string">"Hourly"</span>,
                <span class="hljs-string">"price_range"</span>: <span class="hljs-string">"$150 - $250 per hour"</span>,
                <span class="hljs-string">"timeline"</span>: <span class="hljs-string">"Ongoing or as needed"</span>,
                <span class="hljs-string">"technologies"</span>: [<span class="hljs-string">"Various based on client needs"</span>]
            }
        }

        self.process = [
            <span class="hljs-string">"Initial consultation to understand requirements"</span>,
            <span class="hljs-string">"Proposal and quote preparation"</span>,
            <span class="hljs-string">"Contract signing and project kickoff"</span>,
            <span class="hljs-string">"Design and prototyping phase"</span>,
            <span class="hljs-string">"Development sprints with regular client feedback"</span>,
            <span class="hljs-string">"Testing and quality assurance"</span>,
            <span class="hljs-string">"Deployment and launch"</span>,
            <span class="hljs-string">"Post-launch support and maintenance"</span>
        ]

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_services_overview</span>(<span class="hljs-params">self</span>):</span>

        services_text = <span class="hljs-string">"# Services Offered\n\n"</span>
        <span class="hljs-keyword">for</span> service_id, service <span class="hljs-keyword">in</span> self.services.items():
            services_text += <span class="hljs-string">f"## <span class="hljs-subst">{service[<span class="hljs-string">'name'</span>]}</span>\n"</span>
            services_text += <span class="hljs-string">f"<span class="hljs-subst">{service[<span class="hljs-string">'description'</span>]}</span>\n\n"</span>
            services_text += <span class="hljs-string">f"**Pricing Model**: <span class="hljs-subst">{service[<span class="hljs-string">'pricing_model'</span>]}</span>\n"</span>
            services_text += <span class="hljs-string">f"**Price Range**: <span class="hljs-subst">{service[<span class="hljs-string">'price_range'</span>]}</span>\n"</span>
            services_text += <span class="hljs-string">f"**Timeline**: <span class="hljs-subst">{service[<span class="hljs-string">'timeline'</span>]}</span>\n"</span>
            services_text += <span class="hljs-string">f"**Technologies**: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(service[<span class="hljs-string">'technologies'</span>])}</span>\n\n"</span>

        prompt = <span class="hljs-string">f"""
        Generate a professional overview of the following services for a programmer's portfolio website:

        <span class="hljs-subst">{services_text}</span>

        Format the response in markdown with appropriate sections and highlights.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_service_details</span>(<span class="hljs-params">self, service_id</span>):</span>

        <span class="hljs-keyword">if</span> service_id <span class="hljs-keyword">in</span> self.services:
            service = self.services[service_id]
            prompt = <span class="hljs-string">f"""
            Generate a detailed description for the following service:

            Service Name: <span class="hljs-subst">{service[<span class="hljs-string">'name'</span>]}</span>
            Description: <span class="hljs-subst">{service[<span class="hljs-string">'description'</span>]}</span>
            Pricing Model: <span class="hljs-subst">{service[<span class="hljs-string">'pricing_model'</span>]}</span>
            Price Range: <span class="hljs-subst">{service[<span class="hljs-string">'price_range'</span>]}</span>
            Timeline: <span class="hljs-subst">{service[<span class="hljs-string">'timeline'</span>]}</span>
            Technologies: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(service[<span class="hljs-string">'technologies'</span>])}</span>

            Include information about the value proposition, typical deliverables, and client benefits. Format the response in markdown.
            """</span>
            <span class="hljs-keyword">return</span> self.get_response(prompt)
        <span class="hljs-keyword">else</span>:
            <span class="hljs-keyword">return</span> <span class="hljs-string">"Service not found. Please check the service ID and try again."</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">explain_process</span>(<span class="hljs-params">self</span>):</span>

        process_text = <span class="hljs-string">"# Client Engagement Process\n\n"</span>
        <span class="hljs-keyword">for</span> i, step <span class="hljs-keyword">in</span> enumerate(self.process, <span class="hljs-number">1</span>):
            process_text += <span class="hljs-string">f"## Step <span class="hljs-subst">{i}</span>: <span class="hljs-subst">{step}</span>\n\n"</span>

        prompt = <span class="hljs-string">f"""
        Based on the following client engagement process, generate a detailed explanation for potential clients:

        <span class="hljs-subst">{process_text}</span>

        For each step, provide a brief explanation of what happens, what the client can expect, and any deliverables. Format the response in markdown.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">generate_proposal</span>(<span class="hljs-params">self, project_description</span>):</span>

        prompt = <span class="hljs-string">f"""
        Generate a professional project proposal based on the following client requirements:

        Project Description:
        <span class="hljs-subst">{project_description}</span>

        Include the following sections:
        1. Project Understanding
        2. Proposed Approach
        3. Estimated Timeline
        4. Estimated Budget Range
        5. Next Steps

        Base your proposal on the services and processes described in the portfolio. Format the response in markdown.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)
</code></pre>
<p>This agent is designed to help users with client and business-related tasks such as:</p>
<ul>
<li><p>Providing overviews of available services for marketing materials</p>
</li>
<li><p>Generating detailed service descriptions for specific offerings</p>
</li>
<li><p>Explaining the client engagement process to potential clients</p>
</li>
<li><p>Creating customised project proposals based on client requirements</p>
</li>
</ul>
<p>The agent also uses the LLM capabilities of the base agent (using Groq's LLama 3.3 70B model) to generate professional, business-oriented content formatted in markdown. Like before, this file also has sample service data.</p>
<p>Now we can start to work on the <code>project_agent.py</code> file and add this code to its codebase:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agents.base_agent <span class="hljs-keyword">import</span> BaseAgent


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ProjectAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            name=<span class="hljs-string">"TechExpert"</span>,
            description=<span class="hljs-string">"I'm the project specialist. I can provide detailed information about any project in this portfolio."</span>,
            avatar=<span class="hljs-string">"project_avatar.png"</span>
        )

        self.projects = {
            <span class="hljs-string">"project1"</span>: {
                <span class="hljs-string">"name"</span>: <span class="hljs-string">"E-commerce Platform"</span>,
                <span class="hljs-string">"tech_stack"</span>: [<span class="hljs-string">"React"</span>, <span class="hljs-string">"Node.js"</span>, <span class="hljs-string">"MongoDB"</span>, <span class="hljs-string">"Express"</span>],
                <span class="hljs-string">"description"</span>: <span class="hljs-string">"A full-stack e-commerce platform with user authentication, product catalog, shopping cart, and payment processing."</span>,
                <span class="hljs-string">"highlights"</span>: [<span class="hljs-string">"Responsive design"</span>, <span class="hljs-string">"RESTful API"</span>, <span class="hljs-string">"Stripe integration"</span>, <span class="hljs-string">"JWT authentication"</span>],
                <span class="hljs-string">"github_link"</span>: <span class="hljs-string">"https://github.com/username/ecommerce-platform"</span>,
                <span class="hljs-string">"demo_link"</span>: <span class="hljs-string">"https://ecommerce-demo.example.com"</span>
            },
            <span class="hljs-string">"project2"</span>: {
                <span class="hljs-string">"name"</span>: <span class="hljs-string">"Task Management App"</span>,
                <span class="hljs-string">"tech_stack"</span>: [<span class="hljs-string">"Vue.js"</span>, <span class="hljs-string">"Firebase"</span>, <span class="hljs-string">"Tailwind CSS"</span>],
                <span class="hljs-string">"description"</span>: <span class="hljs-string">"A real-time task management application with collaborative features, notifications, and progress tracking."</span>,
                <span class="hljs-string">"highlights"</span>: [<span class="hljs-string">"Real-time updates"</span>, <span class="hljs-string">"User collaboration"</span>, <span class="hljs-string">"Drag-and-drop interface"</span>, <span class="hljs-string">"Progressive Web App"</span>],
                <span class="hljs-string">"github_link"</span>: <span class="hljs-string">"https://github.com/username/task-manager"</span>,
                <span class="hljs-string">"demo_link"</span>: <span class="hljs-string">"https://taskmanager-demo.example.com"</span>
            },
            <span class="hljs-string">"project3"</span>: {
                <span class="hljs-string">"name"</span>: <span class="hljs-string">"Data Visualization Dashboard"</span>,
                <span class="hljs-string">"tech_stack"</span>: [<span class="hljs-string">"Python"</span>, <span class="hljs-string">"Django"</span>, <span class="hljs-string">"D3.js"</span>, <span class="hljs-string">"PostgreSQL"</span>],
                <span class="hljs-string">"description"</span>: <span class="hljs-string">"An interactive dashboard for visualizing complex datasets with filtering, sorting, and export capabilities."</span>,
                <span class="hljs-string">"highlights"</span>: [<span class="hljs-string">"Interactive charts"</span>, <span class="hljs-string">"Data filtering"</span>, <span class="hljs-string">"CSV/PDF export"</span>, <span class="hljs-string">"Responsive design"</span>],
                <span class="hljs-string">"github_link"</span>: <span class="hljs-string">"https://github.com/username/data-dashboard"</span>,
                <span class="hljs-string">"demo_link"</span>: <span class="hljs-string">"https://dataviz-demo.example.com"</span>
            }
        }

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_project_list</span>(<span class="hljs-params">self</span>):</span>

        project_list = <span class="hljs-string">"# Available Projects\n\n"</span>
        <span class="hljs-keyword">for</span> project_id, project <span class="hljs-keyword">in</span> self.projects.items():
            project_list += <span class="hljs-string">f"## <span class="hljs-subst">{project[<span class="hljs-string">'name'</span>]}</span>\n"</span>
            project_list += <span class="hljs-string">f"**Tech Stack**: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(project[<span class="hljs-string">'tech_stack'</span>])}</span>\n"</span>
            project_list += <span class="hljs-string">f"<span class="hljs-subst">{project[<span class="hljs-string">'description'</span>]}</span>\n\n"</span>

        <span class="hljs-keyword">return</span> project_list

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_project_details</span>(<span class="hljs-params">self, project_id</span>):</span>

        <span class="hljs-keyword">if</span> project_id <span class="hljs-keyword">in</span> self.projects:
            project = self.projects[project_id]
            prompt = <span class="hljs-string">f"""
            Generate a detailed description for the following project:

            Project Name: <span class="hljs-subst">{project[<span class="hljs-string">'name'</span>]}</span>
            Tech Stack: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(project[<span class="hljs-string">'tech_stack'</span>])}</span>
            Description: <span class="hljs-subst">{project[<span class="hljs-string">'description'</span>]}</span>
            Highlights: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(project[<span class="hljs-string">'highlights'</span>])}</span>
            GitHub: <span class="hljs-subst">{project[<span class="hljs-string">'github_link'</span>]}</span>
            Demo: <span class="hljs-subst">{project[<span class="hljs-string">'demo_link'</span>]}</span>

            Include technical details about implementation challenges and solutions. Format the response in markdown.
            """</span>
            <span class="hljs-keyword">return</span> self.get_response(prompt)
        <span class="hljs-keyword">else</span>:
            <span class="hljs-keyword">return</span> <span class="hljs-string">"Project not found. Please check the project ID and try again."</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">answer_technical_question</span>(<span class="hljs-params">self, project_id, question</span>):</span>

        <span class="hljs-keyword">if</span> project_id <span class="hljs-keyword">in</span> self.projects:
            project = self.projects[project_id]
            prompt = <span class="hljs-string">f"""
            Answer the following technical question about this project:

            Project Name: <span class="hljs-subst">{project[<span class="hljs-string">'name'</span>]}</span>
            Tech Stack: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(project[<span class="hljs-string">'tech_stack'</span>])}</span>
            Description: <span class="hljs-subst">{project[<span class="hljs-string">'description'</span>]}</span>
            Highlights: <span class="hljs-subst">{<span class="hljs-string">', '</span>.join(project[<span class="hljs-string">'highlights'</span>])}</span>

            Question: <span class="hljs-subst">{question}</span>

            Provide a detailed technical answer with code examples if relevant.
            """</span>
            <span class="hljs-keyword">return</span> self.get_response(prompt)
        <span class="hljs-keyword">else</span>:
            <span class="hljs-keyword">return</span> <span class="hljs-string">"Project not found. Please check the project ID and try again."</span>
</code></pre>
<p>This agent is designed to help users with project-related tasks such as:</p>
<ul>
<li><p>Providing an overview of all projects in a portfolio</p>
</li>
<li><p>Generating detailed descriptions of specific projects</p>
</li>
<li><p>Answering technical questions about implementation details</p>
</li>
</ul>
<p>The agent, like in the previous examples, uses the LLM capabilities of the base agent (using Groq's LLama 3.3 70B model) to generate technical, project-oriented content formatted in markdown. This is good for technical documentation, or when responding to inquiries about project implementations. We’re using mock data here as opposed to a database.</p>
<p>With that file completed, we have two left. The next is the <code>research_agent.py</code> file, so go ahead and add this code:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agents.base_agent <span class="hljs-keyword">import</span> BaseAgent
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">import</span> json


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ResearchAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            name=<span class="hljs-string">"ResearchAssistant"</span>,
            description=<span class="hljs-string">"I'm the research specialist. I can search the web for information about technologies, trends, and industry news."</span>,
            avatar=<span class="hljs-string">"research_avatar.png"</span>
        )
        self.api_key = os.getenv(<span class="hljs-string">"GROQ_API_KEY"</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">search_web</span>(<span class="hljs-params">self, query</span>):</span>

        headers = {
            <span class="hljs-string">"Authorization"</span>: <span class="hljs-string">f"Bearer <span class="hljs-subst">{self.api_key}</span>"</span>,
            <span class="hljs-string">"Content-Type"</span>: <span class="hljs-string">"application/json"</span>
        }

        payload = {
            <span class="hljs-string">"model"</span>: <span class="hljs-string">"llama-3.3-70b-versatile"</span>,
            <span class="hljs-string">"messages"</span>: [
                {<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"You are a helpful research assistant."</span>},
                {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">f"Search the web for: <span class="hljs-subst">{query}</span>"</span>}
            ],
            <span class="hljs-string">"tools"</span>: [
                {
                    <span class="hljs-string">"type"</span>: <span class="hljs-string">"web_search"</span>
                }
            ]
        }

        <span class="hljs-keyword">try</span>:
            response = requests.post(
                <span class="hljs-string">"https://api.groq.com/openai/v1/chat/completions"</span>,
                headers=headers,
                json=payload
            )

            <span class="hljs-keyword">if</span> response.status_code == <span class="hljs-number">200</span>:
                result = response.json()
                <span class="hljs-keyword">return</span> result[<span class="hljs-string">"choices"</span>][<span class="hljs-number">0</span>][<span class="hljs-string">"message"</span>][<span class="hljs-string">"content"</span>]
            <span class="hljs-keyword">else</span>:
                <span class="hljs-keyword">return</span> <span class="hljs-string">f"Error searching the web: <span class="hljs-subst">{response.status_code}</span> - <span class="hljs-subst">{response.text}</span>"</span>
        <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:
            <span class="hljs-keyword">return</span> <span class="hljs-string">f"Error searching the web: <span class="hljs-subst">{str(e)}</span>"</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">research_technology</span>(<span class="hljs-params">self, technology</span>):</span>

        query = <span class="hljs-string">f"latest developments and best practices for <span class="hljs-subst">{technology}</span> in software development"</span>
        search_results = self.search_web(query)

        prompt = <span class="hljs-string">f"""
        Based on the following search results about <span class="hljs-subst">{technology}</span>, provide a concise summary of:
        1. What it is
        2. Current state and popularity
        3. Key features and benefits
        4. Common use cases
        5. Future trends

        Search Results:
        <span class="hljs-subst">{search_results}</span>

        Format the response in markdown with appropriate sections.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">compare_technologies</span>(<span class="hljs-params">self, tech1, tech2</span>):</span>

        query = <span class="hljs-string">f"comparison between <span class="hljs-subst">{tech1}</span> and <span class="hljs-subst">{tech2}</span> for software development"</span>
        search_results = self.search_web(query)

        prompt = <span class="hljs-string">f"""
        Based on the following search results comparing <span class="hljs-subst">{tech1}</span> and <span class="hljs-subst">{tech2}</span>, provide a detailed comparison including:
        6. Core differences
        7. Performance considerations
        8. Learning curve
        9. Community support
        10. Use case recommendations

        Search Results:
        <span class="hljs-subst">{search_results}</span>

        Format the response in markdown with a comparison table and explanatory text.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_industry_trends</span>(<span class="hljs-params">self</span>):</span>

        query = <span class="hljs-string">"latest trends in software development industry"</span>
        search_results = self.search_web(query)

        prompt = <span class="hljs-string">f"""
        Based on the following search results about software development trends, provide a summary of:
        11. Emerging technologies
        12. Industry shifts
        13. In-demand skills
        14. Future predictions

        Search Results:
        <span class="hljs-subst">{search_results}</span>

        Format the response in markdown with appropriate sections and highlights.
        """</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)
</code></pre>
<p>This agent is designed to help users with research-related tasks such as:</p>
<ul>
<li><p>Researching specific technologies to understand their features, benefits, and use cases</p>
</li>
<li><p>Comparing different technologies to make informed decisions</p>
</li>
<li><p>Staying updated on industry trends and emerging technologies</p>
</li>
</ul>
<p>What makes this agent unique compared to the other agents is that it actively fetches real-time information from the web using the Groq Toolhouse API's web search capability instead of relying solely on pre-defined data or the LLM's training data. This allows it to provide more current and comprehensive information about rapidly evolving technology topics.</p>
<p>Ok, now we have one last AI agent to create and it’s the <code>welcome_agent.py</code> file. Add this code to the file:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> agents.base_agent <span class="hljs-keyword">import</span> BaseAgent


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">WelcomeAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            name=<span class="hljs-string">"Greeter"</span>,
            description=<span class="hljs-string">"I'm the welcome agent for this portfolio. I can help guide you to the right section based on your interests."</span>,
            avatar=<span class="hljs-string">"welcome_avatar.png"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">greet</span>(<span class="hljs-params">self, visitor_type=None</span>):</span>

        <span class="hljs-keyword">if</span> visitor_type == <span class="hljs-string">"employer"</span>:
            <span class="hljs-keyword">return</span> self.get_response(
                <span class="hljs-string">"Generate a friendly, professional greeting for a potential employer visiting a programmer's portfolio website. "</span>
                <span class="hljs-string">"Mention that they can explore the Projects section to see technical skills and the Career section for professional experience."</span>
            )
        <span class="hljs-keyword">elif</span> visitor_type == <span class="hljs-string">"client"</span>:
            <span class="hljs-keyword">return</span> self.get_response(
                <span class="hljs-string">"Generate a friendly, business-oriented greeting for a potential client visiting a programmer's portfolio website. "</span>
                <span class="hljs-string">"Mention that they can check out the Projects section for examples of past work and the Client section for service details."</span>
            )
        <span class="hljs-keyword">elif</span> visitor_type == <span class="hljs-string">"fellow_programmer"</span>:
            <span class="hljs-keyword">return</span> self.get_response(
                <span class="hljs-string">"Generate a friendly, casual greeting for a fellow programmer visiting a portfolio website. "</span>
                <span class="hljs-string">"Mention that they can explore the Projects section for technical details and code samples."</span>
            )
        <span class="hljs-keyword">else</span>:
            <span class="hljs-keyword">return</span> self.get_response(
                <span class="hljs-string">"Generate a friendly, general greeting for a visitor to a programmer's portfolio website. "</span>
                <span class="hljs-string">"Ask if they are an employer, client, or fellow programmer to provide more tailored information."</span>
            )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">suggest_section</span>(<span class="hljs-params">self, interest</span>):</span>

        prompt = <span class="hljs-string">f"Based on a visitor expressing interest in '<span class="hljs-subst">{interest}</span>', suggest which section of a programmer's portfolio they should visit. Options include: Projects, Career, Client Work, About Me, Contact. Explain why in 1-2 sentences."</span>
        <span class="hljs-keyword">return</span> self.get_response(prompt)
</code></pre>
<p>This agent is designed to serve as the initial point of contact for visitors to a portfolio website, providing:</p>
<ul>
<li><p>Personalised greetings based on visitor type</p>
</li>
<li><p>Guidance to relevant sections based on specific interests</p>
</li>
<li><p>A friendly, conversational introduction to the portfolio</p>
</li>
</ul>
<p>The <code>WelcomeAgent</code> is simpler than some of the other agents we've looked at because it focuses on creating a positive first impression and helping visitors navigate to the content most relevant to their needs. It uses the LLM capabilities of the base agent to generate natural, contextually appropriate responses.</p>
<p>Ok good – your backend API is almost ready. You just have one last file to work on: the <code>main.py</code> file that completes your codebase. This file is quite big, so I will split it into three parts. You’ll need to copy and paste each section into the file. If you have not done so already, its worth installing the <a target="_blank" href="https://open-vsx.org/extension/ms-python/python">Python</a> extension for VS Code as this has debugging, linting, and formatting for Python files.</p>
<p>Alright, here is the first part of the codebase for our <code>main.py</code> file:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> Flask, request, jsonify
<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">from</span> dotenv <span class="hljs-keyword">import</span> load_dotenv
<span class="hljs-keyword">import</span> json
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> flask_cors <span class="hljs-keyword">import</span> CORS


load_dotenv()


app = Flask(__name__)
CORS(app)


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BaseAgent</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, name, description</span>):</span>
        self.name = name
        self.description = description

        self.api_key = os.getenv(<span class="hljs-string">"GROQ_API_KEY"</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_response</span>(<span class="hljs-params">self, prompt</span>):</span>

        <span class="hljs-keyword">try</span>:
            headers = {
                <span class="hljs-string">"Authorization"</span>: <span class="hljs-string">f"Bearer <span class="hljs-subst">{self.api_key}</span>"</span>,
                <span class="hljs-string">"Content-Type"</span>: <span class="hljs-string">"application/json"</span>
            }

            data = {
                <span class="hljs-string">"model"</span>: <span class="hljs-string">"llama3-8b-8192"</span>,
                <span class="hljs-string">"messages"</span>: [
                    {<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">f"You are <span class="hljs-subst">{self.name}</span>, <span class="hljs-subst">{self.description}</span>. Respond in a helpful, concise, and professional manner."</span>},
                    {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: prompt}
                ],
                <span class="hljs-string">"temperature"</span>: <span class="hljs-number">0.7</span>,
                <span class="hljs-string">"max_tokens"</span>: <span class="hljs-number">500</span>
            }

            response = requests.post(
                <span class="hljs-string">"https://api.groq.com/openai/v1/chat/completions"</span>,
                headers=headers,
                json=data
            )

            <span class="hljs-keyword">if</span> response.status_code == <span class="hljs-number">200</span>:
                <span class="hljs-keyword">return</span> response.json()[<span class="hljs-string">"choices"</span>][<span class="hljs-number">0</span>][<span class="hljs-string">"message"</span>][<span class="hljs-string">"content"</span>]
            <span class="hljs-keyword">else</span>:
                <span class="hljs-keyword">return</span> <span class="hljs-string">f"Error: <span class="hljs-subst">{response.status_code}</span> - <span class="hljs-subst">{response.text}</span>"</span>
        <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:
            <span class="hljs-keyword">return</span> <span class="hljs-string">f"An error occurred: <span class="hljs-subst">{str(e)}</span>"</span>


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">WelcomeAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            <span class="hljs-string">"WelcomeAgent"</span>,
            <span class="hljs-string">"a welcome specialist who greets visitors and helps them navigate the portfolio website"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">greet</span>(<span class="hljs-params">self, visitor_type=None</span>):</span>
        <span class="hljs-keyword">if</span> visitor_type == <span class="hljs-string">"employer"</span>:
            <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a warm welcome message for an employer visiting a programmer's portfolio website. Suggest they check out the Projects and Career sections."</span>)
        <span class="hljs-keyword">elif</span> visitor_type == <span class="hljs-string">"client"</span>:
            <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a warm welcome message for a potential client visiting a programmer's portfolio website. Suggest they check out the Services section."</span>)
        <span class="hljs-keyword">elif</span> visitor_type == <span class="hljs-string">"fellow_programmer"</span>:
            <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a warm welcome message for a fellow programmer visiting a programmer's portfolio website. Suggest they check out the Projects and Research sections."</span>)
        <span class="hljs-keyword">else</span>:
            <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a general welcome message for a visitor to a programmer's portfolio website. Ask if they are an employer, client, or fellow programmer."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">suggest_section</span>(<span class="hljs-params">self, interest</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">f"A visitor to my portfolio website has expressed interest in <span class="hljs-subst">{interest}</span>. Suggest which section(s) of the website they should visit based on this interest."</span>)


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ProjectAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            <span class="hljs-string">"ProjectAgent"</span>,
            <span class="hljs-string">"a project specialist who provides detailed information about the programmer's projects"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_project_list</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a list of 3-5 impressive software development projects that could be in a programmer's portfolio. Include a brief description for each."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_project_details</span>(<span class="hljs-params">self, project_id</span>):</span>
        project_prompts = {
            <span class="hljs-string">"project1"</span>: <span class="hljs-string">"Describe in detail an e-commerce platform project for a programmer's portfolio. Include technologies used, challenges overcome, and key features."</span>,
            <span class="hljs-string">"project2"</span>: <span class="hljs-string">"Describe in detail a task management application project for a programmer's portfolio. Include technologies used, challenges overcome, and key features."</span>,
            <span class="hljs-string">"project3"</span>: <span class="hljs-string">"Describe in detail a data visualization dashboard project for a programmer's portfolio. Include technologies used, challenges overcome, and key features."</span>
        }

        prompt = project_prompts.get(
            project_id, <span class="hljs-string">f"Describe a project called <span class="hljs-subst">{project_id}</span> in detail."</span>)
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">answer_technical_question</span>(<span class="hljs-params">self, project_id, question</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">f"Answer this technical question about a project: '<span class="hljs-subst">{question}</span>'. The project is <span class="hljs-subst">{project_id}</span>."</span>)
</code></pre>
<p>This part of the code has your imports, set up, and some greetings for the AI agent.</p>
<p>Now for part two, add this code to the file underneath the first code you added:</p>
<pre><code class="lang-python">
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">CareerAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            <span class="hljs-string">"CareerAgent"</span>,
            <span class="hljs-string">"a career specialist who provides information about the programmer's skills and experience"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_skills_summary</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a comprehensive summary of technical and professional skills for a full-stack developer's portfolio."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_experience_summary</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate a summary of work experience for a full-stack developer with 5+ years of experience."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">assess_job_fit</span>(<span class="hljs-params">self, job_description</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">f"Assess how well a full-stack developer with 5+ years of experience would fit this job description: '<span class="hljs-subst">{job_description}</span>'. Highlight matching skills and experience."</span>)


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ClientAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            <span class="hljs-string">"ClientAgent"</span>,
            <span class="hljs-string">"a client specialist who provides information about services, pricing, and the client engagement process"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_services_overview</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Generate an overview of services that a freelance full-stack developer might offer to clients."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_service_details</span>(<span class="hljs-params">self, service_type</span>):</span>
        service_prompts = {
            <span class="hljs-string">"web_development"</span>: <span class="hljs-string">"Describe web development services offered by a freelance full-stack developer, including technologies, pricing range, and typical timeline."</span>,
            <span class="hljs-string">"mobile_development"</span>: <span class="hljs-string">"Describe mobile app development services offered by a freelance full-stack developer, including technologies, pricing range, and typical timeline."</span>,
            <span class="hljs-string">"consulting"</span>: <span class="hljs-string">"Describe technical consulting services offered by a freelance full-stack developer, including areas of expertise, hourly rate range, and engagement model."</span>
        }

        prompt = service_prompts.get(
            service_type, <span class="hljs-string">f"Describe <span class="hljs-subst">{service_type}</span> services in detail."</span>)
        <span class="hljs-keyword">return</span> self.get_response(prompt)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">explain_process</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Explain the client engagement process for a freelance full-stack developer, from initial consultation to project delivery."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">generate_proposal</span>(<span class="hljs-params">self, project_description</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">f"Generate a project proposal for this client request: '<span class="hljs-subst">{project_description}</span>'. Include estimated timeline, cost range, and approach."</span>)


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ResearchAgent</span>(<span class="hljs-params">BaseAgent</span>):</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        super().__init__(
            <span class="hljs-string">"ResearchAgent"</span>,
            <span class="hljs-string">"a research specialist who provides information about technologies, trends, and industry news"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">search_web</span>(<span class="hljs-params">self, query</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">f"Provide information about '<span class="hljs-subst">{query}</span>' as if you've just searched the web for the latest information. Include key points and insights."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">compare_technologies</span>(<span class="hljs-params">self, tech1, tech2</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">f"Compare <span class="hljs-subst">{tech1}</span> vs <span class="hljs-subst">{tech2}</span> in terms of features, performance, use cases, community support, and future prospects."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_industry_trends</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.get_response(<span class="hljs-string">"Describe current trends in software development and technology that are important for developers to be aware of."</span>)


welcome_agent = WelcomeAgent()
project_agent = ProjectAgent()
career_agent = CareerAgent()
client_agent = ClientAgent()
research_agent = ResearchAgent()


<span class="hljs-meta">@app.route('/static/images/default_avatar.png')</span>
<span class="hljs-meta">@app.route('/static/images/default_project.jpg')</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">block_default_images</span>():</span>

    response = app.make_response(
        <span class="hljs-string">b'GIF89a\x01\x00\x01\x00\x80\x00\x00\xff\xff\xff\x00\x00\x00!\xf9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;'</span>)
    response.headers[<span class="hljs-string">'Content-Type'</span>] = <span class="hljs-string">'image/gif'</span>

    response.headers[<span class="hljs-string">'Cache-Control'</span>] = <span class="hljs-string">'public, max-age=31536000'</span>
    response.headers[<span class="hljs-string">'Expires'</span>] = <span class="hljs-string">'Thu, 31 Dec 2037 23:59:59 GMT'</span>
    <span class="hljs-keyword">return</span> response


<span class="hljs-meta">@app.route('/api/welcome', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">welcome_agent_endpoint</span>():</span>
    data = request.json
    message = data.get(<span class="hljs-string">'message'</span>, <span class="hljs-string">''</span>)

    visitor_type = <span class="hljs-literal">None</span>
    <span class="hljs-keyword">if</span> <span class="hljs-string">'employer'</span> <span class="hljs-keyword">in</span> message.lower():
        visitor_type = <span class="hljs-string">'employer'</span>
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'client'</span> <span class="hljs-keyword">in</span> message.lower():
        visitor_type = <span class="hljs-string">'client'</span>
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'programmer'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'developer'</span> <span class="hljs-keyword">in</span> message.lower():
        visitor_type = <span class="hljs-string">'fellow_programmer'</span>

    <span class="hljs-keyword">if</span> <span class="hljs-string">'interest'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'looking for'</span> <span class="hljs-keyword">in</span> message.lower():

        interest = message.replace(<span class="hljs-string">'interest'</span>, <span class="hljs-string">''</span>).replace(
            <span class="hljs-string">'looking for'</span>, <span class="hljs-string">''</span>).strip()
        response = welcome_agent.suggest_section(interest)
    <span class="hljs-keyword">else</span>:
        response = welcome_agent.greet(visitor_type)

    <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'response'</span>: response})
</code></pre>
<p>In this part of your codebase, you have more AI responses and a welcome API route.</p>
<p>Lastly, complete the code by adding this final piece at the end:</p>
<pre><code class="lang-python">
<span class="hljs-meta">@app.route('/api/project', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">project_agent_endpoint</span>():</span>
    data = request.json
    message = data.get(<span class="hljs-string">'message'</span>, <span class="hljs-string">''</span>)

    project_id = <span class="hljs-literal">None</span>
    <span class="hljs-keyword">if</span> <span class="hljs-string">'e-commerce'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'ecommerce'</span> <span class="hljs-keyword">in</span> message.lower():
        project_id = <span class="hljs-string">'project1'</span>
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'task'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'management'</span> <span class="hljs-keyword">in</span> message.lower():
        project_id = <span class="hljs-string">'project2'</span>
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'data'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'visualization'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'dashboard'</span> <span class="hljs-keyword">in</span> message.lower():
        project_id = <span class="hljs-string">'project3'</span>

    <span class="hljs-keyword">if</span> project_id <span class="hljs-keyword">and</span> (<span class="hljs-string">'tell me more'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'details'</span> <span class="hljs-keyword">in</span> message.lower()):
        response = project_agent.get_project_details(project_id)
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'list'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'all projects'</span> <span class="hljs-keyword">in</span> message.lower():
        response = project_agent.get_project_list()
    <span class="hljs-keyword">elif</span> project_id:

        response = project_agent.answer_technical_question(project_id, message)
    <span class="hljs-keyword">else</span>:

        response = project_agent.get_response(
            <span class="hljs-string">f"The user asked: '<span class="hljs-subst">{message}</span>'. Respond as if you are a project specialist for a portfolio website. "</span>
            <span class="hljs-string">"If they're asking about a specific project, suggest they mention one of the projects: "</span>
            <span class="hljs-string">"E-commerce Platform, Task Management App, or Data Visualization Dashboard."</span>
        )

    <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'response'</span>: response})


<span class="hljs-meta">@app.route('/api/career', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">career_agent_endpoint</span>():</span>
    data = request.json
    message = data.get(<span class="hljs-string">'message'</span>, <span class="hljs-string">''</span>)

    <span class="hljs-keyword">if</span> <span class="hljs-string">'skills'</span> <span class="hljs-keyword">in</span> message.lower():
        response = career_agent.get_skills_summary()
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'experience'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'work history'</span> <span class="hljs-keyword">in</span> message.lower():
        response = career_agent.get_experience_summary()
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'job'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'position'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'role'</span> <span class="hljs-keyword">in</span> message.lower():

        response = career_agent.assess_job_fit(message)
    <span class="hljs-keyword">else</span>:

        response = career_agent.get_response(
            <span class="hljs-string">f"The user asked: '<span class="hljs-subst">{message}</span>'. Respond as if you are a career specialist for a portfolio website. "</span>
            <span class="hljs-string">"Suggest they ask about skills, experience, or job fit assessment."</span>
        )

    <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'response'</span>: response})


<span class="hljs-meta">@app.route('/api/client', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">client_agent_endpoint</span>():</span>
    data = request.json
    message = data.get(<span class="hljs-string">'message'</span>, <span class="hljs-string">''</span>)

    <span class="hljs-keyword">if</span> <span class="hljs-string">'services'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'offerings'</span> <span class="hljs-keyword">in</span> message.lower():
        response = client_agent.get_services_overview()
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'web'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">and</span> <span class="hljs-string">'development'</span> <span class="hljs-keyword">in</span> message.lower():
        response = client_agent.get_service_details(<span class="hljs-string">'web_development'</span>)
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'mobile'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">and</span> <span class="hljs-string">'development'</span> <span class="hljs-keyword">in</span> message.lower():
        response = client_agent.get_service_details(<span class="hljs-string">'mobile_development'</span>)
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'consulting'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'technical consulting'</span> <span class="hljs-keyword">in</span> message.lower():
        response = client_agent.get_service_details(<span class="hljs-string">'consulting'</span>)
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'process'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'how does it work'</span> <span class="hljs-keyword">in</span> message.lower():
        response = client_agent.explain_process()
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'proposal'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'quote'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'estimate'</span> <span class="hljs-keyword">in</span> message.lower():

        response = client_agent.generate_proposal(message)
    <span class="hljs-keyword">else</span>:

        response = client_agent.get_response(
            <span class="hljs-string">f"The user asked: '<span class="hljs-subst">{message}</span>'. Respond as if you are a client specialist for a portfolio website. "</span>
            <span class="hljs-string">"Suggest they ask about services, the client engagement process, or request a proposal."</span>
        )

    <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'response'</span>: response})


<span class="hljs-meta">@app.route('/api/research', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">research_agent_endpoint</span>():</span>
    data = request.json
    message = data.get(<span class="hljs-string">'message'</span>, <span class="hljs-string">''</span>)

    <span class="hljs-keyword">if</span> <span class="hljs-string">'compare'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">and</span> (<span class="hljs-string">'vs'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'versus'</span> <span class="hljs-keyword">in</span> message.lower()):

        tech_parts = message.lower().replace(<span class="hljs-string">'compare'</span>, <span class="hljs-string">''</span>).replace(
            <span class="hljs-string">'vs'</span>, <span class="hljs-string">' '</span>).replace(<span class="hljs-string">'versus'</span>, <span class="hljs-string">' '</span>).split()
        tech1 = tech_parts[<span class="hljs-number">0</span>] <span class="hljs-keyword">if</span> len(tech_parts) &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
        tech2 = tech_parts[<span class="hljs-number">-1</span>] <span class="hljs-keyword">if</span> len(tech_parts) &gt; <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
        response = research_agent.compare_technologies(tech1, tech2)
    <span class="hljs-keyword">elif</span> <span class="hljs-string">'trends'</span> <span class="hljs-keyword">in</span> message.lower() <span class="hljs-keyword">or</span> <span class="hljs-string">'industry'</span> <span class="hljs-keyword">in</span> message.lower():
        response = research_agent.get_industry_trends()
    <span class="hljs-keyword">else</span>:
        response = research_agent.search_web(message)

    <span class="hljs-keyword">return</span> jsonify({<span class="hljs-string">'response'</span>: response})


<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:

    app.config[<span class="hljs-string">'SEND_FILE_MAX_AGE_DEFAULT'</span>] = <span class="hljs-number">0</span>
    app.config[<span class="hljs-string">'TEMPLATES_AUTO_RELOAD'</span>] = <span class="hljs-literal">True</span>   <span class="hljs-comment"># Ensure templates reload</span>

<span class="hljs-meta">    @app.after_request</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">add_header</span>(<span class="hljs-params">response</span>):</span>
        response.headers[<span class="hljs-string">'Cache-Control'</span>] = <span class="hljs-string">'no-store, no-cache, must-revalidate, max-age=0'</span>
        response.headers[<span class="hljs-string">'Pragma'</span>] = <span class="hljs-string">'no-cache'</span>
        response.headers[<span class="hljs-string">'Expires'</span>] = <span class="hljs-string">'0'</span>
        <span class="hljs-keyword">return</span> response

    app.run(host=<span class="hljs-string">'0.0.0.0'</span>, port=<span class="hljs-number">5001</span>, debug=<span class="hljs-literal">True</span>,
            use_reloader=<span class="hljs-literal">False</span>, threaded=<span class="hljs-literal">True</span>)
</code></pre>
<p>Okay, if your file has errors, they're probably caused by the Python indentation. Hopefully, the formatting will not make them too difficult to fix.</p>
<p>The file is now complete, and you’ve created the rest of your AI API routes.</p>
<h3 id="heading-running-our-python-backend">Running Our Python Backend</h3>
<p>All that's left is to run your Flask server and get the backend up and running. You can do that with this run script inside the <code>venv</code> folder:</p>
<pre><code class="lang-shell">python3 main.py
</code></pre>
<p>Your backend should now be running on <a target="_blank" href="http://127.0.0.1:5001/">http://127.0.0.1:5001/</a>. If you go to the page you will see an error like this:</p>
<pre><code class="lang-markdown">Not Found

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
</code></pre>
<p>This is expected, because if you have checked the codebase, you’ll realise that there are no GET routes, only POST routes. To see them working, you need to use an HTTP client like Postman. Another option is to create some <code>curl</code> commands that send a POST request, which you can run from your terminal. Let's use <code>curl</code> because there is less setup. You’ll need to copy and paste the commands.</p>
<p>Each POST request will use exactly one API call on Groq Cloud for your API Key which you can view here <a target="_blank" href="https://console.groq.com/keys">https://console.groq.com/keys</a>. Remember that it’s free to use but there are usage limits which you can read about in their documentation on <a target="_blank" href="https://console.groq.com/docs/rate-limits">Rate Limits</a>.</p>
<p>I have provided some sample curl commands below – just copy and paste them into your terminal and hit enter, and you should see the response message:</p>
<p><strong>1. Testing the Welcome Agent Endpoint</strong></p>
<pre><code class="lang-shell">curl -X POST http://localhost:5001/api/welcome \
  -H "Content-Type: application/json" \
  -d '{"message": "I am an employer looking for a skilled developer"}'
</code></pre>
<p><strong>2. Testing the Project Agent Endpoint</strong></p>
<pre><code class="lang-shell">curl -X POST http://localhost:5001/api/project \
  -H "Content-Type: application/json" \
  -d '{"message": "Tell me more about the e-commerce project"}'
</code></pre>
<p><strong>3. Testing the Career Agent Endpoint</strong></p>
<pre><code class="lang-shell">curl -X POST http://localhost:5001/api/career \
  -H "Content-Type: application/json" \
  -d '{"message": "What skills do you have?"}'
</code></pre>
<p><strong>4. Testing the Client Agent Endpoint</strong></p>
<pre><code class="lang-shell">curl -X POST http://localhost:5001/api/client \
  -H "Content-Type: application/json" \
  -d '{"message": "What services do you offer?"}'
</code></pre>
<p><strong>5. Testing the Research Agent Endpoint</strong></p>
<pre><code class="lang-shell">curl -X POST http://localhost:5001/api/research \
  -H "Content-Type: application/json" \
  -d '{"message": "What are the current trends in web development?"}'
</code></pre>
<h2 id="heading-building-our-react-frontend">Building Our React Frontend</h2>
<p>We have reached halfway point, and all that's left is to build your front end. We’ll build the front end using <a target="_blank" href="https://vite.dev/">Vite</a>, and the website will have six pages. Make sure that you are now inside the root folder for the <code>ai-agent-app</code> project. You can leave the Python server running because your front end is going to connect to the API routes you created.</p>
<p>Now, run the commands below to setup your React project using Vite, Tailwind CSS, react-router and Axios, which we need for page routing and fetch requests:</p>
<pre><code class="lang-shell">npm create vite@latest frontend -- --template react
cd frontend
npm install -D tailwindcss@3 postcss autoprefixer react-router axios
npx tailwindcss init -p
npm install
</code></pre>
<p>Great, now with those packages installed and our dependencies set up, we are almost ready to start on the codebase. But before that, we need to run one more script, which is going to create all of the files and folders for our project. It's much faster than doing them all manually.</p>
<p>Run this command inside the frontend folder:</p>
<pre><code class="lang-shell">mkdir -p src/components src/pages
touch src/style.css src/components/{Chat,Footer,Layout,Navbar}.jsx
touch src/pages/{Career,Contact,Home,Projects,Research,Services}.jsx
</code></pre>
<p>Our React frontend should now have a project structure like the example shown below:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977692485/9940901d-bd7a-49dd-a18b-ab3edf5e3714.png" alt="AI Agent App frontend project structure" class="image--center mx-auto" width="500" height="1548" loading="lazy"></p>
<p>We are now ready to start writing some code.</p>
<p>Up first is the <code>tailwind.config.js</code> file. This is the only configuration file you’ll need to work on, as the others already have the configuration we need. Replace all of the code in the file with the code below:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">/** <span class="hljs-doctag">@type <span class="hljs-type">{import('tailwindcss').Config}</span> </span>*/</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
  <span class="hljs-attr">content</span>: [<span class="hljs-string">'./index.html'</span>, <span class="hljs-string">'./src/**/*.{js,ts,jsx,tsx}'</span>],
  <span class="hljs-attr">theme</span>: {
    <span class="hljs-attr">extend</span>: {},
  },
  <span class="hljs-attr">plugins</span>: [],
};
</code></pre>
<p>All this code does is add the paths to all of your template files.</p>
<p>Ok, next, you are going to work on your styles and Tailwind CSS. There are three CSS files to work on: <code>App.css</code>, <code>index.css</code>, and <code>style.css</code>.</p>
<p>First up is the <code>App.css</code> file. Replace all of the code with this code here:</p>
<pre><code class="lang-css"><span class="hljs-selector-id">#root</span> {
  <span class="hljs-attribute">max-width</span>: <span class="hljs-number">100%</span>;
  <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">text-align</span>: left;
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">flex-direction</span>: column;
  <span class="hljs-attribute">min-height</span>: <span class="hljs-number">100vh</span>;
}

<span class="hljs-selector-tag">main</span> {
  <span class="hljs-attribute">flex</span>: <span class="hljs-number">1</span>;
}
</code></pre>
<p>We just have some basic layout styles here for <code>root</code> and <code>main</code>.</p>
<p>Next is the <code>index.css</code> file. Below is the code you’ll need, so replace everything in the file with it:</p>
<pre><code class="lang-css"><span class="hljs-keyword">@tailwind</span> base;
<span class="hljs-keyword">@tailwind</span> components;
<span class="hljs-keyword">@tailwind</span> utilities;

<span class="hljs-selector-pseudo">:root</span> {
  <span class="hljs-attribute">font-family</span>: system-ui, Avenir, Helvetica, Arial, sans-serif;
  <span class="hljs-attribute">font-synthesis</span>: none;
  <span class="hljs-attribute">text-rendering</span>: optimizeLegibility;
  <span class="hljs-attribute">-webkit-font-smoothing</span>: antialiased;
  <span class="hljs-attribute">-moz-osx-font-smoothing</span>: grayscale;
}

<span class="hljs-keyword">@layer</span> components {
  <span class="hljs-selector-class">.chat-container</span> {
    @apply w-full h-96 flex flex-col;
  }

  <span class="hljs-selector-class">.chat-messages</span> {
    @apply flex-1 overflow-y-auto p-4;
  }

  <span class="hljs-selector-class">.message</span> {
    @apply flex mb-4;
  }

  <span class="hljs-selector-class">.user-message</span> {
    @apply justify-end;
  }

  <span class="hljs-selector-class">.agent-message</span> {
    @apply justify-start;
  }

  <span class="hljs-selector-class">.message-avatar</span> {
    @apply flex-shrink-0 mr-2;
  }

  <span class="hljs-selector-class">.avatar-placeholder</span> {
    @apply w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center font-bold;
  }

  <span class="hljs-selector-class">.message-content</span> {
    @apply p-3 rounded-lg max-w-xs <span class="hljs-attribute">sm</span>:max-w-sm md:max-w-md;
  }

  <span class="hljs-selector-class">.user-message</span> <span class="hljs-selector-class">.message-content</span> {
    @apply bg-blue-500 text-white;
  }

  <span class="hljs-selector-class">.agent-message</span> <span class="hljs-selector-class">.message-content</span> {
    @apply bg-gray-200 text-gray-800;
  }

  <span class="hljs-selector-class">.chat-input-container</span> {
    @apply p-4 border-t border-gray-200;
  }

  <span class="hljs-selector-class">.chat-input-group</span> {
    @apply flex;
  }

  <span class="hljs-selector-class">.chat-input</span> {
    @apply flex-1 border border-gray-300 rounded-l-lg p-2 <span class="hljs-attribute">focus</span>:outline-none focus:ring-<span class="hljs-number">2</span> focus:ring-blue-<span class="hljs-number">500</span>;
  }

  <span class="hljs-selector-class">.chat-send-button</span> {
    @apply bg-blue-500 text-white px-4 py-2 rounded-r-lg <span class="hljs-attribute">hover</span>:bg-blue-<span class="hljs-number">600</span> focus:outline-none focus:ring-<span class="hljs-number">2</span> focus:ring-blue-<span class="hljs-number">500</span>;
  }

  <span class="hljs-selector-class">.loading-dots</span><span class="hljs-selector-pseudo">:after</span> {
    @apply content-['...'] animate-pulse;
  }

  <span class="hljs-selector-class">.project-image-placeholder</span> {
    @apply h-48 bg-gray-300 flex items-center justify-center text-gray-600 font-semibold;
  }

  <span class="hljs-selector-class">.agent-avatar-placeholder</span> {
    @apply w-16 h-16 rounded-full bg-blue-500 text-white flex items-center justify-center font-bold mx-auto;
  }
}
</code></pre>
<p>All of these styles relate to your Tailwind CSS setup throughout your project.</p>
<p>Just one file remains for the CSS and it’s the <code>style.css</code> file. This is a big file, so I will split the code into two parts – just copy and paste them into the file.</p>
<p>Here is the first part:</p>
<pre><code class="lang-css"><span class="hljs-comment">/* Main Styles */</span>
<span class="hljs-selector-tag">body</span> {
  <span class="hljs-attribute">font-family</span>: <span class="hljs-string">'Inter'</span>, -apple-system, BlinkMacSystemFont, <span class="hljs-string">'Segoe UI'</span>, Roboto, Oxygen,
    Ubuntu, Cantarell, <span class="hljs-string">'Open Sans'</span>, <span class="hljs-string">'Helvetica Neue'</span>, sans-serif;
  <span class="hljs-attribute">color</span>: <span class="hljs-number">#333</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#f8f9fa</span>;
}

<span class="hljs-comment">/* Layout Styles */</span>
<span class="hljs-selector-id">#root</span> {
  <span class="hljs-attribute">max-width</span>: <span class="hljs-number">100%</span>;
  <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">text-align</span>: left;
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">flex-direction</span>: column;
  <span class="hljs-attribute">min-height</span>: <span class="hljs-number">100vh</span>;
}

<span class="hljs-selector-tag">main</span> {
  <span class="hljs-attribute">flex</span>: <span class="hljs-number">1</span>;
}

<span class="hljs-selector-tag">h1</span>,
<span class="hljs-selector-tag">h2</span>,
<span class="hljs-selector-tag">h3</span>,
<span class="hljs-selector-tag">h4</span>,
<span class="hljs-selector-tag">h5</span>,
<span class="hljs-selector-tag">h6</span> {
  <span class="hljs-attribute">font-weight</span>: <span class="hljs-number">600</span>;
}

<span class="hljs-selector-tag">footer</span> {
  <span class="hljs-attribute">margin-top</span>: auto;
}

<span class="hljs-comment">/* Navbar Styles */</span>
<span class="hljs-selector-class">.navbar</span> {
  <span class="hljs-attribute">box-shadow</span>: <span class="hljs-number">0</span> <span class="hljs-number">2px</span> <span class="hljs-number">4px</span> <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0.1</span>);
}

<span class="hljs-selector-class">.navbar-brand</span> {
  <span class="hljs-attribute">font-weight</span>: <span class="hljs-number">700</span>;
}

<span class="hljs-selector-class">.navbar</span> <span class="hljs-selector-class">.container</span> {
  <span class="hljs-attribute">max-width</span>: <span class="hljs-number">1320px</span>;
}

<span class="hljs-comment">/* Card Styles */</span>
<span class="hljs-selector-class">.card</span> {
  <span class="hljs-attribute">border</span>: none;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">0.5rem</span>;
  <span class="hljs-attribute">transition</span>: transform <span class="hljs-number">0.3s</span> ease, box-shadow <span class="hljs-number">0.3s</span> ease;
  <span class="hljs-attribute">margin-bottom</span>: <span class="hljs-number">1rem</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">2em</span>;
}

<span class="hljs-selector-class">.card</span><span class="hljs-selector-pseudo">:hover</span> {
  <span class="hljs-attribute">transform</span>: <span class="hljs-built_in">translateY</span>(-<span class="hljs-number">5px</span>);
  <span class="hljs-attribute">box-shadow</span>: <span class="hljs-number">0</span> <span class="hljs-number">10px</span> <span class="hljs-number">20px</span> <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0.1</span>);
}

<span class="hljs-comment">/* Agent Styles */</span>
<span class="hljs-selector-class">.agent-avatar-placeholder</span> {
  <span class="hljs-attribute">width</span>: <span class="hljs-number">80px</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">80px</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#6c757d</span>;
  <span class="hljs-attribute">color</span>: white;
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">align-items</span>: center;
  <span class="hljs-attribute">justify-content</span>: center;
  <span class="hljs-attribute">font-size</span>: <span class="hljs-number">24px</span>;
  <span class="hljs-attribute">font-weight</span>: bold;
  <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
  <span class="hljs-attribute">border</span>: <span class="hljs-number">3px</span> solid <span class="hljs-number">#fff</span>;
  <span class="hljs-attribute">box-shadow</span>: <span class="hljs-number">0</span> <span class="hljs-number">2px</span> <span class="hljs-number">4px</span> <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0.1</span>);
}

<span class="hljs-selector-class">.avatar-placeholder</span> {
  <span class="hljs-attribute">width</span>: <span class="hljs-number">40px</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">40px</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#6c757d</span>;
  <span class="hljs-attribute">color</span>: white;
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">align-items</span>: center;
  <span class="hljs-attribute">justify-content</span>: center;
  <span class="hljs-attribute">font-size</span>: <span class="hljs-number">16px</span>;
  <span class="hljs-attribute">font-weight</span>: bold;
}

<span class="hljs-comment">/* Chat Container Styles */</span>
<span class="hljs-selector-class">.chat-container</span> {
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">flex-direction</span>: column;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">400px</span>;
  <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid <span class="hljs-number">#dee2e6</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">0.25rem</span>;
  <span class="hljs-attribute">overflow</span>: hidden;
}

<span class="hljs-selector-class">.chat-messages</span> {
  <span class="hljs-attribute">flex</span>: <span class="hljs-number">1</span>;
  <span class="hljs-attribute">overflow-y</span>: auto;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">1rem</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#f8f9fa</span>;
}
</code></pre>
<p>And here is the second part:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.chat-input-container</span> {
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0.5rem</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#fff</span>;
  <span class="hljs-attribute">border-top</span>: <span class="hljs-number">1px</span> solid <span class="hljs-number">#dee2e6</span>;
}

<span class="hljs-selector-class">.chat-input-group</span> {
  <span class="hljs-attribute">display</span>: flex;
}

<span class="hljs-selector-class">.chat-input</span> {
  <span class="hljs-attribute">flex</span>: <span class="hljs-number">1</span>;
  <span class="hljs-attribute">margin-right</span>: <span class="hljs-number">0.5rem</span>;
  <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid <span class="hljs-number">#dee2e6</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">0.25rem</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0.5rem</span>;
}

<span class="hljs-selector-class">.chat-send-button</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#007bff</span>;
  <span class="hljs-attribute">color</span>: white;
  <span class="hljs-attribute">border</span>: none;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">0.25rem</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0.5rem</span> <span class="hljs-number">1rem</span>;
  <span class="hljs-attribute">cursor</span>: pointer;
}

<span class="hljs-selector-class">.chat-send-button</span><span class="hljs-selector-pseudo">:hover</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#0069d9</span>;
}

<span class="hljs-comment">/* Message Styles */</span>
<span class="hljs-selector-class">.message</span> {
  <span class="hljs-attribute">margin-bottom</span>: <span class="hljs-number">1rem</span>;
  <span class="hljs-attribute">max-width</span>: <span class="hljs-number">80%</span>;
}

<span class="hljs-selector-class">.user-message</span> {
  <span class="hljs-attribute">margin-left</span>: auto;
  <span class="hljs-attribute">text-align</span>: right;
}

<span class="hljs-selector-class">.agent-message</span> {
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">align-items</span>: flex-start;
}

<span class="hljs-selector-class">.message-avatar</span> {
  <span class="hljs-attribute">margin-right</span>: <span class="hljs-number">0.5rem</span>;
}

<span class="hljs-selector-class">.message-content</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#fff</span>;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">0.75rem</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">0.5rem</span>;
  <span class="hljs-attribute">box-shadow</span>: <span class="hljs-number">0</span> <span class="hljs-number">1px</span> <span class="hljs-number">2px</span> <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0.05</span>);
}

<span class="hljs-selector-class">.user-message</span> <span class="hljs-selector-class">.message-content</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#007bff</span>;
  <span class="hljs-attribute">color</span>: <span class="hljs-number">#fff</span>;
}

<span class="hljs-selector-class">.agent-message</span> <span class="hljs-selector-class">.message-content</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#fff</span>;
}

<span class="hljs-comment">/* Loading Animation */</span>
<span class="hljs-selector-class">.loading-dots</span><span class="hljs-selector-pseudo">:after</span> {
  <span class="hljs-attribute">content</span>: <span class="hljs-string">'.'</span>;
  <span class="hljs-attribute">animation</span>: dots <span class="hljs-number">1.5s</span> <span class="hljs-built_in">steps</span>(<span class="hljs-number">5</span>, end) infinite;
}

<span class="hljs-keyword">@keyframes</span> dots {
  0%,
  20% {
    <span class="hljs-attribute">content</span>: <span class="hljs-string">'.'</span>;
  }
  40% {
    <span class="hljs-attribute">content</span>: <span class="hljs-string">'..'</span>;
  }
  60% {
    <span class="hljs-attribute">content</span>: <span class="hljs-string">'...'</span>;
  }
  80%,
  100% {
    <span class="hljs-attribute">content</span>: <span class="hljs-string">''</span>;
  }
}
</code></pre>
<p>This code has the main styles for the layout of the website’s content. That takes care of the styling. We just have the components and pages left, and then you can run your app. Before we start on those folders, let’s quickly do the <code>App.jsx</code> and <code>main.jsx</code> files in the <code>src</code> folder.</p>
<p>So, add this code to the <code>App.jsx</code> file:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { BrowserRouter <span class="hljs-keyword">as</span> Router, Routes, Route } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-router'</span>;
<span class="hljs-keyword">import</span> Layout <span class="hljs-keyword">from</span> <span class="hljs-string">'./components/Layout'</span>;
<span class="hljs-keyword">import</span> Home <span class="hljs-keyword">from</span> <span class="hljs-string">'./pages/Home'</span>;
<span class="hljs-keyword">import</span> Projects <span class="hljs-keyword">from</span> <span class="hljs-string">'./pages/Projects'</span>;
<span class="hljs-keyword">import</span> Career <span class="hljs-keyword">from</span> <span class="hljs-string">'./pages/Career'</span>;
<span class="hljs-keyword">import</span> Services <span class="hljs-keyword">from</span> <span class="hljs-string">'./pages/Services'</span>;
<span class="hljs-keyword">import</span> Research <span class="hljs-keyword">from</span> <span class="hljs-string">'./pages/Research'</span>;
<span class="hljs-keyword">import</span> Contact <span class="hljs-keyword">from</span> <span class="hljs-string">'./pages/Contact'</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">'./App.css'</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Router</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Layout</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">Routes</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">Route</span> <span class="hljs-attr">path</span>=<span class="hljs-string">"/"</span> <span class="hljs-attr">element</span>=<span class="hljs-string">{</span>&lt;<span class="hljs-attr">Home</span> /&gt;</span>} /&gt;
          <span class="hljs-tag">&lt;<span class="hljs-name">Route</span> <span class="hljs-attr">path</span>=<span class="hljs-string">"/projects"</span> <span class="hljs-attr">element</span>=<span class="hljs-string">{</span>&lt;<span class="hljs-attr">Projects</span> /&gt;</span>} /&gt;
          <span class="hljs-tag">&lt;<span class="hljs-name">Route</span> <span class="hljs-attr">path</span>=<span class="hljs-string">"/career"</span> <span class="hljs-attr">element</span>=<span class="hljs-string">{</span>&lt;<span class="hljs-attr">Career</span> /&gt;</span>} /&gt;
          <span class="hljs-tag">&lt;<span class="hljs-name">Route</span> <span class="hljs-attr">path</span>=<span class="hljs-string">"/services"</span> <span class="hljs-attr">element</span>=<span class="hljs-string">{</span>&lt;<span class="hljs-attr">Services</span> /&gt;</span>} /&gt;
          <span class="hljs-tag">&lt;<span class="hljs-name">Route</span> <span class="hljs-attr">path</span>=<span class="hljs-string">"/research"</span> <span class="hljs-attr">element</span>=<span class="hljs-string">{</span>&lt;<span class="hljs-attr">Research</span> /&gt;</span>} /&gt;
          <span class="hljs-tag">&lt;<span class="hljs-name">Route</span> <span class="hljs-attr">path</span>=<span class="hljs-string">"/contact"</span> <span class="hljs-attr">element</span>=<span class="hljs-string">{</span>&lt;<span class="hljs-attr">Contact</span> /&gt;</span>} /&gt;
        <span class="hljs-tag">&lt;/<span class="hljs-name">Routes</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">Layout</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">Router</span>&gt;</span></span>
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> App;
</code></pre>
<p>In this file, you have all of your routes. This is how you’ll navigate between pages using <code>BrowserRouter</code>.</p>
<p>Finally, replace and update all of the code inside of <code>main.jsx</code> with this:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { StrictMode } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> { createRoot } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-dom/client'</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">'./index.css'</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">'./style.css'</span>;
<span class="hljs-keyword">import</span> App <span class="hljs-keyword">from</span> <span class="hljs-string">'./App.jsx'</span>;

createRoot(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'root'</span>)).render(
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">StrictMode</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">App</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">StrictMode</span>&gt;</span></span>
);
</code></pre>
<p>The only update we did here was add an import for <code>import './style.css'</code> so now you can access the styles from this file across your application.</p>
<p>Time to work on your component files, starting with the <code>Chat.jsx</code> file. I split the codebase because it’s a big file, so make sure you add it all together.</p>
<p>Like before, here is the first part:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { useState, useEffect, useRef, useCallback } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;
<span class="hljs-keyword">import</span> axios <span class="hljs-keyword">from</span> <span class="hljs-string">"axios"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Chat</span>(<span class="hljs-params">{ agentType, initialMessage, agentInitials, directQuestion }</span>) </span>{
  <span class="hljs-keyword">const</span> [messages, setMessages] = useState([]);
  <span class="hljs-keyword">const</span> [input, setInput] = useState(<span class="hljs-string">""</span>);
  <span class="hljs-keyword">const</span> [isLoading, setIsLoading] = useState(<span class="hljs-literal">false</span>);
  <span class="hljs-keyword">const</span> messagesEndRef = useRef(<span class="hljs-literal">null</span>);
  <span class="hljs-keyword">const</span> [processedQuestions, setProcessedQuestions] = useState([]);

  <span class="hljs-keyword">const</span> API_BASE_URL = <span class="hljs-string">"http://127.0.0.1:5001"</span>;

  <span class="hljs-keyword">const</span> scrollToBottom = <span class="hljs-function">() =&gt;</span> {
    messagesEndRef.current?.scrollIntoView({ <span class="hljs-attr">behavior</span>: <span class="hljs-string">"smooth"</span> });
  };

  <span class="hljs-keyword">const</span> handleSendMessage = useCallback(
    <span class="hljs-keyword">async</span> (questionOverride = <span class="hljs-literal">null</span>) =&gt; {
      <span class="hljs-keyword">const</span> messageToSend = questionOverride || input;

      <span class="hljs-keyword">if</span> (!messageToSend.trim()) <span class="hljs-keyword">return</span>;

      <span class="hljs-keyword">const</span> userMessage = {
        <span class="hljs-attr">content</span>: messageToSend,
        <span class="hljs-attr">isUser</span>: <span class="hljs-literal">true</span>,
      };

      setMessages(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> [...prev, userMessage]);

      <span class="hljs-keyword">if</span> (!questionOverride) {
        setInput(<span class="hljs-string">""</span>);
      }

      setIsLoading(<span class="hljs-literal">true</span>);

      <span class="hljs-keyword">try</span> {
        <span class="hljs-keyword">const</span> response = <span class="hljs-keyword">await</span> axios.post(
          <span class="hljs-string">`<span class="hljs-subst">${API_BASE_URL}</span>/api/<span class="hljs-subst">${agentType}</span>`</span>,
          {
            <span class="hljs-attr">message</span>: messageToSend,
          },
          {
            <span class="hljs-attr">headers</span>: {
              <span class="hljs-string">"Content-Type"</span>: <span class="hljs-string">"application/json"</span>,
              <span class="hljs-string">"Access-Control-Allow-Origin"</span>: <span class="hljs-string">"*"</span>,
            },
          }
        );

        <span class="hljs-keyword">if</span> (response.data &amp;&amp; response.data.response) {
          setMessages(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> [
            ...prev,
            {
              <span class="hljs-attr">content</span>: response.data.response,
              <span class="hljs-attr">isUser</span>: <span class="hljs-literal">false</span>,
            },
          ]);
        }
      } <span class="hljs-keyword">catch</span> (error) {
        <span class="hljs-built_in">console</span>.error(<span class="hljs-string">"Error sending message:"</span>, error);
        setMessages(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> [
          ...prev,
          {
            <span class="hljs-attr">content</span>:
              <span class="hljs-string">"Sorry, there was an error connecting to the AI agent. Please make sure the Flask server is running at http://127.0.0.1:5001/"</span>,
            <span class="hljs-attr">isUser</span>: <span class="hljs-literal">false</span>,
          },
        ]);
      } <span class="hljs-keyword">finally</span> {
        setIsLoading(<span class="hljs-literal">false</span>);
      }
    },
    [input, agentType, API_BASE_URL]
  );

  <span class="hljs-keyword">const</span> handleKeyPress = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    <span class="hljs-keyword">if</span> (e.key === <span class="hljs-string">"Enter"</span>) {
      handleSendMessage();
    }
  };

  <span class="hljs-keyword">const</span> cleanQuestion = <span class="hljs-function">(<span class="hljs-params">question</span>) =&gt;</span> {
    <span class="hljs-keyword">return</span> question.replace(<span class="hljs-regexp">/\s*\[\d+\]\s*$/</span>, <span class="hljs-string">""</span>);
  };

  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">if</span> (initialMessage) {
      setMessages([
        {
          <span class="hljs-attr">content</span>: initialMessage,
          <span class="hljs-attr">isUser</span>: <span class="hljs-literal">false</span>,
        },
      ]);
    }
  }, [initialMessage]);

  useEffect(<span class="hljs-function">() =&gt;</span> {
    scrollToBottom();
  }, [messages]);
</code></pre>
<p>The first part of this code has your imports, base URL to connect to the backend, and the functions.</p>
<p>Now let’s add the second part of the codebase:</p>
<pre><code class="lang-javascript">  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">if</span> (
      directQuestion &amp;&amp;
      directQuestion.trim() !== <span class="hljs-string">""</span> &amp;&amp;
      !processedQuestions.includes(directQuestion)
    ) {
      <span class="hljs-keyword">const</span> cleanedQuestion = cleanQuestion(directQuestion);
      setInput(cleanedQuestion);
      handleSendMessage(cleanedQuestion);
      setProcessedQuestions(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> [...prev, directQuestion]);
    }
  }, [directQuestion, processedQuestions, handleSendMessage]);

  <span class="hljs-keyword">const</span> renderContent = <span class="hljs-function">(<span class="hljs-params">content</span>) =&gt;</span> {
    <span class="hljs-keyword">let</span> formattedContent = content;

    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/#{6}\s+(.*?)(?=\n|$)/g</span>,
      <span class="hljs-string">"&lt;h6&gt;$1&lt;/h6&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/#{5}\s+(.*?)(?=\n|$)/g</span>,
      <span class="hljs-string">"&lt;h5&gt;$1&lt;/h5&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/#{4}\s+(.*?)(?=\n|$)/g</span>,
      <span class="hljs-string">"&lt;h4&gt;$1&lt;/h4&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/#{3}\s+(.*?)(?=\n|$)/g</span>,
      <span class="hljs-string">"&lt;h3&gt;$1&lt;/h3&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/#{2}\s+(.*?)(?=\n|$)/g</span>,
      <span class="hljs-string">"&lt;h2&gt;$1&lt;/h2&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/#{1}\s+(.*?)(?=\n|$)/g</span>,
      <span class="hljs-string">"&lt;h1&gt;$1&lt;/h1&gt;"</span>
    );

    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/\*\*(.*?)\*\*/g</span>,
      <span class="hljs-string">"&lt;strong&gt;$1&lt;/strong&gt;"</span>
    );

    formattedContent = formattedContent.replace(<span class="hljs-regexp">/\*(.*?)\*/g</span>, <span class="hljs-string">"&lt;em&gt;$1&lt;/em&gt;"</span>);

    formattedContent = formattedContent.replace(<span class="hljs-regexp">/`(.*?)`/g</span>, <span class="hljs-string">"&lt;code&gt;$1&lt;/code&gt;"</span>);

    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/\[(.*?)\]\((.*?)\)/g</span>,
      <span class="hljs-string">'&lt;a href="$2" target="_blank"&gt;$1&lt;/a&gt;'</span>
    );

    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/^\s*\*\s+(.*?)(?=\n|$)/gm</span>,
      <span class="hljs-string">"&lt;li&gt;$1&lt;/li&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/&lt;li&gt;(.*?)&lt;\/li&gt;(?:\s*&lt;li&gt;.*?&lt;\/li&gt;)*/g</span>,
      <span class="hljs-string">"&lt;ul&gt;$&amp;&lt;/ul&gt;"</span>
    );

    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/^\s*\d+\.\s+(.*?)(?=\n|$)/gm</span>,
      <span class="hljs-string">"&lt;li&gt;$1&lt;/li&gt;"</span>
    );
    formattedContent = formattedContent.replace(
      <span class="hljs-regexp">/&lt;li&gt;(.*?)&lt;\/li&gt;(?:\s*&lt;li&gt;.*?&lt;\/li&gt;)*/g</span>,
      <span class="hljs-string">"&lt;ol&gt;$&amp;&lt;/ol&gt;"</span>
    );

    <span class="hljs-keyword">return</span> { <span class="hljs-attr">__html</span>: formattedContent };
  };

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"chat-container"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"chat-messages"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">{</span>`${<span class="hljs-attr">agentType</span>}<span class="hljs-attr">-messages</span>`}&gt;</span>
        {messages.map((message, index) =&gt; (
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span>
            <span class="hljs-attr">key</span>=<span class="hljs-string">{index}</span>
            <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">message</span> ${
              <span class="hljs-attr">message.isUser</span> ? "<span class="hljs-attr">user-message</span>" <span class="hljs-attr">:</span> "<span class="hljs-attr">agent-message</span>"
            }`}
          &gt;</span>
            {!message.isUser &amp;&amp; (
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"message-avatar"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"avatar-placeholder"</span>&gt;</span>
                  {agentInitials || "AI"}
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            )}
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"message-content"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">dangerouslySetInnerHTML</span>=<span class="hljs-string">{renderContent(message.content)}</span> /&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        ))}
        {isLoading &amp;&amp; (
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"message agent-message"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"message-avatar"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"avatar-placeholder"</span>&gt;</span>{agentInitials || "AI"}<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"message-content"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"loading-dots"</span>&gt;</span>Thinking<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        )}
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">{messagesEndRef}</span> /&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"chat-input-container"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"chat-input-group"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">input</span>
            <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span>
            <span class="hljs-attr">id</span>=<span class="hljs-string">{</span>`${<span class="hljs-attr">agentType</span>}<span class="hljs-attr">-input</span>`}
            <span class="hljs-attr">className</span>=<span class="hljs-string">"chat-input"</span>
            <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Type your message..."</span>
            <span class="hljs-attr">value</span>=<span class="hljs-string">{input}</span>
            <span class="hljs-attr">onChange</span>=<span class="hljs-string">{(e)</span> =&gt;</span> setInput(e.target.value)}
            onKeyPress={handleKeyPress}
          /&gt;
          <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
            <span class="hljs-attr">id</span>=<span class="hljs-string">{</span>`${<span class="hljs-attr">agentType</span>}<span class="hljs-attr">-send</span>`}
            <span class="hljs-attr">className</span>=<span class="hljs-string">"chat-send-button"</span>
            <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> handleSendMessage()}
          &gt;
            <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"fa-solid fa-paper-plane mr-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>Send
          <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Chat;
</code></pre>
<p>The second part of the code mostly has the JSX for the components.</p>
<p>Right, next let’s do the <code>Footer.jsx</code> file by adding this code to the file:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Footer</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">footer</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-dark text-white py-4"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"container"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"row"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col-md-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span>&gt;</span>Portfolio<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Showcasing my work with the help of AI agents<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col-md-6 text-md-end"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span>&gt;</span>Connect<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"social-links"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-white me-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-white me-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-white me-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"row mt-3"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col-12 text-center"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-0"</span>&gt;</span>
              <span class="hljs-symbol">&amp;copy;</span> {new Date().getFullYear()} Portfolio. All rights reserved.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span></span>
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Footer;
</code></pre>
<p>The code is pretty much self-explanatory – it has some contact details which will show up at the bottom of your page in the footer section.</p>
<p>Now we can work on the <code>Layout.jsx</code>. I have also split it into two parts.</p>
<p>Add the first part of the codebase here:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { Link, useLocation } <span class="hljs-keyword">from</span> <span class="hljs-string">"react-router"</span>;
<span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Layout</span>(<span class="hljs-params">{ children }</span>) </span>{
  <span class="hljs-keyword">const</span> location = useLocation();
  <span class="hljs-keyword">const</span> [isMenuOpen, setIsMenuOpen] = useState(<span class="hljs-literal">false</span>);

  <span class="hljs-keyword">return</span> (
    &lt;div className="flex flex-col min-h-screen"&gt;
      &lt;nav className="bg-gray-800 text-white"&gt;
        &lt;div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"&gt;
          &lt;div className="flex justify-between h-16"&gt;
            &lt;div className="flex items-center"&gt;
              &lt;Link className="text-xl font-bold" to="/"&gt;
                Portfolio
              &lt;/Link&gt;
            &lt;/div&gt;
            &lt;div className="hidden md:block"&gt;
              &lt;div className="ml-10 flex items-center space-x-4"&gt;
                &lt;Link
                  className={`px-3 py-2 rounded-md text-sm font-medium ${
                    location.pathname === "/"
                      ? "bg-gray-900 text-white"
                      : "text-gray-300 hover:bg-gray-700 hover:text-white"
                  }`}
                  to="/"
                &gt;
                  Home
                &lt;/Link&gt;
                &lt;Link
                  className={`px-3 py-2 rounded-md text-sm font-medium ${
                    location.pathname === "/projects"
                      ? "bg-gray-900 text-white"
                      : "text-gray-300 hover:bg-gray-700 hover:text-white"
                  }`}
                  to="/projects"
                &gt;
                  Projects
                &lt;/Link&gt;
                &lt;Link
                  className={`px-3 py-2 rounded-md text-sm font-medium ${
                    location.pathname === "/career"
                      ? "bg-gray-900 text-white"
                      : "text-gray-300 hover:bg-gray-700 hover:text-white"
                  }`}
                  to="/career"
                &gt;
                  Career
                &lt;/Link&gt;
                &lt;Link
                  className={`px-3 py-2 rounded-md text-sm font-medium ${
                    location.pathname === "/services"
                      ? "bg-gray-900 text-white"
                      : "text-gray-300 hover:bg-gray-700 hover:text-white"
                  }`}
                  to="/services"
                &gt;
                  Services
                &lt;/Link&gt;
                &lt;Link
                  className={`px-3 py-2 rounded-md text-sm font-medium ${
                    location.pathname === "/research"
                      ? "bg-gray-900 text-white"
                      : "text-gray-300 hover:bg-gray-700 hover:text-white"
                  }`}
                  to="/research"
                &gt;
                  Research
                &lt;/Link&gt;
                &lt;Link
                  className={`px-3 py-2 rounded-md text-sm font-medium ${
                    location.pathname === "/contact"
                      ? "bg-gray-900 text-white"
                      : "text-gray-300 hover:bg-gray-700 hover:text-white"
                  }`}
                  to="/contact"
                &gt;
                  Contact
                &lt;/Link&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div className="md:hidden flex items-center"&gt;
              &lt;button
                onClick={() =&gt; setIsMenuOpen(!isMenuOpen)}
                className="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
              &gt;
                &lt;span className="sr-only"&gt;Open main menu&lt;/span&gt;
                {isMenuOpen ? (
                  &lt;svg
                    className="block h-6 w-6"
                    xmlns="http://www.w3.org/2000/svg"
                    fill="none"
                    viewBox="0 0 24 24"
                    stroke="currentColor"
                    aria-hidden="true"
                  &gt;
                    &lt;path
                      strokeLinecap="round"
                      strokeLinejoin="round"
                      strokeWidth="2"
                      d="M6 18L18 6M6 6l12 12"
                    /&gt;
                  &lt;/svg&gt;
                ) : (
                  &lt;svg
                    className="block h-6 w-6"
                    xmlns="http://www.w3.org/2000/svg"
                    fill="none"
                    viewBox="0 0 24 24"
                    stroke="currentColor"
                    aria-hidden="true"
                  &gt;
                    &lt;path
                      strokeLinecap="round"
                      strokeLinejoin="round"
                      strokeWidth="2"
                      d="M4 6h16M4 12h16M4 18h16"
                    /&gt;
                  &lt;/svg&gt;
                )}
              &lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
</code></pre>
<p>This part of the code has a lot of components, as expected for the layout.</p>
<p>Here is the second part of the code to be added to the file:</p>
<pre><code class="lang-javascript">        {<span class="hljs-comment">/* Mobile menu, show/hide based on menu state */</span>}
        {isMenuOpen &amp;&amp; (
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"md:hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2 pt-2 pb-3 space-y-1 sm:px-3"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">block</span> <span class="hljs-attr">px-3</span> <span class="hljs-attr">py-2</span> <span class="hljs-attr">rounded-md</span> <span class="hljs-attr">text-base</span> <span class="hljs-attr">font-medium</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">"/"</span>
                    ? "<span class="hljs-attr">bg-gray-900</span> <span class="hljs-attr">text-white</span>"
                    <span class="hljs-attr">:</span> "<span class="hljs-attr">text-gray-300</span> <span class="hljs-attr">hover:bg-gray-700</span> <span class="hljs-attr">hover:text-white</span>"
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setIsMenuOpen(false)}
              &gt;
                Home
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">block</span> <span class="hljs-attr">px-3</span> <span class="hljs-attr">py-2</span> <span class="hljs-attr">rounded-md</span> <span class="hljs-attr">text-base</span> <span class="hljs-attr">font-medium</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">"/projects"</span>
                    ? "<span class="hljs-attr">bg-gray-900</span> <span class="hljs-attr">text-white</span>"
                    <span class="hljs-attr">:</span> "<span class="hljs-attr">text-gray-300</span> <span class="hljs-attr">hover:bg-gray-700</span> <span class="hljs-attr">hover:text-white</span>"
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/projects"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setIsMenuOpen(false)}
              &gt;
                Projects
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">block</span> <span class="hljs-attr">px-3</span> <span class="hljs-attr">py-2</span> <span class="hljs-attr">rounded-md</span> <span class="hljs-attr">text-base</span> <span class="hljs-attr">font-medium</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">"/career"</span>
                    ? "<span class="hljs-attr">bg-gray-900</span> <span class="hljs-attr">text-white</span>"
                    <span class="hljs-attr">:</span> "<span class="hljs-attr">text-gray-300</span> <span class="hljs-attr">hover:bg-gray-700</span> <span class="hljs-attr">hover:text-white</span>"
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/career"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setIsMenuOpen(false)}
              &gt;
                Career
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">block</span> <span class="hljs-attr">px-3</span> <span class="hljs-attr">py-2</span> <span class="hljs-attr">rounded-md</span> <span class="hljs-attr">text-base</span> <span class="hljs-attr">font-medium</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">"/services"</span>
                    ? "<span class="hljs-attr">bg-gray-900</span> <span class="hljs-attr">text-white</span>"
                    <span class="hljs-attr">:</span> "<span class="hljs-attr">text-gray-300</span> <span class="hljs-attr">hover:bg-gray-700</span> <span class="hljs-attr">hover:text-white</span>"
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/services"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setIsMenuOpen(false)}
              &gt;
                Services
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">block</span> <span class="hljs-attr">px-3</span> <span class="hljs-attr">py-2</span> <span class="hljs-attr">rounded-md</span> <span class="hljs-attr">text-base</span> <span class="hljs-attr">font-medium</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">"/research"</span>
                    ? "<span class="hljs-attr">bg-gray-900</span> <span class="hljs-attr">text-white</span>"
                    <span class="hljs-attr">:</span> "<span class="hljs-attr">text-gray-300</span> <span class="hljs-attr">hover:bg-gray-700</span> <span class="hljs-attr">hover:text-white</span>"
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/research"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setIsMenuOpen(false)}
              &gt;
                Research
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">block</span> <span class="hljs-attr">px-3</span> <span class="hljs-attr">py-2</span> <span class="hljs-attr">rounded-md</span> <span class="hljs-attr">text-base</span> <span class="hljs-attr">font-medium</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">"/contact"</span>
                    ? "<span class="hljs-attr">bg-gray-900</span> <span class="hljs-attr">text-white</span>"
                    <span class="hljs-attr">:</span> "<span class="hljs-attr">text-gray-300</span> <span class="hljs-attr">hover:bg-gray-700</span> <span class="hljs-attr">hover:text-white</span>"
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/contact"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setIsMenuOpen(false)}
              &gt;
                Contact
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
        )}
      &lt;/nav&gt;

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">main</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex-grow max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-8"</span>&gt;</span>
        {children}
      <span class="hljs-tag">&lt;/<span class="hljs-name">main</span>&gt;</span></span>

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">footer</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-gray-800 text-white py-8"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"md:flex md:justify-between"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-8 md:mb-0"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-lg font-semibold mb-2"</span>&gt;</span>Portfolio<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-300"</span>&gt;</span>
                Showcasing my work with the help of AI agents
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-8 border-t border-gray-700 pt-8 text-center"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-300"</span>&gt;</span>
              <span class="hljs-symbol">&amp;copy;</span> 2025 Portfolio. All rights reserved.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span></span>
    &lt;/div&gt;
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Layout;
</code></pre>
<p>This code has more components, which completes the Layout component.</p>
<p>We’re almost done. Now for the last component, <code>Navbar.jsx</code>, before we move on to the pages.</p>
<p>This is the code you need for the file:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { Link, useLocation } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-router'</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Navbar</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> location = useLocation();

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">nav</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"navbar navbar-expand-lg navbar-dark bg-dark"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"container"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">Link</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"navbar-brand"</span> <span class="hljs-attr">to</span>=<span class="hljs-string">"/"</span>&gt;</span>
          Portfolio
        <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
          <span class="hljs-attr">className</span>=<span class="hljs-string">"navbar-toggler"</span>
          <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span>
          <span class="hljs-attr">data-bs-toggle</span>=<span class="hljs-string">"collapse"</span>
          <span class="hljs-attr">data-bs-target</span>=<span class="hljs-string">"#navbarNav"</span>
        &gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"navbar-toggler-icon"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"collapse navbar-collapse"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"navbarNav"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"navbar-nav ms-auto"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">nav-link</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">'/'</span> ? '<span class="hljs-attr">active</span>' <span class="hljs-attr">:</span> ''
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/"</span>
              &gt;</span>
                Home
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">nav-link</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">'/projects'</span> ? '<span class="hljs-attr">active</span>' <span class="hljs-attr">:</span> ''
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/projects"</span>
              &gt;</span>
                Projects
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">nav-link</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">'/career'</span> ? '<span class="hljs-attr">active</span>' <span class="hljs-attr">:</span> ''
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/career"</span>
              &gt;</span>
                Career
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">nav-link</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">'/services'</span> ? '<span class="hljs-attr">active</span>' <span class="hljs-attr">:</span> ''
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/services"</span>
              &gt;</span>
                Services
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">nav-link</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">'/research'</span> ? '<span class="hljs-attr">active</span>' <span class="hljs-attr">:</span> ''
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/research"</span>
              &gt;</span>
                Research
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">nav-link</span> ${
                  <span class="hljs-attr">location.pathname</span> === <span class="hljs-string">'/contact'</span> ? '<span class="hljs-attr">active</span>' <span class="hljs-attr">:</span> ''
                }`}
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/contact"</span>
              &gt;</span>
                Contact
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">nav</span>&gt;</span></span>
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Navbar;
</code></pre>
<p>The navbar component has your navigation links, which lets you navigate between pages using <code>react-router</code>.</p>
<p>Alright, the component codebase is ready! All that remains is the six page routes in our pages folder.</p>
<p>The first file we’ll work on will be the <code>Career.jsx</code> file. I will split the codebase for readability like before, so copy the different sections starting with the first part here:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;
<span class="hljs-keyword">import</span> Chat <span class="hljs-keyword">from</span> <span class="hljs-string">"../components/Chat"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Career</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> initialMessage =
    <span class="hljs-string">"Hello! I'm CareerAgent, the career specialist. I can provide information about skills, experience, and professional background. What would you like to know?"</span>;

  <span class="hljs-keyword">const</span> [currentQuestion, setCurrentQuestion] = useState(<span class="hljs-string">""</span>);

  <span class="hljs-keyword">const</span> askCareerQuestion = <span class="hljs-function">(<span class="hljs-params">question</span>) =&gt;</span> {
    setCurrentQuestion(<span class="hljs-string">`<span class="hljs-subst">${question}</span> [<span class="hljs-subst">${<span class="hljs-built_in">Date</span>.now()}</span>]`</span>);

    <span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =&gt;</span> {
      setCurrentQuestion(<span class="hljs-string">""</span>);
    }, <span class="hljs-number">500</span>);
  };

  <span class="hljs-keyword">return</span> (
    &lt;div&gt;
      &lt;div className="flex flex-col md:flex-row gap-8 mb-12"&gt;
        &lt;div className="md:w-1/3"&gt;
          &lt;h1 className="text-3xl font-bold mb-4"&gt;Career&lt;/h1&gt;
          &lt;p className="text-lg mb-4"&gt;
            Here you can find information about my professional background,
            skills, and experience. Feel free to ask CareerAgent for more
            details.
          &lt;/p&gt;
        &lt;/div&gt;
        &lt;div className="md:w-2/3"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;
                Chat with CareerAgent
              &lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                Our career specialist can provide information about skills,
                experience, and professional background.
              &lt;/p&gt;
              &lt;Chat
                agentType="career"
                initialMessage={initialMessage}
                agentInitials="CA"
                directQuestion={currentQuestion}
              /&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div className="mb-12"&gt;
        &lt;div className="mb-6"&gt;
          &lt;h2 className="text-2xl font-bold mb-4"&gt;Skills&lt;/h2&gt;
        &lt;/div&gt;
        &lt;div className="grid grid-cols-1 md:grid-cols-3 gap-6"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden h-full"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-4"&gt;
                Frontend Development
              &lt;/h5&gt;
              &lt;ul className="divide-y divide-gray-200"&gt;
                &lt;li className="py-3 flex justify-between items-center"&gt;
                  React
                  &lt;span className="px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"&gt;
                    Expert
                  &lt;/span&gt;
                &lt;/li&gt;
                &lt;li className="py-3 flex justify-between items-center"&gt;
                  Vue.js
                  &lt;span className="px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"&gt;
                    Advanced
                  &lt;/span&gt;
                &lt;/li&gt;
                &lt;li className="py-3 flex justify-between items-center"&gt;
                  Angular
                  &lt;span className="px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"&gt;
                    Intermediate
                  &lt;/span&gt;
                &lt;/li&gt;
                &lt;li className="py-3 flex justify-between items-center"&gt;
                  TypeScript
                  &lt;span className="px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"&gt;
                    Advanced
                  &lt;/span&gt;
                &lt;/li&gt;
                &lt;li className="py-3 flex justify-between items-center"&gt;
                  CSS/SASS
                  &lt;span className="px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"&gt;
                    Expert
                  &lt;/span&gt;
                &lt;/li&gt;
              &lt;/ul&gt;
              &lt;button
                className="mt-4 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"
                onClick={() =&gt;
                  askCareerQuestion(
                    "Tell me more about your frontend development skills"
                  )
                }
              &gt;
                Ask About Frontend Skills
              &lt;/button&gt;
</code></pre>
<p>Like before, we have imports, states, and some components. Now for the second part, which is here:</p>
<pre><code class="lang-javascript"> &lt;/div&gt;
          &lt;/div&gt;
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-4"</span>&gt;</span>
                Backend Development
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"divide-y divide-gray-200"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Node.js
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Expert
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Python
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Advanced
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Django
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Intermediate
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Flask
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Advanced
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  SQL/NoSQL
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Advanced
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askCareerQuestion(
                    "Tell me more about your backend development skills"
                  )
                }
              &gt;
                Ask About Backend Skills
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-4"</span>&gt;</span>Other Skills<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"divide-y divide-gray-200"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  DevOps
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Intermediate
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  UI/UX Design
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Advanced
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Project Management
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Advanced
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Agile Methodologies
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Expert
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                  Technical Writing
                  <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"px-2.5 py-0.5 bg-blue-500 text-white text-xs font-medium rounded-full"</span>&gt;</span>
                    Intermediate
                  <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askCareerQuestion("What other skills do you have?")
                }
              &gt;
                Ask About Other Skills
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
        &lt;/div&gt;
      &lt;/div&gt;
</code></pre>
<p>There is a lot more component code here for the career page. Lastly, lets add the last part of the code for this page:</p>
<pre><code class="lang-javascript">&lt;div className=<span class="hljs-string">"mb-12"</span>&gt;
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">h2</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-2xl font-bold mb-4"</span>&gt;</span>Experience<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"space-y-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-between items-start mb-2"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold"</span>&gt;</span>
                  Senior Full-Stack Developer
                <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2020 - Present<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-3"</span>&gt;</span>Tech Innovations Inc.<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-700 mb-4"</span>&gt;</span>
                Lead developer for multiple web and mobile applications,
                managing a team of 5 developers. Implemented CI/CD pipelines and
                improved development workflow efficiency by 30%.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askCareerQuestion(
                    "Tell me more about your experience at Tech Innovations Inc."
                  )
                }
              &gt;
                More Details
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-between items-start mb-2"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold"</span>&gt;</span>Full-Stack Developer<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2017 - 2020<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-3"</span>&gt;</span>WebSolutions Co.<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-700 mb-4"</span>&gt;</span>
                Developed and maintained multiple client websites and web
                applications. Specialized in React frontend development and
                Node.js backend services.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askCareerQuestion(
                    "Tell me more about your experience at WebSolutions Co."
                  )
                }
              &gt;
                More Details
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-between items-start mb-2"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold"</span>&gt;</span>Junior Web Developer<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2015 - 2017<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-3"</span>&gt;</span>Digital Creations Ltd.<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-700 mb-4"</span>&gt;</span>
                Worked on frontend development for e-commerce websites. Gained
                experience with JavaScript, CSS, and responsive design
                principles.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askCareerQuestion(
                    "Tell me more about your experience at Digital Creations Ltd."
                  )
                }
              &gt;
                More Details
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
      &lt;/div&gt;

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-2 gap-6"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-4"</span>&gt;</span>Education<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-between items-start mb-1"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-medium"</span>&gt;</span>
                  Master of Science in Computer Science
                <span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2013 - 2015<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600"</span>&gt;</span>University of Technology<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-between items-start mb-1"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-medium"</span>&gt;</span>
                  Bachelor of Science in Software Engineering
                <span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2009 - 2013<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600"</span>&gt;</span>State University<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
              <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                askCareerQuestion(
                  "Tell me more about your educational background"
                )
              }
            &gt;
              Ask About Education
            <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-4"</span>&gt;</span>Certifications<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"divide-y divide-gray-200"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                AWS Certified Solutions Architect
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2022<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                Google Cloud Professional Developer
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2021<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                Microsoft Certified: Azure Developer Associate
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2020<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 flex justify-between items-center"</span>&gt;</span>
                Certified Scrum Master
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-500 text-sm"</span>&gt;</span>2019<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
              <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                askCareerQuestion("Tell me more about your certifications")
              }
            &gt;
              Ask About Certifications
            <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
    &lt;/div&gt;
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Career;
</code></pre>
<p>And this completes our <code>Career.jsx</code> page: we have forms and more components in this part of the code.</p>
<p>Next is our <code>Contact.jsx</code> page. Like before, I will split the codebase for readability, so add the first part of this code to it:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Contact</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> [formData, setFormData] = useState({
    <span class="hljs-attr">name</span>: <span class="hljs-string">""</span>,
    <span class="hljs-attr">email</span>: <span class="hljs-string">""</span>,
    <span class="hljs-attr">subject</span>: <span class="hljs-string">""</span>,
    <span class="hljs-attr">message</span>: <span class="hljs-string">""</span>,
  });
  <span class="hljs-keyword">const</span> [formResponse, setFormResponse] = useState(<span class="hljs-literal">null</span>);

  <span class="hljs-keyword">const</span> handleChange = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    <span class="hljs-keyword">const</span> { id, value } = e.target;
    setFormData(<span class="hljs-function">(<span class="hljs-params">prevData</span>) =&gt;</span> ({
      ...prevData,
      [id]: value,
    }));
  };

  <span class="hljs-keyword">const</span> handleSubmit = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    e.preventDefault();

    setFormResponse({
      <span class="hljs-attr">type</span>: <span class="hljs-string">"success"</span>,
      <span class="hljs-attr">message</span>:
        <span class="hljs-string">"Thank you for your message! I'll get back to you as soon as possible."</span>,
    });

    setFormData({
      <span class="hljs-attr">name</span>: <span class="hljs-string">""</span>,
      <span class="hljs-attr">email</span>: <span class="hljs-string">""</span>,
      <span class="hljs-attr">subject</span>: <span class="hljs-string">""</span>,
      <span class="hljs-attr">message</span>: <span class="hljs-string">""</span>,
    });

    <span class="hljs-built_in">document</span>
      .getElementById(<span class="hljs-string">"form-response"</span>)
      .scrollIntoView({ <span class="hljs-attr">behavior</span>: <span class="hljs-string">"smooth"</span> });
  };

  <span class="hljs-keyword">return</span> (
    &lt;div&gt;
      &lt;div className="flex flex-col md:flex-row gap-8 mb-12"&gt;
        &lt;div className="md:w-2/3"&gt;
          &lt;h1 className="text-3xl font-bold mb-4"&gt;Contact Me&lt;/h1&gt;
          &lt;p className="text-lg mb-4"&gt;
            Have a question or want to discuss a potential project? Feel free to
            reach out using the form below or through any of my social media
            channels.
          &lt;/p&gt;
        &lt;/div&gt;
        &lt;div className="md:w-1/3"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-4"&gt;Quick Links&lt;/h5&gt;
              &lt;div className="flex flex-col gap-2"&gt;
                &lt;a
                  href="/projects"
                  className="py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 text-center transition-colors"
                &gt;
                  View Projects
                &lt;/a&gt;
                &lt;a
                  href="/services"
                  className="py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 text-center transition-colors"
                &gt;
                  Services &amp; Pricing
                &lt;/a&gt;
                &lt;a
                  href="/research"
                  className="py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 text-center transition-colors"
                &gt;
                  Research &amp; Resources
                &lt;/a&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12"&gt;
        &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
          &lt;div className="p-6"&gt;
            &lt;h5 className="text-xl font-semibold mb-4"&gt;Contact Form&lt;/h5&gt;
            &lt;form id="contact-form" onSubmit={handleSubmit}&gt;
              &lt;div className="mb-4"&gt;
                &lt;label
                  htmlFor="name"
                  className="block text-sm font-medium text-gray-700 mb-1"
                &gt;
                  Name
                &lt;/label&gt;
                &lt;input
                  type="text"
                  className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                  id="name"
                  placeholder="Your Name"
                  required
                  value={formData.name}
                  onChange={handleChange}
                /&gt;
              &lt;/div&gt;
</code></pre>
<p>We have our imports, functions, and part of the components here. Lastly, add the second part to complete this page:</p>
<pre><code class="lang-javascript">&lt;div className=<span class="hljs-string">"mb-4"</span>&gt;
                <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">label</span>
                  <span class="hljs-attr">htmlFor</span>=<span class="hljs-string">"email"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"block text-sm font-medium text-gray-700 mb-1"</span>
                &gt;</span>
                  Email
                <span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span></span>
                <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">input</span>
                  <span class="hljs-attr">type</span>=<span class="hljs-string">"email"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"</span>
                  <span class="hljs-attr">id</span>=<span class="hljs-string">"email"</span>
                  <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"your.email@example.com"</span>
                  <span class="hljs-attr">required</span>
                  <span class="hljs-attr">value</span>=<span class="hljs-string">{formData.email}</span>
                  <span class="hljs-attr">onChange</span>=<span class="hljs-string">{handleChange}</span>
                /&gt;</span></span>
              &lt;/div&gt;
              <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">label</span>
                  <span class="hljs-attr">htmlFor</span>=<span class="hljs-string">"subject"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"block text-sm font-medium text-gray-700 mb-1"</span>
                &gt;</span>
                  Subject
                <span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">input</span>
                  <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"</span>
                  <span class="hljs-attr">id</span>=<span class="hljs-string">"subject"</span>
                  <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Subject"</span>
                  <span class="hljs-attr">required</span>
                  <span class="hljs-attr">value</span>=<span class="hljs-string">{formData.subject}</span>
                  <span class="hljs-attr">onChange</span>=<span class="hljs-string">{handleChange}</span>
                /&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
              <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">label</span>
                  <span class="hljs-attr">htmlFor</span>=<span class="hljs-string">"message"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"block text-sm font-medium text-gray-700 mb-1"</span>
                &gt;</span>
                  Message
                <span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"</span>
                  <span class="hljs-attr">id</span>=<span class="hljs-string">"message"</span>
                  <span class="hljs-attr">rows</span>=<span class="hljs-string">"5"</span>
                  <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Your message..."</span>
                  <span class="hljs-attr">required</span>
                  <span class="hljs-attr">value</span>=<span class="hljs-string">{formData.message}</span>
                  <span class="hljs-attr">onChange</span>=<span class="hljs-string">{handleChange}</span>
                &gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
              <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">type</span>=<span class="hljs-string">"submit"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors"</span>
              &gt;</span>
                Send Message
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span></span>
            &lt;/form&gt;
            <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>
              <span class="hljs-attr">id</span>=<span class="hljs-string">"form-response"</span>
              <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4"</span>
              <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">display:</span> <span class="hljs-attr">formResponse</span> ? "<span class="hljs-attr">block</span>" <span class="hljs-attr">:</span> "<span class="hljs-attr">none</span>" }}
            &gt;</span>
              {formResponse &amp;&amp; (
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">{</span>`<span class="hljs-attr">p-4</span> ${
                    <span class="hljs-attr">formResponse.type</span> === <span class="hljs-string">"success"</span>
                      ? "<span class="hljs-attr">bg-green-100</span> <span class="hljs-attr">text-green-700</span>"
                      <span class="hljs-attr">:</span> "<span class="hljs-attr">bg-red-100</span> <span class="hljs-attr">text-red-700</span>"
                  } <span class="hljs-attr">rounded-md</span>`}
                &gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bi bi-check-circle-fill mr-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                  {formResponse.message}
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              )}
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
          &lt;/div&gt;
        &lt;/div&gt;
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"space-y-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-4"</span>&gt;</span>
                Contact Information
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"space-y-3"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex items-center"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bi bi-envelope mr-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">a</span>
                    <span class="hljs-attr">href</span>=<span class="hljs-string">"mailto:contact@example.com"</span>
                    <span class="hljs-attr">className</span>=<span class="hljs-string">"text-blue-500 hover:underline"</span>
                  &gt;</span>
                    contact@example.com
                  <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex items-center"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bi bi-geo-alt mr-2"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>
                  UK
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mt-6 mb-3"</span>&gt;</span>
                Connect on Social Media
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-wrap gap-2"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span>
                  <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"px-3 py-1.5 border border-gray-800 text-gray-800 rounded-md hover:bg-gray-100 flex items-center transition-colors"</span>
                &gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bi bi-github mr-1"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span> GitHub
                <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span>
                  <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"px-3 py-1.5 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 flex items-center transition-colors"</span>
                &gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bi bi-linkedin mr-1"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span> LinkedIn
                <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">a</span>
                  <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"px-3 py-1.5 border border-gray-800 text-gray-800 rounded-md hover:bg-gray-100 flex items-center transition-colors"</span>
                &gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bi bi-twitter mr-1"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span> X
                <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-3"</span>&gt;</span>Availability<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-700 mb-3"</span>&gt;</span>
                I'm currently available for freelance work and consulting. My
                typical response time is within 24 hours.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-700"</span>&gt;</span>
                For urgent inquiries, please call the phone number listed above.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
      &lt;/div&gt;
    &lt;/div&gt;
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Contact;
</code></pre>
<p>With that, this page is now done, and we have the rest of the components and form.</p>
<p>Ok just four pages left: let’s work on the home page first. The code is not that big so we can do it all at once.</p>
<p>This is the code to add to the <code>Home.jsx</code> page file:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { Link } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-router'</span>;
<span class="hljs-keyword">import</span> Chat <span class="hljs-keyword">from</span> <span class="hljs-string">'../components/Chat'</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Home</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> initialMessage =
    <span class="hljs-string">"Hello! I'm WelcomeAgent, the welcome specialist. I can help you navigate this portfolio website. Are you an employer, client, or fellow programmer?"</span>;

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-col md:flex-row gap-8 mb-12"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"md:w-1/3"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-3xl font-bold mb-4"</span>&gt;</span>Welcome to my Portfolio<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-lg mb-4"</span>&gt;</span>
            This portfolio showcases my work and skills with the help of
            specialized AI agents. Each agent is designed to assist you with
            different aspects of my portfolio.
          <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-700"</span>&gt;</span>
            Feel free to interact with the WelcomeAgent to get personalized
            recommendations on which sections of the portfolio to explore based
            on your interests.
          <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"md:w-2/3"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>
                Chat with WelcomeAgent
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
                Our welcome specialist can help you navigate this portfolio
                website.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Chat</span>
                <span class="hljs-attr">agentType</span>=<span class="hljs-string">"welcome"</span>
                <span class="hljs-attr">initialMessage</span>=<span class="hljs-string">{initialMessage}</span>
                <span class="hljs-attr">agentInitials</span>=<span class="hljs-string">"WA"</span>
              /&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-12"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">h2</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-2xl font-bold mb-4"</span>&gt;</span>Meet the Agents<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-3 gap-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6 flex flex-col items-center"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"agent-avatar-placeholder mb-4"</span>&gt;</span>PA<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>ProjectAgent<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4 text-center"</span>&gt;</span>
                Provides detailed information about my projects, technologies
                used, and challenges overcome.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/projects"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-auto py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              &gt;</span>
                View Projects
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6 flex flex-col items-center"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"agent-avatar-placeholder mb-4"</span>&gt;</span>CA<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>CareerAgent<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4 text-center"</span>&gt;</span>
                Shares information about my skills, experience, and professional
                background.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/career"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-auto py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              &gt;</span>
                View Career
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6 flex flex-col items-center"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"agent-avatar-placeholder mb-4"</span>&gt;</span>BA<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>BusinessAdvisor<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4 text-center"</span>&gt;</span>
                Provides information about services, pricing, and client
                engagement process.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/services"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-auto py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              &gt;</span>
                View Services
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-2 gap-6"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>Featured Projects<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
              Check out some of my recent work:
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"divide-y divide-gray-200"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 px-2"</span>&gt;</span>E-commerce Platform<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 px-2"</span>&gt;</span>Task Management Application<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 px-2"</span>&gt;</span>Data Visualization Dashboard<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/projects"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"inline-block py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              &gt;</span>
                View All Projects
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>Research &amp; Insights<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
              Explore my research on emerging technologies and industry trends:
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"divide-y divide-gray-200"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 px-2"</span>&gt;</span>AI in Web Development<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 px-2"</span>&gt;</span>Modern Frontend Frameworks<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">li</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"py-3 px-2"</span>&gt;</span>Cloud Architecture Patterns<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">Link</span>
                <span class="hljs-attr">to</span>=<span class="hljs-string">"/research"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"inline-block py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              &gt;</span>
                View Research
              <span class="hljs-tag">&lt;/<span class="hljs-name">Link</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Home;
</code></pre>
<p>This has the code for our home page and WelcomeAgent.</p>
<p>Alright, now let's work on the <code>Projects.jsx</code> page. For readability it's easier to split the code in half again. So here is the first part:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;
<span class="hljs-keyword">import</span> Chat <span class="hljs-keyword">from</span> <span class="hljs-string">"../components/Chat"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Projects</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> initialMessage =
    <span class="hljs-string">"Hello! I'm ProjectAgent, the project specialist. I can provide detailed information about projects, technologies used, and challenges overcome. What would you like to know?"</span>;

  <span class="hljs-keyword">const</span> [currentQuestion, setCurrentQuestion] = useState(<span class="hljs-string">""</span>);

  <span class="hljs-keyword">const</span> askProjectQuestion = <span class="hljs-function">(<span class="hljs-params">question</span>) =&gt;</span> {
    setCurrentQuestion(<span class="hljs-string">`<span class="hljs-subst">${question}</span> [<span class="hljs-subst">${<span class="hljs-built_in">Date</span>.now()}</span>]`</span>);

    <span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =&gt;</span> {
      setCurrentQuestion(<span class="hljs-string">""</span>);
    }, <span class="hljs-number">500</span>);
  };

  <span class="hljs-keyword">return</span> (
    &lt;div&gt;
      &lt;div className="flex flex-col md:flex-row gap-8 mb-12"&gt;
        &lt;div className="md:w-1/3"&gt;
          &lt;h1 className="text-3xl font-bold mb-4"&gt;Projects&lt;/h1&gt;
          &lt;p className="text-lg mb-4"&gt;
            Here you can explore my portfolio of projects. Feel free to ask
            ProjectAgent for more details about any project.
          &lt;/p&gt;
        &lt;/div&gt;
        &lt;div className="md:w-2/3"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;
                Chat with ProjectAgent
              &lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                Our project specialist can provide detailed information about
                projects, technologies, and challenges.
              &lt;/p&gt;
              &lt;Chat
                agentType="project"
                initialMessage={initialMessage}
                agentInitials="PA"
                directQuestion={currentQuestion}
              /&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div className="mb-12"&gt;
        &lt;div className="mb-6"&gt;
          &lt;h2 className="text-2xl font-bold mb-4"&gt;Featured Projects&lt;/h2&gt;
        &lt;/div&gt;
        &lt;div className="grid grid-cols-1 md:grid-cols-3 gap-6"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="project-image-placeholder"&gt;E-commerce Platform&lt;/div&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;
                E-commerce Platform
              &lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                A full-featured e-commerce platform with product management,
                shopping cart, and payment processing.
              &lt;/p&gt;
              &lt;div className="flex justify-between items-center"&gt;
                &lt;div className="flex space-x-2"&gt;
                  &lt;button
                    type="button"
                    className="py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"
                    onClick={() =&gt;
                      askProjectQuestion(
                        "Tell me more about the E-commerce Platform project"
                      )
                    }
                  &gt;
                    View Details
                  &lt;/button&gt;
                  &lt;button
                    type="button"
                    className="py-1.5 px-3 text-sm border border-gray-500 text-gray-500 rounded-md hover:bg-gray-50 transition-colors"
                    onClick={() =&gt;
                      askProjectQuestion(
                        "What technologies were used in the E-commerce Platform project?"
                      )
                    }
                  &gt;
                    Technologies
                  &lt;/button&gt;
                &lt;/div&gt;
                &lt;span className="text-sm text-gray-500"&gt;2023&lt;/span&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="project-image-placeholder"&gt;Task Management App&lt;/div&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;
                Task Management Application
              &lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                A collaborative task management application with real-time
                updates and team collaboration features.
              &lt;/p&gt;
              &lt;div className="flex justify-between items-center"&gt;
                &lt;div className="flex space-x-2"&gt;
                  &lt;button
                    type="button"
                    className="py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"
                    onClick={() =&gt;
                      askProjectQuestion(
                        "Tell me more about the Task Management Application project"
                      )
                    }
                  &gt;
                    View Details
                  &lt;/button&gt;
</code></pre>
<p>As previously mentioned, we have our imports, functions, and some components. Complete the page with the second part of the code here:</p>
<pre><code class="lang-javascript"> &lt;button
                    type=<span class="hljs-string">"button"</span>
                    className=<span class="hljs-string">"py-1.5 px-3 text-sm border border-gray-500 text-gray-500 rounded-md hover:bg-gray-50 transition-colors"</span>
                    onClick={<span class="hljs-function">() =&gt;</span>
                      askProjectQuestion(
                        <span class="hljs-string">"What technologies were used in the Task Management Application project?"</span>
                      )
                    }
                  &gt;
                    Technologies
                  &lt;/button&gt;
                &lt;/div&gt;
                <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-sm text-gray-500"</span>&gt;</span>2022<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span></span>
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"project-image-placeholder"</span>&gt;</span>Data Visualization<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>
                Data Visualization Dashboard
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
                An interactive dashboard for visualizing complex datasets with
                customizable charts and filters.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-between items-center"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex space-x-2"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                    <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span>
                    <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                    <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                      askProjectQuestion(
                        "Tell me more about the Data Visualization Dashboard project"
                      )
                    }
                  &gt;
                    View Details
                  <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                    <span class="hljs-attr">type</span>=<span class="hljs-string">"button"</span>
                    <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-gray-500 text-gray-500 rounded-md hover:bg-gray-50 transition-colors"</span>
                    <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                      askProjectQuestion(
                        "What technologies were used in the Data Visualization Dashboard project?"
                      )
                    }
                  &gt;
                    Technologies
                  <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-sm text-gray-500"</span>&gt;</span>2021<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
        &lt;/div&gt;
      &lt;/div&gt;

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-2 gap-6"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>
              Technical Skills Showcase
            <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
              These projects demonstrate proficiency in the following
              technologies:
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-2 gap-4"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-semibold mb-2"</span>&gt;</span>Frontend<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"list-disc pl-5 space-y-1"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>React<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Vue.js<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Angular<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>TypeScript<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>CSS/SASS<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-semibold mb-2"</span>&gt;</span>Backend<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"list-disc pl-5 space-y-1"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Node.js<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Python<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Django<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Flask<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>MongoDB<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
              <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-4 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                askProjectQuestion(
                  "What other technologies are you proficient in?"
                )
              }
            &gt;
              Ask About Other Skills
            <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>Project Inquiry<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
              Interested in a specific type of project or technology? Ask
              ProjectAgent for more information.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-col space-y-3"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askProjectQuestion(
                    "Do you have any projects involving machine learning or AI?"
                  )
                }
              &gt;
                Ask About AI Projects
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askProjectQuestion("What are your most challenging projects?")
                }
              &gt;
                Ask About Challenging Projects
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askProjectQuestion(
                    "Can you show me examples of your UI/UX work?"
                  )
                }
              &gt;
                Ask About UI/UX Work
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
    &lt;/div&gt;
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Projects;
</code></pre>
<p>With the remaining components added, this page is now complete.</p>
<p>Its time to do the <code>Research.jsx</code> page, starting with the first half of the codebase:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;
<span class="hljs-keyword">import</span> Chat <span class="hljs-keyword">from</span> <span class="hljs-string">"../components/Chat"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Research</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> initialMessage =
    <span class="hljs-string">"Hello! I'm ResearchAgent, the research specialist. I can provide information about technologies, trends, and industry news. What would you like to know?"</span>;
  <span class="hljs-keyword">const</span> [searchQuery, setSearchQuery] = useState(<span class="hljs-string">""</span>);
  <span class="hljs-keyword">const</span> [tech1, setTech1] = useState(<span class="hljs-string">""</span>);
  <span class="hljs-keyword">const</span> [tech2, setTech2] = useState(<span class="hljs-string">""</span>);

  <span class="hljs-keyword">const</span> [currentQuestion, setCurrentQuestion] = useState(<span class="hljs-string">""</span>);

  <span class="hljs-keyword">const</span> askResearchQuestion = <span class="hljs-function">(<span class="hljs-params">question</span>) =&gt;</span> {
    setCurrentQuestion(<span class="hljs-string">`<span class="hljs-subst">${question}</span> [<span class="hljs-subst">${<span class="hljs-built_in">Date</span>.now()}</span>]`</span>);

    <span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =&gt;</span> {
      setCurrentQuestion(<span class="hljs-string">""</span>);
    }, <span class="hljs-number">500</span>);
  };

  <span class="hljs-keyword">const</span> handleSearch = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    e.preventDefault();
    <span class="hljs-keyword">if</span> (searchQuery.trim()) {
      askResearchQuestion(<span class="hljs-string">`Search for information about: <span class="hljs-subst">${searchQuery}</span>`</span>);
      setSearchQuery(<span class="hljs-string">""</span>);
    }
  };

  <span class="hljs-keyword">const</span> handleCompare = <span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    e.preventDefault();
    <span class="hljs-keyword">if</span> (tech1.trim() &amp;&amp; tech2.trim()) {
      askResearchQuestion(<span class="hljs-string">`Compare <span class="hljs-subst">${tech1}</span> vs <span class="hljs-subst">${tech2}</span>`</span>);
      setTech1(<span class="hljs-string">""</span>);
      setTech2(<span class="hljs-string">""</span>);
    }
  };

  <span class="hljs-keyword">return</span> (
    &lt;div&gt;
      &lt;div className="flex flex-col md:flex-row gap-8 mb-12"&gt;
        &lt;div className="md:w-1/3"&gt;
          &lt;h1 className="text-3xl font-bold mb-4"&gt;Research &amp; Insights&lt;/h1&gt;
          &lt;p className="text-lg mb-4"&gt;
            Here you can explore research on technologies, trends, and industry
            news. Feel free to ask ResearchAgent for more information.
          &lt;/p&gt;
        &lt;/div&gt;
        &lt;div className="md:w-2/3"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;
                Chat with ResearchAgent
              &lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                Our research specialist can provide information about
                technologies, trends, and industry news.
              &lt;/p&gt;
              &lt;Chat
                agentType="research"
                initialMessage={initialMessage}
                agentInitials="RA"
                directQuestion={currentQuestion}
              /&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12"&gt;
        &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
          &lt;div className="p-6"&gt;
            &lt;h5 className="text-xl font-semibold mb-3"&gt;
              Search for Information
            &lt;/h5&gt;
            &lt;p className="text-gray-600 mb-4"&gt;
              Enter a topic to search for the latest information and insights.
            &lt;/p&gt;
            &lt;form onSubmit={handleSearch}&gt;
              &lt;div className="flex mb-4"&gt;
                &lt;input
                  type="text"
                  className="flex-grow px-3 py-2 border border-gray-300 rounded-l-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                  placeholder="e.g., WebAssembly, Edge Computing, etc."
                  value={searchQuery}
                  onChange={(e) =&gt; setSearchQuery(e.target.value)}
                /&gt;
                &lt;button
                  className="px-4 py-2 bg-blue-500 text-white rounded-r-md hover:bg-blue-600 transition-colors"
                  type="submit"
                &gt;
                  Search
                &lt;/button&gt;
              &lt;/div&gt;
            &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
          &lt;div className="p-6"&gt;
            &lt;h5 className="text-xl font-semibold mb-3"&gt;Compare Technologies&lt;/h5&gt;
            &lt;p className="text-gray-600 mb-4"&gt;
              Compare two technologies to understand their pros, cons, and use
              cases.
            &lt;/p&gt;
            &lt;form onSubmit={handleCompare}&gt;
              &lt;div className="grid grid-cols-1 sm:grid-cols-2 gap-3 mb-4"&gt;
                &lt;div&gt;
                  &lt;input
                    type="text"
                    className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                    placeholder="First technology"
                    value={tech1}
                    onChange={(e) =&gt; setTech1(e.target.value)}
                  /&gt;
                &lt;/div&gt;
</code></pre>
<p>We have our imports, state, functions, and some components for the ResearchAgent, so it's pretty straightforward. Now, we can complete the page by finishing it with the rest of the code:</p>
<pre><code class="lang-javascript">&lt;div&gt;
                  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">input</span>
                    <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span>
                    <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"</span>
                    <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Second technology"</span>
                    <span class="hljs-attr">value</span>=<span class="hljs-string">{tech2}</span>
                    <span class="hljs-attr">onChange</span>=<span class="hljs-string">{(e)</span> =&gt;</span> setTech2(e.target.value)}
                  /&gt;</span>
                &lt;/div&gt;
              &lt;/div&gt;
              <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors"</span>
                <span class="hljs-attr">type</span>=<span class="hljs-string">"submit"</span>
              &gt;</span>
                Compare
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span></span>
            &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-12"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">h2</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-2xl font-bold mb-4"</span>&gt;</span>Current Tech Trends<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-3 gap-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6 flex flex-col h-full"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-3"</span>&gt;</span>
                AI in Web Development
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4 flex-grow"</span>&gt;</span>
                Exploring how artificial intelligence is transforming web
                development practices and tools.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors self-start"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askResearchQuestion("Tell me about AI in web development")
                }
              &gt;
                Learn More
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6 flex flex-col h-full"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-3"</span>&gt;</span>
                Modern Frontend Frameworks
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4 flex-grow"</span>&gt;</span>
                Analysis of current frontend frameworks, their strengths, and
                ideal use cases.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors self-start"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askResearchQuestion("Compare modern frontend frameworks")
                }
              &gt;
                Learn More
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6 flex flex-col h-full"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-3"</span>&gt;</span>
                Cloud Architecture Patterns
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4 flex-grow"</span>&gt;</span>
                Best practices and patterns for designing scalable cloud-based
                applications.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors self-start"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askResearchQuestion("Explain cloud architecture patterns")
                }
              &gt;
                Learn More
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-3"</span>&gt;</span>Industry Trends<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
              Stay updated on the latest trends in software development and
              technology.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
              <span class="hljs-attr">className</span>=<span class="hljs-string">"py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
              <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                askResearchQuestion(
                  "What are the current trends in software development and technology?"
                )
              }
            &gt;
              Get Industry Trends
            <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
    &lt;/div&gt;
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Research;
</code></pre>
<p>The second half of the code has the remaining components, which complete the page.</p>
<p>Now for the final page which is for <code>Services.jsx</code>. The codebase is quite large so we will break it down.</p>
<p>And here's the first part of the codebase to add:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;
<span class="hljs-keyword">import</span> axios <span class="hljs-keyword">from</span> <span class="hljs-string">"axios"</span>;
<span class="hljs-keyword">import</span> Chat <span class="hljs-keyword">from</span> <span class="hljs-string">"../components/Chat"</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Services</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> initialMessage =
    <span class="hljs-string">"Hello! I'm BusinessAdvisor, the client specialist. I can provide information about services, pricing, and project details. What would you like to know?"</span>;
  <span class="hljs-keyword">const</span> [projectDescription, setProjectDescription] = useState(<span class="hljs-string">""</span>);

  <span class="hljs-keyword">const</span> [currentQuestion, setCurrentQuestion] = useState(<span class="hljs-string">""</span>);

  <span class="hljs-keyword">const</span> askClientQuestion = <span class="hljs-function">(<span class="hljs-params">question</span>) =&gt;</span> {
    setCurrentQuestion(<span class="hljs-string">`<span class="hljs-subst">${question}</span> [<span class="hljs-subst">${<span class="hljs-built_in">Date</span>.now()}</span>]`</span>);

    <span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =&gt;</span> {
      setCurrentQuestion(<span class="hljs-string">""</span>);
    }, <span class="hljs-number">500</span>);
  };

  <span class="hljs-keyword">const</span> generateProposal = <span class="hljs-keyword">async</span> () =&gt; {
    <span class="hljs-keyword">if</span> (!projectDescription.trim()) <span class="hljs-keyword">return</span>;

    <span class="hljs-keyword">try</span> {
      <span class="hljs-keyword">const</span> response = <span class="hljs-keyword">await</span> axios.post(<span class="hljs-string">"/api/client/proposal"</span>, {
        <span class="hljs-attr">project_description</span>: projectDescription,
      });

      <span class="hljs-keyword">if</span> (response.data &amp;&amp; response.data.proposal) {
        askClientQuestion(
          <span class="hljs-string">`Can you provide a proposal for this project: <span class="hljs-subst">${projectDescription}</span>`</span>
        );
      }
    } <span class="hljs-keyword">catch</span> (error) {
      <span class="hljs-built_in">console</span>.error(<span class="hljs-string">"Error generating proposal:"</span>, error);
    }
  };

  <span class="hljs-keyword">return</span> (
    &lt;div&gt;
      &lt;div className="flex flex-col md:flex-row gap-8 mb-12"&gt;
        &lt;div className="md:w-1/3"&gt;
          &lt;h1 className="text-3xl font-bold mb-4"&gt;Services&lt;/h1&gt;
          &lt;p className="text-lg mb-4"&gt;
            Here you can find information about the services I offer. Feel free
            to ask BusinessAdvisor for more details about pricing, timelines,
            and project specifics.
          &lt;/p&gt;
        &lt;/div&gt;
        &lt;div className="md:w-2/3"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;
                Chat with BusinessAdvisor
              &lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                Our client specialist can provide information about services,
                pricing, and project details.
              &lt;/p&gt;
              &lt;Chat
                agentType="client"
                initialMessage={initialMessage}
                agentInitials="BA"
                directQuestion={currentQuestion}
              /&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div className="mb-12"&gt;
        &lt;div className="mb-6"&gt;
          &lt;h2 className="text-2xl font-bold mb-4"&gt;Services Offered&lt;/h2&gt;
        &lt;/div&gt;
        &lt;div className="grid grid-cols-1 md:grid-cols-3 gap-6"&gt;
          &lt;div className="bg-white rounded-lg shadow-md overflow-hidden h-full"&gt;
            &lt;div className="p-6"&gt;
              &lt;h5 className="text-xl font-semibold mb-2"&gt;Web Development&lt;/h5&gt;
              &lt;p className="text-gray-600 mb-4"&gt;
                Custom web application development using modern frameworks and
                best practices.
              &lt;/p&gt;
              &lt;h6 className="font-semibold mb-2"&gt;Technologies&lt;/h6&gt;
              &lt;ul className="list-disc pl-5 space-y-1 mb-4"&gt;
                &lt;li&gt;React&lt;/li&gt;
                &lt;li&gt;Vue.js&lt;/li&gt;
                &lt;li&gt;Node.js&lt;/li&gt;
                &lt;li&gt;Django&lt;/li&gt;
                &lt;li&gt;Flask&lt;/li&gt;
              &lt;/ul&gt;
              &lt;h6 className="font-semibold mb-2"&gt;Details&lt;/h6&gt;
              &lt;ul className="space-y-2 mb-4"&gt;
                &lt;li&gt;
                  &lt;strong&gt;Pricing Model:&lt;/strong&gt; Project-based or hourly
                &lt;/li&gt;
                &lt;li&gt;
                  &lt;strong&gt;Price Range:&lt;/strong&gt; $5,000 - $50,000 depending on
                  complexity
                &lt;/li&gt;
                &lt;li&gt;
                  &lt;strong&gt;Timeline:&lt;/strong&gt; 4-12 weeks depending on scope
                &lt;/li&gt;
              &lt;/ul&gt;
              &lt;button
                className="mt-2 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"
                onClick={() =&gt;
                  askClientQuestion(
                    "Tell me more about your web development services"
                  )
                }
              &gt;
                Ask about Web Development
              &lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
</code></pre>
<p>We have more import statements, state, and components for our BusinessAdvisor AI agent. Onto the next part of this codebase here:</p>
<pre><code class="lang-javascript"> &lt;div className=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;
            <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>
                Mobile App Development
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
                Native and cross-platform mobile application development for iOS
                and Android.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-semibold mb-2"</span>&gt;</span>Technologies<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"list-disc pl-5 space-y-1 mb-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>React Native<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Flutter<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Swift<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Kotlin<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-semibold mb-2"</span>&gt;</span>Details<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"space-y-2 mb-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Pricing Model:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> Project-based
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Price Range:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> $8,000 - $60,000 depending on
                  complexity
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Timeline:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> 6-16 weeks depending on scope
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-2 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askClientQuestion(
                    "Tell me more about your mobile app development services"
                  )
                }
              &gt;
                Ask about Mobile Development
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
          &lt;/div&gt;
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden h-full"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>
                Technical Consulting
              <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
                Expert advice on architecture, technology stack, and development
                practices.
              <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-semibold mb-2"</span>&gt;</span>Areas of Expertise<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"list-disc pl-5 space-y-1 mb-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>System Architecture<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Database Design<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Performance Optimization<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Security Best Practices<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>DevOps Implementation<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">h6</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"font-semibold mb-2"</span>&gt;</span>Details<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"space-y-2 mb-4"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Pricing Model:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> Hourly
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Price Range:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> $150 - $250 per hour
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Timeline:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> Ongoing or as needed
                <span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"mt-2 py-1.5 px-3 text-sm border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                  askClientQuestion(
                    "Tell me more about your technical consulting services"
                  )
                }
              &gt;
                Ask about Consulting
              <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
        &lt;/div&gt;
      &lt;/div&gt;
</code></pre>
<p>We can expect to see lots of component code here for the page, so lets finish it off with the final part now:</p>
<pre><code class="lang-javascript"> &lt;div className=<span class="hljs-string">"mb-12"</span>&gt;
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">h2</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-2xl font-bold mb-4"</span>&gt;</span>Client Engagement Process<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"grid grid-cols-1 md:grid-cols-4 gap-6"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6 md:mb-0"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-col items-center"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"w-12 h-12 rounded-full bg-blue-500 text-white flex items-center justify-center text-xl font-bold mb-4"</span>&gt;</span>
                      1
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-lg font-semibold mt-2 mb-1"</span>&gt;</span>
                      Initial Consultation
                    <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 text-center"</span>&gt;</span>
                      Understanding your requirements and project goals
                    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6 md:mb-0"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-col items-center"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"w-12 h-12 rounded-full bg-blue-500 text-white flex items-center justify-center text-xl font-bold mb-4"</span>&gt;</span>
                      2
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-lg font-semibold mt-2 mb-1"</span>&gt;</span>
                      Proposal
                    <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 text-center"</span>&gt;</span>
                      Detailed quote and project plan preparation
                    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6 md:mb-0"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-col items-center"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"w-12 h-12 rounded-full bg-blue-500 text-white flex items-center justify-center text-xl font-bold mb-4"</span>&gt;</span>
                      3
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-lg font-semibold mt-2 mb-1"</span>&gt;</span>
                      Development
                    <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 text-center"</span>&gt;</span>
                      Regular sprints with client feedback
                    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-6 md:mb-0"</span>&gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex flex-col items-center"</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"w-12 h-12 rounded-full bg-blue-500 text-white flex items-center justify-center text-xl font-bold mb-4"</span>&gt;</span>
                      4
                    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-lg font-semibold mt-2 mb-1"</span>&gt;</span>
                      Delivery
                    <span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 text-center"</span>&gt;</span>
                      Testing, deployment, and ongoing support
                    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
                  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"flex justify-center mt-8"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
                  <span class="hljs-attr">className</span>=<span class="hljs-string">"py-2 px-4 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"</span>
                  <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span>
                    askClientQuestion(
                      "Explain your client engagement process in detail"
                    )
                  }
                &gt;
                  Learn More About the Process
                <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
      &lt;/div&gt;

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-white rounded-lg shadow-md overflow-hidden"</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"p-6"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h5</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-xl font-semibold mb-2"</span>&gt;</span>Request a Proposal<span class="hljs-tag">&lt;/<span class="hljs-name">h5</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-gray-600 mb-4"</span>&gt;</span>
              Interested in working together? Describe your project below and
              BusinessAdvisor will generate a custom proposal for you.
            <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"mb-4"</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">label</span>
                <span class="hljs-attr">htmlFor</span>=<span class="hljs-string">"project-description"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"block text-sm font-medium text-gray-700 mb-1"</span>
              &gt;</span>
                Describe your project:
              <span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span>
                <span class="hljs-attr">id</span>=<span class="hljs-string">"project-description"</span>
                <span class="hljs-attr">className</span>=<span class="hljs-string">"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"</span>
                <span class="hljs-attr">rows</span>=<span class="hljs-string">"5"</span>
                <span class="hljs-attr">placeholder</span>=<span class="hljs-string">"Enter project description..."</span>
                <span class="hljs-attr">value</span>=<span class="hljs-string">{projectDescription}</span>
                <span class="hljs-attr">onChange</span>=<span class="hljs-string">{(e)</span> =&gt;</span> setProjectDescription(e.target.value)}
              &gt;<span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">button</span>
              <span class="hljs-attr">className</span>=<span class="hljs-string">"py-2 px-4 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors"</span>
              <span class="hljs-attr">onClick</span>=<span class="hljs-string">{generateProposal}</span>
            &gt;</span>
              Generate Proposal
            <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
    &lt;/div&gt;
  );
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Services;
</code></pre>
<p>Our services page is complete, and so is the application!</p>
<p>Make sure that the Python backend server is running, and then start your React frontend with the usual Vite run script here inside the <code>frontend</code> folder:</p>
<pre><code class="lang-shell">npm run dev
</code></pre>
<p>You should see the website up and running on <a target="_blank" href="http://localhost:5173/">http://localhost:5173/</a> with working AI agents on all pages (apart from the contact page, which does not have one). Remember that every time you use one of the AI agents to ask a question, it will use 1 API call on Groq Cloud, so check the <a target="_blank" href="https://console.groq.com/docs/rate-limits">Rate Limits</a> for the different LLMs.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Building a squad of AI agents for your website using platforms like Agno and Groq is a powerful way to showcase how innovative automated workflows can enhance user experience without spending a lot of money.</p>
<p>The combination of Agno and Groq provides a free route for exploring AI agents, which can be very beneficial. With Agno's no-code agent orchestration and Groq's super-fast inference, you can deploy AI-powered features that engage with visitors and make interactions easier.</p>
<p>So, whether it's a chatbot, content generator, or intelligent assistant, these tools are making it easier than ever to integrate AI into your brand. With the advancements that AI technology is making, being able to try out these free solutions will definitely keep you ahead and make your website truly shine as you continue to modernise your brand.</p>
<h3 id="heading-stay-up-to-date-with-tech-programming-productivity-and-ai">Stay up to date with tech, programming, productivity, and AI</h3>
<p>If you enjoyed these articles, connect and follow me across <a target="_blank" href="https://limey.io/andrewbaisden">social media</a>, where I share content related to all of these topics 🔥</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1741977770238/3766c236-f276-4939-996e-61ab1306cc26.png" alt="Andrew Baisden Software Developer and Technical Writer Social Media Banner" class="image--center mx-auto" width="1500" height="500" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Simple Tips to Help You Write Clean Code ]]>
                </title>
                <description>
                    <![CDATA[ Being a developer isn’t as straightforward as many people think. It’s not just about learning a programming language and typing out code to build software. There’s a lot more to it. And one of the most confusing (and often frustrating) topics for dev... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/tips-for-writing-clean-code/</link>
                <guid isPermaLink="false">67a2380b9af7e36332fde944</guid>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ clean code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Nitin Sharma ]]>
                </dc:creator>
                <pubDate>Tue, 04 Feb 2025 15:53:47 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738684292390/6e844cd5-28f8-42e9-b9e3-cc6ded9ec72f.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Being a developer isn’t as straightforward as many people think.</p>
<p>It’s not just about learning a programming language and typing out code to build software. There’s a lot more to it. And one of the most confusing (and often frustrating) topics for developers is clean code.</p>
<p>So, what is clean code?</p>
<p>Simply put, it’s about writing code that’s so clear and well-organized that neither you nor anyone else will get frustrated trying to understand it six months later.</p>
<p>Think of clean code as the programming equivalent of great design — it’s functional, beautiful, and easy to work with.</p>
<p>And today, I won’t spend a lot of time explaining why clean code is important — you probably already know that. Instead, I’ll get straight to the point and share seven powerful hacks to help you write cleaner, better code.</p>
<h2 id="heading-table-of-contents"><strong>Table of Contents</strong></h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-1-write-code-like-youre-explaining-it-to-a-5-year-old">1. Write Code Like You’re Explaining it to a 5-Year Old</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-2-use-ai-tools-or-an-ai-code-reviewer">2. Use AI Tools (or an AI Code Reviewer)</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-3-get-rid-of-unnecessary-comments">3. Get Rid of Unnecessary Comments</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-4-follow-the-dry-principle">4. Follow the DRY Principle</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-5-fix-your-code-formatting-amp-follow-a-consistent-style">5. Fix Your Code Formatting &amp; Follow a Consistent Style</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-6-dont-let-your-functions-do-too-much">6. Don’t Let Your Functions Do Too Much</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-7-organize-your-files-and-folders-properly">7. Organize Your Files and Folders Properly</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-wrapping-up">Wrapping Up</a></p>
</li>
</ul>
<h2 id="heading-1-write-code-like-youre-explaining-it-to-a-5-year-old"><strong>1. Write Code Like You’re Explaining it to a 5-Year Old</strong></h2>
<p>Let me be honest — if you are writing exceedingly clever code that your teammates or someone else can’t easily read, it won’t be helpful to anyone.</p>
<p>You need to write code so simple that anyone, including someone who just opened the file for the first time, can easily go through it.</p>
<p>For example, if your variable names look like this:</p>
<pre><code class="lang-plaintext">let x = y + z;
</code></pre>
<p>This isn’t helpful. No one will know what x, y, and z mean — not even you, three weeks later.</p>
<p>Variables should describe what they hold. Think of them as self-documenting comments. Here’s a better example:</p>
<pre><code class="lang-plaintext">let totalPrice = productPrice + shippingCost;
</code></pre>
<p>This simple best practice can be applied even when writing functions, comments, and more.</p>
<p>Here’s an example of hard to understand code:</p>
<pre><code class="lang-plaintext">function calc(itm) {
 let t = 0;
 for (let i = 0; i &lt; itm.length; i++) {
 t += itm[i].p;
 }
 return t;
}
</code></pre>
<p>You see, it doesn’t give you a proper idea about the function other than the logic.</p>
<p>Instead, try to write it like this:</p>
<pre><code class="lang-plaintext">function calculateTotalPrice(cartItems) {
    let totalPrice = 0;
    for (let i = 0; i &lt; cartItems.length; i++) {
        totalPrice += cartItems[i].price;
    }
    return totalPrice;
}
</code></pre>
<p>Now it’s clear just from looking at the code what’s going on.</p>
<h2 id="heading-2-use-ai-tools-or-an-ai-code-reviewer">2. Use AI Tools (or an AI Code Reviewer)</h2>
<p>AI is evolving quickly and is being used in almost every industry.</p>
<p>Well, as a developer, you can use AI to help you write clean and readable code — all thanks to AI tools like <a target="_blank" href="https://chatgpt.com/">ChatGPT</a>, <a target="_blank" href="https://claude.ai/">Claude</a>, and <a target="_blank" href="https://github.com/features/copilot">GitHub Copilot</a>.</p>
<p>For starters, you can copy and paste your code into an LLM and ask it to review your code. </p>
<p>Here’s an example of a request I made to ChatGPT:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738673389541/558c64b6-f92e-4ede-bd00-8fe9c98623c0.png" alt="558c64b6-f92e-4ede-bd00-8fe9c98623c0" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>And here’s what ChatGPT recommended:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738673434670/badadf50-2e1f-46f9-9f3b-c9b189dfaeeb.png" alt="badadf50-2e1f-46f9-9f3b-c9b189dfaeeb" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>It even provided me with an improved version of the code. Here it is as follows:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738673489244/3cf70568-a418-460b-9aa6-768a544965c2.png" alt="3cf70568-a418-460b-9aa6-768a544965c2" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Along with that, you can also use AI-powered code reviewers like <a target="_blank" href="https://www.coderabbit.ai/">CodeRabbit AI</a>, which integrates with your pull requests to offer automated code reviews, walkthroughs, and more.</p>
<p>In simple terms, when you install CodeRabbit AI, add it to your pull request, and then create a pull request, CodeRabbit AI provides you with summaries, code reviews, walkthroughs, and more.</p>
<p>Here’s an example from an open-source repository “<a target="_blank" href="https://github.com/bitbomdev/minefield/pull/158">minefield</a>” of a summary generated by CodeRabbit AI:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738675580325/ef823a77-6969-4e8a-a141-640468d0169d.png" alt="ef823a77-6969-4e8a-a141-640468d0169d" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>In the above examples, CodeRabbit AI simply goes through the code and provides a great summary highlighting the new features, bug fixes, and unit tests added via a pull request.</p>
<p>If you want to learn more, <a target="_blank" href="https://docs.coderabbit.ai/getting-started/quickstart/">here’s</a> a quickstart guide that provides more info on how to get started and use CodeRabbit AI.</p>
<p>Note that, AI tools can be a great help in improving your code, but they should never replace your own thinking.</p>
<p>When AI suggests changes, always ask yourself: Does this actually make sense?</p>
<p>After all, AI isn’t perfect—it can generate incorrect code. It might also miss important details that only a human can fully understand.</p>
<p>So instead of blindly accepting AI’s suggestions, take a moment to understand why they were made.</p>
<p>Remember, the goal is to use AI to speed up your workflow, catch errors, and more—while keeping full control over your code.</p>
<h2 id="heading-3-get-rid-of-unnecessary-comments">3. Get Rid of Unnecessary Comments</h2>
<p>Writing good code comments can help others understand why your code is doing what it’s doing.</p>
<p>But I see developers writing too many comments, even where there is no need.</p>
<p>I believe that, whenever possible, good code should document itself.</p>
<p>Here’s an example of a not so helpful comment:</p>
<pre><code class="lang-plaintext">// Adding 10 to the result 
total = total + 10;
</code></pre>
<p>You see, here the comment doesn’t make sense, and it doesn’t really add anything to the code (or our understanding of it).</p>
<p>It’s a better practice to write comments only if they’re important in helping a reviewer understand why you did something in particular or if there’s some ambiguity that needs explaining.</p>
<p>Here’s an example:</p>
<pre><code class="lang-plaintext">// Adding 10 because the client requires a 10% buffer for calculations 
total = total + 10;
</code></pre>
<p>Now you can see that here the comment gives a clear idea about why the programmer added 10 to the total.</p>
<h2 id="heading-4-follow-the-dry-principle">4. Follow the DRY Principle</h2>
<p>I’ve seen a lot of programmers repeating the same logic or adding the same functionality in different files.</p>
<p>Well, you don’t need to repeat the same code everywhere because it makes the process much more complex. Keep your code DRY (Don’t Repeat Yourself).</p>
<p>Instead, abstract that logic into a single reusable function.</p>
<p>For example, instead of writing the same logic in different files:</p>
<pre><code class="lang-plaintext">if (user.age &gt; 18 &amp;&amp; user.age &lt; 65) { 
 // Do something 
}

if (user.age &gt; 18 &amp;&amp; user.age &lt; 65) { 
 // Do something else 
}
</code></pre>
<p>You can create a reusable function so that you can use the logic everywhere, as shown below:</p>
<pre><code class="lang-plaintext">function isWorkingAge(age) { 
 return age &gt; 18 &amp;&amp; age &lt; 65; 
}

if (isWorkingAge(user.age)) { 
 // Do something 
}
</code></pre>
<p>In short — write once, and use everywhere.</p>
<h2 id="heading-5-fix-your-code-formatting-amp-follow-a-consistent-style">5. Fix Your Code Formatting &amp; Follow a Consistent Style</h2>
<p>This is another simple hack, but many devs don’t even think about it.</p>
<p>First of all, you need to format your code with proper indentation.</p>
<p>You can just install a VS Code extension/linters like <a target="_blank" href="https://prettier.io/">Prettier</a>, <a target="_blank" href="https://eslint.org/">ESLint</a>, or <a target="_blank" href="https://pypi.org/project/flake8/">Flake8</a>, depending on the programming language you use. Configure a few settings, and you’re good to go.</p>
<p>These linters can help you write better code by finding mistakes, helping you follow coding rules, and keeping your code consistent. They can also catch errors, make your code easier to read, and save time on fixing bugs and reviews.</p>
<p>But fixing your formatting doesn’t just mean it’s clean code – it’s way more than that.</p>
<p>Beyond formatting, you should stick to a consistent style guide for things like function names or variable names.</p>
<p>For example, here’s some code that has an inconsistent style:</p>
<pre><code class="lang-plaintext">let total_price;  
let UserData;  
function getuser() {}
</code></pre>
<p>But some of you may ask, why is the code inconsistent?</p>
<p>Well, it uses several different naming conventions – like <code>total_price</code> uses snake_case, <code>UserData</code> uses PascalCase, and <code>getuser()</code> is in lowercase instead of camelCase.</p>
<p>This makes your code harder to read and more confusing. Instead, you can follow a consistent style. Here’s how:</p>
<pre><code class="lang-plaintext">let userData; 
let totalPrice; 
function getUser() {}
</code></pre>
<p>And just to let you know, JavaScript typically follows camelCase for variables and functions, so names like <code>getUser(), userData, and totalPrice</code> would be more consistent.</p>
<p>No matter whether you’re working in a team or solo, sticking to one style is a good idea. It makes the code clean, and the reviewer can easily go through it.</p>
<h2 id="heading-6-dont-let-your-functions-do-too-much">6. Don’t Let Your Functions Do Too Much</h2>
<p>As a programmer, I know that sometimes you need to write complex logic inside a function.</p>
<p>But most often, programmers include too much logic in a single function, causing it to do more than one thing at a time. These functions become too complex, making them hard to read or understand.</p>
<p>It’s better to create multiple smaller functions, with each function handling a single responsibility.</p>
<p>Here’s an example of a slightly too complex function:</p>
<pre><code class="lang-plaintext">function calculateCart(items) {
 let total = 0;
 for (let i = 0; i &lt; items.length; i++) {
 total += items[i].price * items[i].quantity;
 }
 return total &gt; 100 ? total * 0.9 : total;
}
</code></pre>
<p>You see, this single function does too much—it applies discounts if applicable, and calculates the total price based on quantity, making it hard to reuse for specific use cases.</p>
<p>A better way is to split it into three functions:</p>
<ul>
<li><p>One to apply the discount (if applicable).</p>
</li>
<li><p>One to calculate the total price based on quantity.</p>
</li>
<li><p>One to get the total and apply the discount if needed.</p>
</li>
</ul>
<p>This makes the code cleaner and easier to manage. Here’s an improved version:</p>
<pre><code class="lang-plaintext">function calculateCart(items) {
 const total = getCartTotal(items);
 return applyDiscount(total);
}

function getCartTotal(items) {
 return items.reduce((sum, item) =&gt; sum + item.price * item.quantity, 0);
}

function applyDiscount(total) {
 return total &gt; 100 ? total * 0.9 : total;
}
</code></pre>
<p>You see, instead of writing everything in one long block, the logic is broken into smaller, clearer functions.</p>
<p>And that’s what makes it easier for you (and everyone else) to understand.</p>
<h2 id="heading-7-organize-your-files-and-folders-properly">7. Organize Your Files and Folders Properly</h2>
<p>Now comes the most important part.</p>
<p>When you’re working on a big project, it makes no sense to dump all your code into one single folder with a bunch of random files. It’s become a nightmare for anyone trying to review the code or find a specific file.</p>
<p>Think about it — going through 50 files just to fix a bug. Nobody wants that.</p>
<p>Instead, try organizing your project into multiple folders based on pages or features.</p>
<p>And don’t stop there — break large files into smaller, specific modules based on functionality. This way, everything is neat, easy to find, and makes sense at first glance.</p>
<p>Here’s a bad example of a project structure: </p>
<pre><code class="lang-plaintext">project-folder/  
│  
├── index.html  
├── app.js  
├── helpers.js  
├── data.js  
├── user.js  
├── product.js
</code></pre>
<p>It’s messy, right? Now, here’s how you can improve it:</p>
<pre><code class="lang-plaintext">project-folder/  
│  
├── pages/  
│   ├── home/  
│   │   ├── HomePage.js  
│   │   ├── HomePage.css  
│   │   └── HomePage.test.js  
│   ├── user/  
│   │   ├── UserPage.js  
│   │   ├── UserPage.css  
│   │   └── UserPage.test.js  
│   └── product/  
│       ├── ProductPage.js  
│       ├── ProductPage.css  
│       └── ProductPage.test.js  
├── components/  
│   ├── Header.js  
│   ├── Footer.js  
│   └── Button.js  
├── utils/  
│   └── api.js  
└── index.js
</code></pre>
<p>See how simple this is?</p>
<p>You have separate folders for pages, components, and utilities. Inside each folder, files are organized by purpose and given clear names.</p>
<p>For example, if you need something for the product page, you’ll know exactly where to find it.</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>In this article, you learned the basics you need to get started writing clean, efficient, and maintainable code.</p>
<p>We discussed how to write clean code, use AI tools, apply proper code formatting techniques, structure functions effectively, and follow other best practices.</p>
<p>If you apply these tips consistently, you’ll significantly improve your coding skills and write cleaner code.</p>
<p>I hope you liked it.</p>
<p>You can connect with me on <a target="_blank" href="https://substack.com/@nitinfab">Substack</a>, and <a target="_blank" href="https://x.com/Nitinfab">Twitter</a>.</p>
<p>Also, if you're interested in learning more about AI, you can subscribe to my newsletter, <a target="_blank" href="https://aimadesimple0.substack.com/">AI Made Simple</a>, where I dive deeper into practical AI strategies for everyday people.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Make Learning to Code Easier by Focusing on the Fundamentals ]]>
                </title>
                <description>
                    <![CDATA[ It’s the beginning of the year again, and perhaps you’re still struggling to learn that programming language. We’ve all been there. Let me share a story from my own journey. In 2016, I thought I wasn’t cut out for programming. After months of trying ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-make-learning-to-code-easier-by-focusing-on-the-fundamentals/</link>
                <guid isPermaLink="false">6776aff4291cde01e8a6dff0</guid>
                
                    <category>
                        <![CDATA[ coding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Programming Tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Beginner Developers ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Spruce Emmanuel ]]>
                </dc:creator>
                <pubDate>Thu, 02 Jan 2025 15:25:40 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735830905235/898a0c35-3f2a-4a05-86e8-866bb99eda42.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>It’s the beginning of the year again, and perhaps you’re still struggling to learn that programming language. We’ve all been there. Let me share a story from my own journey.</p>
<p>In 2016, I thought I wasn’t cut out for programming. After months of trying and failing with my first language, I came to a conclusion: I wasn’t smart enough. I thought some people were naturally gifted, while others, like me, simply weren’t meant for programming.</p>
<p>I gave up several times, convinced I didn’t have the talent needed to succeed.</p>
<p>Fast forward to today eight years later. I’ve become proficient in several programming languages. Looking back, I realize programming doesn’t come naturally to anyone. The difference between those who seem “gifted” and those of us who struggled is simple: it’s all about having the right foundational knowledge.</p>
<p>Programming is like walking into a movie halfway through you can’t understand what’s happening because you missed the beginning. The same applies to programming. You can’t build an advanced calculator app without understanding basic data types or algorithms.</p>
<p>Here’s the truth: programming isn’t inherently difficult. Most beginners struggle because they skip key foundational steps. Without these prerequisites, programming can feel like trying to swim in the deep end without first learning how to float.</p>
<p>But don’t worry I’ve got you covered. By the end of this article, you’ll know exactly what these prerequisites are, how to develop them, and why they’re the key to making programming click for you.</p>
<h3 id="heading-heres-what-well-cover">Here’s what we’ll cover:</h3>
<ol>
<li><p><a class="post-section-overview" href="#heading-why-programming-feels-hard-hint-its-not-about-talent">Why Programming Feels Hard – Hint: It’s Not About Talent</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-prerequisites-you-actually-need">The Prerequisites You Actually Need</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-data-structures-taking-user-input">Data Structures: Taking User Input</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-algorithms-performing-computations">Algorithms: Performing Computations</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-programming-languages-displaying-the-output">Programming Languages: Displaying the Output</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-additional-skills">Additional Skills</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-build-the-right-foundations-practice-practice-practice">How to Build the Right Foundations: Practice, Practice, Practice</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-final-thoughts">Final Thoughts</a></p>
</li>
</ol>
<h2 id="heading-why-programming-feels-hard-hint-its-not-about-talent">Why Programming Feels Hard – Hint: It’s Not About Talent</h2>
<p>Let me pick up my story again. By 2018, I was becoming a confident developer. I could build basic websites, fetch data from a database using APIs, and display it on the screen. I thought I had programming figured out.</p>
<p>Then came my first job interview.</p>
<p>During the interview, I was asked a seemingly simple question: <em>“What happens when you type</em> <em>www.google.com</em> <em>into the address bar and press Enter? You have 30 minutes.”</em></p>
<p>I paused, thought for a moment, and gave my best answer. I spoke for maybe five minutes, then the interview ended.</p>
<p>Later, I Googled the question out of curiosity. What I found shocked me. The question wasn’t just about typing and entering a URL, it was about networks, servers, DNS lookups, HTTP requests, rendering engines, and more. That’s when it hit me: I had barely scratched the surface. There was so much foundational knowledge I was missing.</p>
<p>That day, I realized programming isn’t just about fetching data from a database or making a website look good. It’s about understanding the layers beneath the surface. If you're curious, I didn’t get the job. In fact, I never heard back from them. Honestly, I wouldn’t have hired me either.</p>
<p>Now, think about that interview question: Could you confidently explain what happens when you hit “Enter” on www.google.com?</p>
<p>If you’re like I was back then, probably not. But here’s the good news: If I were asked that same question today, I could speak on it for an hour. Heck, I could even write a 1,000-word article about it.</p>
<h3 id="heading-the-real-problem-isnt-talent">The Real Problem Isn’t Talent</h3>
<p>Here’s the key takeaway: programming success isn’t about talent or intelligence. If you try to learn programming without the right preparation, you’ll keep hitting a wall of frustration.</p>
<p>So, no—it’s not talent you lack. It’s preparation. And the good news? Lack of preparation is something you can fix.</p>
<h2 id="heading-the-prerequisites-you-actually-need"><strong>The Prerequisites You Actually Need</strong></h2>
<p>To understand the prerequisites, let’s take a step back and consider what a computer is actually for. At its core, the main purpose of a computer is to:</p>
<ol>
<li><p><strong>Take user input</strong>,</p>
</li>
<li><p><strong>Perform computations</strong>, and</p>
</li>
<li><p><strong>Display the output</strong>.</p>
</li>
</ol>
<p>Every piece of software or program ever developed revolves around these three tasks. As a programmer, your role is to create software that performs these functions properly.</p>
<p>To do this, you need to build your skills in a way that aligns with these tasks. This means learning about data structures and algorithms, and then diving into a programming language. Let’s dig into each of these skills more deeply.</p>
<h2 id="heading-data-structures-taking-user-input"><strong>Data Structures: Taking User Input</strong></h2>
<p>So, users interact with your software, whether they’re clicking buttons, filling out forms, or uploading files. And guess what? All that interaction creates data that you, the developer, need to manage. But how do you do that without going crazy? That’s where <strong>data structures</strong> come in.</p>
<h3 id="heading-what-are-data-structures"><strong>What Are Data Structures?</strong></h3>
<p>Think of data structures like special containers for your data. But not just any containers – they’re the kind that let you quickly grab, change, and organize your data in the most efficient way possible. Without them, managing user input would be like trying to store your clothes in a messy pile rather than a neat closet. Not fun, right?</p>
<h3 id="heading-a-few-data-structures-you-should-know"><strong>A Few Data Structures You Should Know</strong></h3>
<p>There are tons of data structures out there, but let’s talk about a couple that are absolute essentials:</p>
<p><strong>1. Arrays</strong></p>
<p>Arrays are like simple, ordered lists. Imagine a row of boxes, each labeled with a number (index). You can put something in each box, and when you want to grab something, you just tell the system the number of the box. Super easy! It’s like a list of your favorite songs, where each song is numbered in order.</p>
<p><strong>2. Hash Tables (or Dictionaries)</strong></p>
<p>Hash tables are the cool kids of the data structure world. Instead of organizing data by number, they let you organize it by keys, which are like labels that help you find things super fast. If you had a list of customers, you could use their customer IDs as the “key” to look up their info. Think of it like a phone book—rather than flipping through pages, you jump straight to the person’s name based on how the names are organized (likely alphabetically).</p>
<h3 id="heading-why-should-you-care-about-data-structures"><strong>Why Should You Care About Data Structures?</strong></h3>
<p>Good question! Here’s the deal: first of all, data structures help you organize your data in an intelligent way that makes sense. They keep things neat and make them easy to access. No more digging through a pile of data.</p>
<p>Second, data structures can make your apps faster. With the right data structure, you’ll be able to retrieve, modify, and sort data in the blink of an eye.</p>
<p>And finally, they help you solve problems like a boss**.** Whether you need to sort stuff, search through a lot of data, or handle some complex information, data structures are your go-to solution.</p>
<h3 id="heading-example-storing-and-finding-customer-names"><strong>Example: Storing and Finding Customer Names</strong></h3>
<p>Okay, let’s say your app needs to store and retrieve customer names. You could do this in two ways. Let’s compare how an <strong>array</strong> and a <strong>hash table</strong> would handle this task.</p>
<p><strong>1. Using an Array:</strong><br>Imagine you’ve got a list of customer names, and they’re stored in a nice, neat array:</p>
<pre><code class="lang-text">customers = ["John", "Jane", "Emily", "Michael"]
</code></pre>
<p>If you want to grab the name of the person in the third spot (Emily), you can just point to the third index like this:</p>
<pre><code class="lang-text">print(customers[2])  // Output: Emily
</code></pre>
<p>Arrays are perfect if you have a simple, ordered list and you need to grab items by their position.</p>
<p><strong>2. Using a Hash Table:</strong><br>Now, let’s say you want to store customer names but also have a unique ID for each one. This is where a hash table (or dictionary) comes in handy. You use <strong>keys</strong> (like customer IDs) to quickly find their names. It’s much faster than searching through an array.</p>
<p>Here’s what it might look like in action:</p>
<pre><code class="lang-text">customers = { 101: "John", 102: "Jane", 103: "Emily", 104: "Michael" }
</code></pre>
<p>Now, if you want to find the customer with ID <code>103</code> (Emily), you just look up the key:</p>
<pre><code class="lang-text">print(customers[103])  // Output: Emily
</code></pre>
<p>Hash tables are awesome when you need to look things up fast. No searching, just straight to the point!</p>
<h3 id="heading-ready-to-dive-deeper"><strong>Ready to Dive Deeper?</strong></h3>
<p>If you're pumped to learn more about data structures, here are some resources to help you level up:</p>
<ul>
<li><p><a target="_blank" href="https://developers.google.com/learn">Google’s Data Structures Learning Guide</a></p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/learn">freeCodeCamp’s Data Structures and Algorithms Course</a></p>
</li>
</ul>
<h2 id="heading-algorithms-performing-computations"><strong>Algorithms: Performing Computations</strong></h2>
<p>Okay, so you've got your data. Now what? Well, you need to process it—and that’s where <strong>algorithms</strong> step in. Think of algorithms as a set of instructions, kind of like a recipe, that tells your computer how to solve a problem or complete a task, step-by-step.</p>
<h3 id="heading-why-learn-algorithms-before-you-learn-a-programming-language"><strong>Why Learn Algorithms Before You Learn a Programming Language?</strong></h3>
<p>Before you dive into learning a programming language, it helps to first learn <strong>algorithms</strong>. Here’s why: algorithms teach you how to think like a problem-solver. They help you break down challenges, think logically, and tackle them systematically. And when you know your algorithms, you’re not just memorizing syntax – you’re also learning <strong>how to solve problems efficiently</strong>. That makes programming a lot easier.</p>
<h3 id="heading-lets-dive-into-some-cool-algorithms"><strong>Let’s Dive Into Some Cool Algorithms</strong></h3>
<p>There are a ton of algorithms out there, but let’s keep it simple for now with a couple of the most popular ones. These will get you started and make your code run smoother than ever.</p>
<h4 id="heading-1-bubble-sort-the-basics-of-sorting"><strong>1. Bubble Sort: The Basics of Sorting</strong></h4>
<p>Bubble Sort is the beginner’s go-to algorithm for sorting. It’s simple—kinda like flipping pancakes. You start with the first two elements in the list, compare them, and if they’re in the wrong order, you swap them. Then you move to the next pair and keep doing that until everything is in order.</p>
<p>Here’s how it works:</p>
<p>Imagine you’ve got a list of names that need to be sorted alphabetically:</p>
<pre><code class="lang-plaintext">John, Sarah, Anna, Jake, Emily
</code></pre>
<p>Bubble Sort will go through the list, comparing two names at a time, swapping them if they’re out of order. It repeats this process until the list is sorted.</p>
<p>At the end, your list will look like this:</p>
<pre><code class="lang-plaintext">Anna, Emily, Jake, John, Sarah
</code></pre>
<p>It’s simple, but not the fastest for long lists.</p>
<h4 id="heading-2-quick-sort-speedy-and-smart"><strong>2. Quick Sort: Speedy and Smart</strong></h4>
<p>If Bubble Sort is like a slow and steady turtle, Quick Sort is the speedy rabbit. It’s much faster, especially for larger data sets. Quick Sort is a “divide and conquer” algorithm—it breaks the list into smaller chunks, sorts them, and then puts everything back together.</p>
<p>Here’s how it works:</p>
<p>Let’s take that same list of names and use Quick Sort:</p>
<pre><code class="lang-plaintext">John, Sarah, Anna, Jake, Emily
</code></pre>
<p>First, pick a <strong>pivot</strong>—let’s say <strong>Jake</strong>. Now, split the list into two parts:</p>
<ul>
<li><p>Names that come <strong>before Jake</strong> alphabetically:</p>
<pre><code class="lang-plaintext">  Anna, Emily
</code></pre>
</li>
<li><p>Names that come <strong>after Jake</strong> alphabetically:</p>
<pre><code class="lang-plaintext">  John, Sarah
</code></pre>
</li>
</ul>
<p>Now, you repeat the process for each group. Keep picking pivots, splitting, and sorting until each group is small enough to be sorted easily. Then you just put everything back together, and voilà! Sorted list:</p>
<pre><code class="lang-bash">Anna, Emily, Jake, John, Sarah
</code></pre>
<p>Quick Sort is much faster than Bubble Sort, especially when you've got a lot of names to sort.</p>
<p>Again, there are many more algorithms to learn, but this should give you the basic idea of how they work and why they’re useful.</p>
<h3 id="heading-why-you-should-care-about-algorithms"><strong>Why You Should Care About Algorithms</strong></h3>
<p>So why does any of this matter? Here’s the deal: first, algorithms help you solve problems more easily by breaking them down problems into manageable steps.</p>
<p>Second, they make your code faster. With the right algorithm, you can make your code run like a sports car—fast!</p>
<p>They also allow you to manage big datasets more easily. Some algorithms, like Quick Sort, can handle large sets of data in no time, which is crucial when performance matters.</p>
<h3 id="heading-want-to-get-better-at-algorithms"><strong>Want to Get Better at Algorithms?</strong></h3>
<p>If you’re hungry for more algorithmic goodness, here’s where to go:</p>
<ul>
<li><p><a target="_blank" href="https://leetcode.com/">LeetCode</a></p>
</li>
<li><p><a target="_blank" href="https://www.hackerrank.com/">HackerRank</a></p>
</li>
</ul>
<p>And if you want to dive deeper, <a target="_blank" href="https://www.freecodecamp.org/news/learn-data-structures-and-algorithms-2/">here’s a free 48-hour course on the freeCodeCamp YouTube channel</a> on Data Structures and Algorithms.</p>
<h2 id="heading-programming-languages-displaying-the-output"><strong>Programming Languages: Displaying the Output</strong></h2>
<p>Finally, we get to programming languages. This is where most beginners start and it’s often why they struggle. Without a solid grasp of data structures and algorithms, programming languages can feel like trying to run before you can walk. You can learn the syntax, but without understanding the fundamentals, you’ll find it harder to write effective code.</p>
<h3 id="heading-why-programming-languages-should-come-last"><strong>Why Programming Languages Should Come Last:</strong></h3>
<p>Once you understand how to manage input (data structures) and process it (algorithms), learning a programming language becomes much easier. You can go beyond worrying about memorizing syntax you may not understand, and start applying logic and solving problems. Programming languages are the tools you use to implement your algorithms and data structures.</p>
<h3 id="heading-which-programming-language-to-learn"><strong>Which Programming Language to Learn:</strong></h3>
<p>When it comes to picking a programming language, it’s important to align your choice with your goals. The language you choose should be based on what you want to build and your career path.</p>
<p>Here’s a breakdown of some common choices:</p>
<ul>
<li><p><strong>JavaScript</strong>: If your goal is to build websites or web applications, JavaScript is essential. It runs in the browser and allows you to create dynamic and interactive websites. JavaScript also has a wide range of libraries and frameworks (like React, Node.js, and Vue) that can speed up development.</p>
</li>
<li><p><strong>Python</strong>: Known for its simplicity and readability, Python is a great choice for beginners. It’s widely used in data science, web development (with frameworks like Django and Flask), and machine learning. Python's syntax is clean and easy to understand, which makes it perfect for beginners focusing on building strong foundational skills.</p>
</li>
<li><p><strong>Java</strong>: If you’re interested in building large-scale, enterprise-level applications, Java is a solid choice. It's a statically typed language, meaning you define variable types explicitly. Java is commonly used in Android development and large backend systems.</p>
</li>
<li><p><strong>Swift</strong>: Swift is a great language for iOS app development. If you want to build mobile apps for the Apple ecosystem (iPhone, iPad, etc.), Swift is the way to go. It's fast, modern, and integrates well with Apple’s software development tools.</p>
</li>
<li><p><strong>C#</strong>: If you’re planning to work with game development, especially with Unity, C# is your best bet. It’s also used for enterprise applications, web development (via ASP.NET), and desktop apps.</p>
</li>
</ul>
<h3 id="heading-how-to-choose-the-right-language-for-you"><strong>How to Choose the Right Language for You:</strong></h3>
<p>The best way to choose a language is to consider what excites you and where you want to focus your efforts. Don’t worry too much about finding the "easiest" language – just focus on one that aligns with your interests.</p>
<p>For example, if you're excited about building websites, JavaScript might be the best place to start. If you’re interested in mobile apps, Swift or Kotlin could be a better fit.</p>
<p>Once you've picked a language, don’t stress about mastering every feature. Start with the basics and build projects that interest you. As you practice, you’ll naturally pick up more advanced concepts and techniques. The goal isn’t to become a master of syntax but to learn how to think like a programmer and solve problems effectively.</p>
<p><strong>Here are some tips for getting started:</strong></p>
<ol>
<li><p><strong>Start with Basics</strong>: Get comfortable with basic syntax and constructs. Learn how to write loops, conditional statements, and functions in your chosen language.</p>
</li>
<li><p><strong>Build Simple Projects</strong>: Apply what you've learned by building small projects. If you're learning JavaScript or Python, for example, try building a simple to-do list app or a calculator. These types of projects help solidify your understanding.</p>
</li>
<li><p><strong>Understand Libraries and Frameworks</strong>: Once you have the basics down, dive into libraries and frameworks that can help speed up development. For JavaScript, this might mean learning React or Vue. For Python, it could mean exploring Django or Flask.</p>
</li>
</ol>
<p><strong>Helpful Resources for Learning Programming Languages</strong>:</p>
<ul>
<li><p><a target="_blank" href="http://JavaScript.info">JavaScript.info</a></p>
</li>
<li><p><a target="_blank" href="http://Python.org">Python.org</a> <a target="_blank" href="https://docs.python.org/3/tutorial/">Tutorials</a></p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/learn/">freeCodeCamp JavaScript Curriculum</a></p>
</li>
<li><p><a target="_blank" href="https://www.codecademy.com/learn/learn-python-3">Codecademy Python</a></p>
</li>
</ul>
<h2 id="heading-additional-skills"><strong>Additional Skills</strong></h2>
<p>While mastering the fundamentals of programming is essential, there are other skills that can significantly boost your development journey. These include problem-solving techniques, debugging, and version control. These skills might not seem as glamorous as learning a programming language, but they are just as important.</p>
<h3 id="heading-why-these-skills-matter"><strong>Why These Skills Matter:</strong></h3>
<p>Even if you know the syntax of a language, you’ll still face challenges when writing real-world applications. Problems like bugs, performance issues, and collaboration with other developers are inevitable. That’s why these additional skills are so valuable as they help you tackle these challenges more effectively.</p>
<p><strong>1. Problem-Solving:</strong><br>Problem-solving is at the core of programming. It’s not enough to know how to write code – you also need to know how to break down a problem and figure out the best way to solve it. A good programmer typically spends just as much time thinking about the problem as they do writing the solution.</p>
<ul>
<li><p><strong>Breaking down the problem</strong>: Start by understanding the problem. Ask questions like: What am I trying to achieve? What do I already know? What inputs do I have, and what do I expect as the output?</p>
</li>
<li><p><strong>Dividing it into smaller parts</strong>: Once you have a clear understanding, divide the problem into smaller, manageable pieces. This helps you focus on solving one part at a time rather than feeling overwhelmed by the entire issue.</p>
</li>
<li><p><strong>Looking for patterns</strong>: Often, problems in programming can be solved by recognizing patterns or using similar approaches you’ve learned before. Don’t be afraid to reuse code you’ve written or adapt it for a new task.</p>
</li>
</ul>
<p><strong>2. Debugging:</strong> No code is perfect, and bugs are inevitable. Debugging is the process of finding and fixing these bugs (problems in your code that cause it to mess up or not run). It's a skill that every programmer needs to learn because it helps you maintain and improve the quality of your code.</p>
<ul>
<li><p><strong>Using print statements</strong>: A simple and effective debugging technique is inserting print statements (or logging) in your code. This allows you to inspect variables and understand what’s happening at different stages of your program.</p>
</li>
<li><p><strong>Using a debugger</strong>: A debugger is a tool that allows you to step through your code line by line. It’s especially helpful when dealing with more complex bugs. Many programming environments, like Visual Studio Code or PyCharm, have built-in debuggers.</p>
</li>
<li><p><strong>Checking for common issues</strong>: Bugs often come from simple issues like typos, off-by-one errors, or misunderstanding the behavior of a function. Before diving into complex debugging, double-check your assumptions.</p>
</li>
</ul>
<p><strong>3. Version Control:</strong> Version control is a tool that helps developers manage changes to their code over time. It allows you to keep track of edits, collaborate with others, and revert to previous versions if something goes wrong.</p>
<ul>
<li><p><strong>Git</strong>: Git is the most widely used version control system. It allows you to save snapshots of your code, known as commits, and track the history of your project. It also makes collaboration easier by allowing multiple developers to work on the same project without stepping on each other's toes.</p>
</li>
<li><p><strong>GitHub</strong>: GitHub is a platform that hosts Git repositories and offers additional tools like issue tracking, project management, and code reviews. As you start collaborating with other developers, GitHub will become an invaluable resource.</p>
</li>
<li><p><strong>Basic Git commands</strong>: Learn basic Git commands like <code>git init</code>, <code>git commit</code>, <code>git push</code>, and <code>git pull</code>. Understanding these commands will allow you to manage your code effectively, both when working solo and with a team.</p>
</li>
</ul>
<p><strong>Helpful Resources for Additional Skills:</strong></p>
<ul>
<li><p><a target="_blank" href="https://leetcode.com/">LeetCode</a> (for problem-solving practice)</p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/news/debugging-tips/">freeCodeCamp Debugging Guide</a></p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/news/gitting-things-done-book/">Book on Learning Git and GitHub</a></p>
</li>
<li><p><a target="_blank" href="https://git-scm.com/doc">Git Documentation</a></p>
</li>
<li><p><a target="_blank" href="https://guides.github.com/">GitHub Guides</a></p>
</li>
</ul>
<h2 id="heading-how-to-build-the-right-foundations-practice-practice-practice"><strong>How to Build the Right Foundations: Practice, Practice, Practice</strong></h2>
<p>Okay, so you've got the theory down, but the real magic happens when you put what you've learned into action. Mastering data structures and algorithms isn't just about understanding them it’s about <strong>practicing</strong> until they feel second nature. Here’s how you can do that:</p>
<h3 id="heading-start-small-learn-the-basics"><strong>Start Small: Learn the Basics</strong></h3>
<p>Before you dive into big, complex problems, start by getting comfortable with the basics. Things like arrays, stacks, and queues are your best friends.</p>
<p><strong>Example Practice</strong>:<br>Start with problems that help you understand how these data structures work. Try writing a function that <strong>reverses a string</strong> using a stack. Here's a quick idea of what that might look like in JavaScript:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">reverseString</span>(<span class="hljs-params">inputString</span>) </span>{
    <span class="hljs-keyword">let</span> stack = [];
    <span class="hljs-comment">// Push all characters onto the stack</span>
    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i &lt; inputString.length; i++) {
        stack.push(inputString[i]);
    }

    <span class="hljs-keyword">let</span> reversedString = <span class="hljs-string">''</span>;
    <span class="hljs-comment">// Pop characters off the stack and add them to reversedString</span>
    <span class="hljs-keyword">while</span> (stack.length &gt; <span class="hljs-number">0</span>) {
        reversedString += stack.pop();
    }

    <span class="hljs-keyword">return</span> reversedString;
}

<span class="hljs-built_in">console</span>.log(reverseString(<span class="hljs-string">"hello"</span>));  <span class="hljs-comment">// Output: "olleh"</span>
</code></pre>
<p><strong>Why this helps</strong>: By using a stack to reverse a string, you're getting a hands-on feel for how stacks work—storing items and then removing them in reverse order. Practice small problems like this daily.</p>
<h3 id="heading-solve-real-problems-bring-algorithms-to-life"><strong>Solve Real Problems: Bring Algorithms to Life</strong></h3>
<p>Once you’ve nailed the basics, it’s time to apply what you've learned in real-world scenarios. Try using algorithms to solve problems that feel useful in real life.</p>
<p><strong>Example Practice</strong>:<br>Create a simple <strong>sorting program</strong> to arrange names alphabetically using an algorithm like <strong>Bubble Sort</strong> or <strong>Quick Sort</strong>. Here’s a quick example using Bubble Sort:</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">bubbleSort</span>(<span class="hljs-params">names</span>) </span>{
    <span class="hljs-keyword">let</span> n = names.length;
    <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i &lt; n; i++) {
        <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> j = <span class="hljs-number">0</span>; j &lt; n - i - <span class="hljs-number">1</span>; j++) {
            <span class="hljs-keyword">if</span> (names[j] &gt; names[j + <span class="hljs-number">1</span>]) {
                <span class="hljs-keyword">let</span> temp = names[j];
                names[j] = names[j + <span class="hljs-number">1</span>];
                names[j + <span class="hljs-number">1</span>] = temp;
            }
        }
    }
    <span class="hljs-keyword">return</span> names;
}

<span class="hljs-keyword">let</span> names = [<span class="hljs-string">"John"</span>, <span class="hljs-string">"Emily"</span>, <span class="hljs-string">"Sarah"</span>, <span class="hljs-string">"Jake"</span>];
<span class="hljs-built_in">console</span>.log(bubbleSort(names));  <span class="hljs-comment">// Output: ['Emily', 'Jake', 'John', 'Sarah']</span>
</code></pre>
<p><strong>Why this helps</strong>: Solving real problems with algorithms deepens your understanding and gives you a tangible result. Whether you’re sorting names or calculating averages, real problems make the learning experience stick.</p>
<h3 id="heading-write-code-daily-make-it-a-habit"><strong>Write Code Daily: Make It a Habit</strong></h3>
<p>The secret to becoming a great programmer is consistency. Choose a programming language (Python, JavaScript, Java, or whatever you like) and make it a habit to write code <strong>every day</strong>. Even if it's just for 30 minutes, those 30 minutes add up.</p>
<p><strong>Example Practice</strong>:<br>Pick a small problem every day to practice applying data structures and algorithms. Use platforms like <a target="_blank" href="https://leetcode.com/">LeetCode</a> or <a target="_blank" href="https://www.hackerrank.com/">HackerRank</a> for daily challenges that fit your skill level. Here’s an example of a coding challenge you might find on these platforms:</p>
<ul>
<li><p><strong>Problem</strong>: Find the maximum number in a list of integers.</p>
<pre><code class="lang-javascript">  <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">findMax</span>(<span class="hljs-params">nums</span>) </span>{
      <span class="hljs-keyword">let</span> maxNum = nums[<span class="hljs-number">0</span>];
      <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> num <span class="hljs-keyword">of</span> nums) {
          <span class="hljs-keyword">if</span> (num &gt; maxNum) {
              maxNum = num;
          }
      }
      <span class="hljs-keyword">return</span> maxNum;
  }

  <span class="hljs-built_in">console</span>.log(findMax([<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, <span class="hljs-number">7</span>, <span class="hljs-number">0</span>, <span class="hljs-number">-5</span>]));  <span class="hljs-comment">// Output: 7</span>
</code></pre>
</li>
</ul>
<p><strong>Why this helps</strong>: Daily practice is key to internalizing what you’ve learned. It helps you stay sharp and gradually move from simple problems to more complex ones.</p>
<h3 id="heading-challenge-yourself-go-beyond-your-comfort-zone"><strong>Challenge Yourself: Go Beyond Your Comfort Zone</strong></h3>
<p>When you feel like you’ve got the basics down, it’s time to <strong>level up</strong>. Get involved in coding challenges or take on personal projects that push you outside of your comfort zone.</p>
<p><strong>Example Practice</strong>:<br>Join a hackathon or participate in a competitive coding challenge like <a target="_blank" href="https://codingcompetitions.withgoogle.com/">Google Code Jam</a> or <a target="_blank" href="https://codeforces.com/">Codeforces</a>. These challenges will push your problem-solving skills to the limit and help you learn new algorithms and techniques.</p>
<p><strong>Why this helps</strong>: Challenges force you to think critically and solve problems under time constraints. They help you learn faster and build confidence in your abilities.</p>
<h3 id="heading-stay-consistent-build-a-routine"><strong>Stay Consistent: Build a Routine</strong></h3>
<p>Consistency is the key to success in programming (and in most things, really). Set aside time every day or week to practice. Even if you don’t feel like it, just getting in some short coding sessions will make a huge difference in the long run.</p>
<p><strong>Example Practice</strong>:<br>Create a study plan with weekly goals. For example:</p>
<ul>
<li><p><strong>Week 1</strong>: Focus on basic data structures (arrays, stacks, queues).</p>
</li>
<li><p><strong>Week 2</strong>: Move on to sorting algorithms (Bubble Sort, Merge Sort).</p>
</li>
<li><p><strong>Week 3</strong>: Dive into more complex algorithms like Binary Search or Dynamic Programming.</p>
</li>
</ul>
<p>A routine ensures that you’re making steady progress. Plus, it makes sure you don’t get stuck on one topic for too long.</p>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>Programming doesn’t have to be so hard. It’s like building a house: without a strong foundation, everything else feels unstable. But with the right basics like data structures, algorithms, and logical thinking, you’ll be amazed at how quickly you can create great things.</p>
<p>If someone had told me in 2016 that I’d be writing this article today, I wouldn’t have believed them. But with the right preparation, I turned frustration into confidence, and so can you.</p>
<p>Don’t let frustration hold you back. Focus on the fundamentals, practice consistently, and explore the resources I’ve shared. Remember, programming isn’t about being a genius it’s about preparation and persistence. You’ve got this!</p>
<p>If you have any questions, feel free to find me on Twitter at <a target="_blank" href="https://x.com/sprucekhalifa">@sprucekhalifa</a>, and don’t forget to follow me for more tips and updates. Happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use SSH to Safely Connect to GitHub: A Simple Guide for Windows OS ]]>
                </title>
                <description>
                    <![CDATA[ In this article, we will explore the Secure Shell (SSH) protocol, a vital tool for securing network communications. SSH is widely used for accessing remote servers and managing code repositories securely, particularly in environments like GitHub. You... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-ssh-to-connect-to-github-guide-for-windows/</link>
                <guid isPermaLink="false">66f6c252eda714770c805738</guid>
                
                    <category>
                        <![CDATA[ ssh ]]>
                    </category>
                
                    <category>
                        <![CDATA[ networking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Beginner Developers ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Programming Blogs ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ coding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oghenekparobo Stephen ]]>
                </dc:creator>
                <pubDate>Fri, 27 Sep 2024 14:33:54 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1727226065318/c1522ad1-df49-4bc9-aa31-567d4012585a.avif" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, we will explore the Secure Shell (SSH) protocol, a vital tool for securing network communications.</p>
<p>SSH is widely used for accessing remote servers and managing code repositories securely, particularly in environments like GitHub. You’ll learn about the fundamental concepts of SSH, how it works, and practical steps to set it up on Windows. We will cover everything from generating SSH keys to testing your connection and cloning repositories.</p>
<p>By the end of this guide, you will have a solid understanding of SSH and be equipped to enhance your workflow with secure connections.</p>
<h3 id="heading-what-well-cover">What we’ll cover:</h3>
<ol>
<li><p><a class="post-section-overview" href="#heading-what-is-ssh">What is SSH?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-does-the-secure-shell-protocol-work">How Does the Secure Shell Protocol Work?</a></p>
</li>
</ol>
<ul>
<li><p><a class="post-section-overview" href="#heading-tcpip">TCP/IP</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-ssh-connection-process">The SSH Connection Process</a></p>
</li>
</ul>
<ol start="3">
<li><a class="post-section-overview" href="#heading-how-to-use-ssh-in-windows">How to Use SSH in Windows</a></li>
</ol>
<ul>
<li><p><a class="post-section-overview" href="#heading-windows-powershell-or-command-prompt">Windows PowerShell or Command Prompt</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-windows-subsystem-for-linux-wsl">Windows Subsystem for Linux (WSL)</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-third-party-ssh-clients-for-example-putty">Third-Party SSH Clients (for example, PuTTY)</a></p>
</li>
</ul>
<ol start="4">
<li><a class="post-section-overview" href="#heading-how-to-use-ssh-in-windows-to-connect-to-github">How to Use SSH In Windows To Connect To GitHub</a></li>
</ol>
<ul>
<li><p><a class="post-section-overview" href="#heading-install-through-windows-optional-features">Install Through Windows Optional Features</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-download-and-install-from-github">Download And Install From Github</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-generate-ssh-keys">How To Generate SSH Keys</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-add-the-public-key-to-github">How To Add The Public Key To GitHub</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-testing-the-ssh-connection">Testing The SSH Connection</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-cloning-a-repository-using-ssh">Cloning A Repository Using SSH</a></p>
</li>
</ul>
<ol start="5">
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ol>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>Before you begin this tutorial, ensure you have the following:</p>
<ul>
<li><p><strong>Basic Understanding of Command Line</strong>: You should be familiar with using the command line interface (CLI) on Windows, including how to open PowerShell or Command Prompt.</p>
</li>
<li><p><strong>Windows Operating System</strong>: This tutorial is specifically tailored for users running Windows 10 or later versions.</p>
</li>
<li><p><strong>OpenSSH Client Installed</strong>: Ensure that you have the OpenSSH client installed on your system. You can check this by typing <code>ssh</code> in your command line interface.</p>
</li>
<li><p><strong>GitHub Account</strong>: You’ll need a GitHub for testing SSH connections and managing repositories.</p>
</li>
<li><p><strong>Text Editor</strong>: You’ll also need a code editor (like Visual Studio Code, Notepad++, or similar) to edit configuration files if needed.</p>
</li>
</ul>
<h1 id="heading-what-is-ssh">What is SSH?</h1>
<p><strong>SSH</strong> stands for secure shell (protocol). The secure shell protocol is a cryptographic network protocol for operating network services securely over an unsecured network.</p>
<p>In simpler terms, <strong>SSH</strong> is a way to safely use services on a network, like accessing a remote computer, even when the network itself isn’t fully secure. It protects your data and communications by scrambling (encrypting) everything, so no one can eavesdrop or tamper with it, even if they intercept it.</p>
<p>This is especially useful when connecting to services like GitHub, where you want to securely manage code on a remote server.</p>
<h3 id="heading-how-does-the-secure-shell-protocol-work">How Does The Secure Shell Protocol Work?</h3>
<p>SSH runs on the <a target="_blank" href="https://www.freecodecamp.org/news/what-is-tcp-ip-layers-and-protocols-explained/">TCP/IP set of rules</a> that computers use to communicate over the internet.</p>
<h3 id="heading-tcpip">TCP/IP</h3>
<p><strong>TCP</strong> stands for <strong>Transmission Control Protocol</strong>. It’s one of the core protocols in the <strong>TCP/IP suite</strong>, which is used to send data over the internet. The <strong>IP</strong> stands for <strong>Internet Protocol</strong>. It's part of the TCP/IP set of rules also, and its job is to guide packets of data to the right destination on the internet.</p>
<p>You can read more about the TCP/IP protocol <a target="_blank" href="https://www.cloudflare.com/learning/ddos/glossary/tcp-ip/">here</a> if you’d like to go deeper.</p>
<h3 id="heading-the-ssh-connection-process">The SSH Connection Process</h3>
<p>The <strong>Secure Shell protocol</strong> operates by establishing a secure connection between a client (your local machine) and a remote server.</p>
<p>First, the client initiates the connection by specifying the server's address (IP or domain) and login credentials. During the authentication phase, the server verifies the identity of the client, typically using a password or, more securely, SSH keys. These are a pair consisting of a private key stored on the client and a public key on the server.</p>
<p>Once authenticated, SSH encrypts all data transferred between the client and the server, ensuring confidentiality and integrity. This secure channel allows the client to execute commands, transfer files, and manage the server remotely as if physically present while safeguarding the data from potential interception or tampering.</p>
<p><strong>IP</strong> is responsible for addressing and routing the initial connection request from the client to the server. It ensures that the request, which includes the server's address, is sent to the correct destination.</p>
<p>Once the SSH connection request reaches the server, <strong>TCP</strong> establishes a reliable communication channel. It manages data transmission between the client and the server, ensuring that all packets are delivered accurately and in the correct order.</p>
<p>During the SSH session, <strong>TCP</strong> ensures that data <a target="_blank" href="https://www.cloudflare.com/learning/network-layer/what-is-a-packet/">packets</a> are correctly transmitted and reassembled, while <strong>IP</strong> handles the addressing. SSH then uses this secure and reliable channel to authenticate the client, encrypt all transferred data, and maintain a secure connection. This allows remote management and file transfer with confidentiality and integrity.</p>
<h2 id="heading-how-to-use-ssh-in-windows">How to Use SSH in Windows</h2>
<p>Windows provides a few different ways to use SSH:</p>
<h3 id="heading-windows-powershell-or-command-prompt"><strong>Windows PowerShell or Command Prompt</strong></h3>
<p>Windows comes with a built-in OpenSSH client. You can access this by opening PowerShell or Command Prompt and typing <code>ssh</code> This method is simple and requires no additional software.</p>
<h3 id="heading-windows-subsystem-for-linux-wsl"><strong>Windows Subsystem for Linux (WSL)</strong></h3>
<p>You can enable Windows Subsystem for Linux to run a Linux distribution directly on your Windows PC. Many Linux distros come with OpenSSH pre-installed, allowing you to use <code>ssh</code> commands from the Linux terminal. This method is great if you prefer a Linux-like environment.</p>
<h3 id="heading-third-party-ssh-clients-for-example-putty"><strong>Third-Party SSH Clients (for example, PuTTY)</strong></h3>
<p>If you prefer a standalone application, tools like PuTTY offer a graphical interface to manage SSH connections. PuTTY is widely used for connecting to servers and supports advanced options like saving connection profiles.</p>
<p>Windows 10 and later versions come with a native OpenSSH client, which allows you to securely connect to remote systems over an SSH (Secure Shell) connection.</p>
<h2 id="heading-how-to-use-ssh-in-windows-to-connect-to-github">How to Use SSH in Windows to Connect to GitHub</h2>
<p>If you're using Windows 10 or a later version, you can take advantage of the built-in SSH capabilities.</p>
<p>To get started, open your Windows Terminal or PowerShell, preferably as an administrator. In the command line interface, you can check if SSH is installed by typing the command <code>ssh</code>. This will confirm if the SSH client is available on your system.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727215416889/9985624e-ffe6-4aff-9e58-2fe3e6b36f26.png" alt="ssh cli command result, in this case a positive one that ssh is installed on the system" class="image--center mx-auto" width="620" height="157" loading="lazy"></p>
<p>If you got the above image, it means SSH is available on your local system.</p>
<p>The first thing you'll need to set up an SSH connection is a pair of SSH keys – a public key and a private key. These are typically located in the <code>.ssh</code> directory in your home directory if generated already.</p>
<p>On Windows, your home directory is usually <code>C:\Users\owner\.ssh</code>. This is where you will find your SSH key files if they've already been generated.</p>
<p>You can easily install OpenSSH on your Windows system. There are a couple of ways to do this:</p>
<h3 id="heading-install-through-windows-optional-features">Install Through Windows Optional Features</h3>
<ol>
<li><p>Open the Windows Start menu and type "optional features" in the search bar.</p>
</li>
<li><p>Click on "Add or remove Windows optional features" to open the Optional Features window.</p>
</li>
<li><p>In the Optional Features window, scroll down and find the "OpenSSH Client" option.</p>
</li>
<li><p>Check the box next to it and click the "Install" button at the bottom to install the OpenSSH client.</p>
</li>
</ol>
<h3 id="heading-download-and-install-from-github">Download and Install from GitHub</h3>
<ol>
<li><p>Visit the GitHub repository for the Win32-OpenSSH (32-bit) or Win64-OpenSSH (64-bit) release, depending on your Windows version:</p>
<ul>
<li><p>32-bit: <a target="_blank" href="https://github.com/PowerShell/Win32-OpenShell/releases">https://github.com/PowerShell/Win32-OpenShell/releases</a></p>
</li>
<li><p>64-bit: <a target="_blank" href="https://github.com/PowerShell/Win64-OpenShell/releases">https://github.com/PowerShell/Win64-OpenShell/releases</a></p>
</li>
</ul>
</li>
<li><p>Download the latest .msi installer file that matches your Windows architecture.</p>
</li>
<li><p>Run the .msi installer to install the OpenSSH client on your system.</p>
</li>
</ol>
<p>After installing OpenSSH, you can now generate SSH keys by opening the Windows Terminal or PowerShell and running the <code>ssh-keygen</code> command. This will walk you through the process of creating a new public-private key pair that you can use to authenticate your SSH connections, such as to your GitHub account.</p>
<p>The public key can then be added to your GitHub account settings, allowing you to connect to your repositories using the SSH protocol instead of HTTPS. Remember to keep your private key safe and secure, as it provides access to your GitHub account.</p>
<p>By installing OpenSSH, you've set up the necessary foundation to work with SSH keys and establish secure connections to remote systems and services like GitHub.</p>
<p>Now you can check if the OpenSSH server is running by accessing the Windows Services utility. To do this, press the Windows key + R to open the Run dialog, then input "services.msc" and press Enter. This will open the services manager.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727217366905/348ece20-432c-443e-951c-5c61ae4c7b94.png" alt="a windows prompt, generated by clicking &quot;windows + r&quot;" class="image--center mx-auto" width="395" height="197" loading="lazy"></p>
<p>The services manager:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727217489636/dffca024-3cb2-4b2b-8a03-fb4a2b5cc629.png" alt="The services manager generated after clicking &quot;windows + r&quot;" class="image--center mx-auto" width="796" height="563" loading="lazy"></p>
<p>Scroll and look for the openSSH SSH server:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727217823859/accbf838-e6cb-491a-ad1a-affa0dd59230.png" alt="this is image indicates that openSSH server is runing in the system, automatically as far as the system is powered on " class="image--center mx-auto" width="451" height="19" loading="lazy"></p>
<p>If the OpenSSH Server service is running in the Services window, it means that the OpenSSH server component is properly set up on your Windows system. This is an important first step in enabling secure SSH connections.</p>
<p>To ensure the OpenSSH server starts automatically whenever your PC is turned on, you can further configure the service's startup type. In the Services window, right-click on the "OpenSSH Server" service and select "Properties."</p>
<p>In the service properties, look for the "Startup type" dropdown and select "Automatic." This will ensure the OpenSSH Server service starts up automatically whenever your computer is powered on, rather than requiring you to manually start it each time.</p>
<p>By setting the OpenSSH Server service to start automatically, you can be confident that the server will be ready to accept incoming SSH connections at all times, without needing to remember to start it manually. This streamlines the process of using SSH-based authentication and remote access on your Windows machine.</p>
<p>Remember, having the OpenSSH Server service running and set to start automatically is just the first step. You'll still need to generate SSH keys and configure your GitHub account (or other services) to use the public key for authentication. But this initial setup of the OpenSSH server lays the foundation for seamless SSH usage going forward.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727218121688/a902b304-8103-49a5-8852-7094b4f70d5a.png" alt="opened the openSSH on the services manager" class="image--center mx-auto" width="901" height="584" loading="lazy"></p>
<p>Now that you've confirmed the OpenSSH Server is running on your Windows system, the next step is to ensure it can communicate through the Windows Firewall. The easiest way to do this is by using a PowerShell command.</p>
<p>Open PowerShell as an administrator and run the following command:</p>
<pre><code class="lang-plaintext">New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\Program Files\OpenSSH\sshd.exe"
</code></pre>
<p>This PowerShell command will create a new firewall rule that allows inbound TCP traffic on port 22 (the default SSH port) for the OpenSSH Server executable located at "C:\Program Files\OpenSSH\sshd.exe".</p>
<p>Here's a breakdown of the different parameters used in the command:</p>
<ul>
<li><p><code>-Name sshd</code>: Assigns the name "sshd" to the new firewall rule.</p>
</li>
<li><p><code>-DisplayName 'OpenSSH SSH Server'</code>: Provides a descriptive display name for the rule.</p>
</li>
<li><p><code>-Enabled True</code>: Ensures the rule is active and enabled.</p>
</li>
<li><p><code>-Direction Inbound</code>: Specifies that the rule applies to inbound network traffic.</p>
</li>
<li><p><code>-Protocol TCP</code>: Configures the rule to allow TCP protocol connections.</p>
</li>
<li><p><code>-Action Allow</code>: Instructs the firewall to allow the specified traffic.</p>
</li>
<li><p><code>-LocalPort 22</code>: Sets the local port to 22, which is the default SSH port.</p>
</li>
<li><p><code>-Program "C:\Program Files\OpenSSH\sshd.exe"</code>: Identifies the specific program (the OpenSSH Server executable) that the rule should apply to.</p>
</li>
</ul>
<p>By running this PowerShell command, you're creating a dedicated firewall rule that permits the OpenSSH Server to communicate through the Windows Firewall, enabling you to establish secure SSH connections to your system.</p>
<p>Remember, it's always a good practice to review your firewall settings periodically, especially if you make changes to your network configuration or want to refine access to the OpenSSH Server further.</p>
<p>If successful, you should get this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727219301264/fb58d5ce-f8cf-49d2-9b56-6f1571c08652.png" alt=" dedicated firewall rule that permits the OpenSSH Server to communicate through the Windows Firewall" class="image--center mx-auto" width="1364" height="435" loading="lazy"></p>
<h4 id="heading-summary-of-the-above-cli-response">Summary of the above CLI response:</h4>
<ul>
<li><p><strong>Rule Name</strong>: sshd</p>
</li>
<li><p><strong>Display Name</strong>: OpenSSH SSH Server</p>
</li>
<li><p><strong>Direction</strong>: Inbound</p>
</li>
<li><p><strong>Action</strong>: Allow</p>
</li>
<li><p><strong>Enabled</strong>: True</p>
</li>
<li><p><strong>Profile</strong>: Any</p>
</li>
</ul>
<p>The rule is designed to allow inbound traffic, enabling external clients to connect to the server. The "Enabled" status confirms that the rule is currently active, while the "Profile" set to "Any" indicates that it applies to all network types, including public, private, and domain.</p>
<h4 id="heading-security-policies">Security Policies:</h4>
<ul>
<li><p><strong>Edge Traversal Policy</strong>: Block</p>
</li>
<li><p><strong>Loose Source Mapping</strong>: False</p>
</li>
<li><p><strong>Local Only Mapping</strong>: False</p>
</li>
</ul>
<p>The "EdgeTraversalPolicy" is configured to "Block," preventing traffic from traversing the network boundary, specifically disallowing connections from public networks to private ones. This helps enhance security by mitigating potential vulnerabilities.</p>
<p>The settings for "LooseSourceMapping" and "LocalOnlyMapping" are both set to false, ensuring that only direct connections are allowed without additional mapping.</p>
<h4 id="heading-status-and-enforcement">Status and Enforcement:</h4>
<ul>
<li><p><strong>Primary Status</strong>: OK</p>
</li>
<li><p><strong>Status</strong>: The rule was parsed successfully from the store.</p>
</li>
<li><p><strong>Enforcement Status</strong>: NotApplicable</p>
</li>
<li><p><strong>Policy Store Source</strong>: PersistentStore</p>
</li>
<li><p><strong>Policy Store Source Type</strong>: Local</p>
</li>
</ul>
<p>The "Status" field confirms that the rule has been successfully parsed from the policy store, indicating no configuration issues. The "EnforcementStatus" marked as "NotApplicable" suggests there are no restrictions that would prevent the rule from being enforced.</p>
<p>Remember, to set up an SSH connection we need a pair of SSH keys – a public key and a private key. Let’s see how to do that now.</p>
<h3 id="heading-how-to-generate-ssh-keys">How to Generate SSH Keys</h3>
<ul>
<li><p>Open your Windows Terminal or PowerShell.</p>
</li>
<li><p>Run the command <code>ssh-keygen</code> to generate a new SSH key pair.</p>
</li>
<li><p>Follow the prompts to specify the save location and passphrase (optional) for your keys.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727220068539/7ee02096-da9e-4a26-8da8-106ec2dcefee.png" alt="cli command for generating ssh keys and its response" class="image--center mx-auto" width="698" height="362" loading="lazy"></p>
<p>You will get what you see in the above image if you’re successful.</p>
<p>The public key will be saved as <code>id_</code><a target="_blank" href="http://rsa.pub"><code>rsa.pub</code></a> in the <code>.ssh</code> directory of your user's home folder (for example, <code>C:\Users\you\.ssh\id_</code><a target="_blank" href="http://rsa.pub"><code>rsa.pub</code></a>).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727220167279/b04fed4a-17d1-49e6-ad34-d5cb41692d13.png" alt="viewing the private and public ky oon our local system in our home-directory/.ssh" class="image--center mx-auto" width="766" height="171" loading="lazy"></p>
<h3 id="heading-how-to-add-the-public-key-to-github">How to Add the Public Key to GitHub</h3>
<ul>
<li><p>Log in to your GitHub account and go to your account settings.</p>
</li>
<li><p>Navigate to the "SSH and GPG keys" section.</p>
</li>
<li><p>Click on the "New SSH key" button. Give your key a descriptive title, and then copy the contents of the <code>id_</code><a target="_blank" href="http://rsa.pub"><code>rsa.pub</code></a> file (your public key) into the "Key" field.</p>
</li>
<li><p>Click "Add SSH key" to save the new key.</p>
</li>
</ul>
<h3 id="heading-testing-the-ssh-connection">Testing the SSH Connection</h3>
<p>In your Windows Terminal or PowerShell, execute the following command to test your SSH connection to GitHub:</p>
<pre><code class="lang-plaintext">bashCopy codessh -T git@github.com
</code></pre>
<p>If prompted, enter your passphrase if you set one during the key generation process. If you did not set a passphrase, simply type "yes" when asked for a response to the handshake.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727220975104/6ed54e15-00a9-4cad-b95e-3424be855596.png" alt="6ed54e15-00a9-4cad-b95e-3424be855596" class="image--center mx-auto" width="680" height="93" loading="lazy"></p>
<p>If the connection is successful, you should see a message like "Hi username! You've successfully authenticated, but GitHub does not provide shell access."</p>
<p>You can solve this by following the process <a target="_blank" href="https://gist.github.com/bsara/5c4d90db3016814a3d2fe38d314f9c23">here</a>.</p>
<h3 id="heading-cloning-a-repository-using-ssh">Cloning a Repository Using SSH</h3>
<p>Navigate to one of your GitHub repositories and copy the SSH clone URL, which typically starts with <a target="_blank" href="mailto:git@github.com"><code>git@github.com</code></a>:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727222441040/926444a1-bdf8-4f33-980c-0c2c87691a6b.png" alt="ssh link to clone a github repo" class="image--center mx-auto" width="208" height="135" loading="lazy"></p>
<p>In your local terminal, run the command <code>git clone</code> <a target="_blank" href="mailto:git@github.com"><code>git@github.com</code></a><code>:username/repository.git</code> to clone the repository using the SSH protocol.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>You now have SSH working between your Windows computer and your GitHub account. This means you can work with your GitHub projects more easily and securely.</p>
<h3 id="heading-why-ssh-is-cool">Why SSH is Cool:</h3>
<ol>
<li><p>It's super secure. SSH scrambles your data so others can't snoop on it.</p>
</li>
<li><p>It's convenient. No more typing passwords all the time!</p>
</li>
<li><p>It's flexible. You can use it for more than just GitHub.</p>
</li>
<li><p>You can have different "keys" for different projects.</p>
</li>
<li><p>It works well with automatic coding tools.</p>
</li>
</ol>
<p>But it’s not perfect:</p>
<ol>
<li><p>Keeping track of many SSH keys can be a headache.</p>
</li>
<li><p>If someone gets your private key, they could access your stuff.</p>
</li>
<li><p>Setting it up the first time can be tricky.</p>
</li>
<li><p>You need to remember to change your keys yourself for extra safety.</p>
</li>
<li><p>Some networks might block SSH, which can be annoying.</p>
</li>
</ol>
<p>Remember to keep your private SSH key safe. It's like a special password for your GitHub account, so guard it well.</p>
<p>Even with these small downsides, SSH is still awesome for most coders. You are now all set to work on your GitHub projects more easily and safely. Have fun with your improved coding setup, and keep learning about ways to keep your work secure.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
