<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdulsalam Abdulrahman (Amtech Digital)</title>
    <description>The latest articles on DEV Community by Abdulsalam Abdulrahman (Amtech Digital) (@abdulsalamamtech).</description>
    <link>https://dev.to/abdulsalamamtech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1448685%2F950ce24a-4ae9-4c5e-ac6a-dbc4515ce156.png</url>
      <title>DEV Community: Abdulsalam Abdulrahman (Amtech Digital)</title>
      <link>https://dev.to/abdulsalamamtech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdulsalamamtech"/>
    <language>en</language>
    <item>
      <title>PHP2SHELL: STOP SPREADING MISINFORMATION ABOUT PHP!</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Fri, 23 Oct 2026 15:06:44 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/php2shell-stop-spreading-misinformation-about-php-518n</link>
      <guid>https://dev.to/abdulsalamamtech/php2shell-stop-spreading-misinformation-about-php-518n</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5taszx1n4vjjj4dsau8v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5taszx1n4vjjj4dsau8v.png" alt=" " width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚨 &lt;strong&gt;PHP2SHELL: STOP SPREADING MISINFORMATION ABOUT PHP!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recently, there's been a lot of discussion about the critical PHP2Shell vulnerabilities, and unfortunately, some people are spreading fear and misinformation.&lt;/p&gt;

&lt;p&gt;I've seen statements suggesting that PHP is no longer secure, that developers should abandon it, or that 70% of websites have already been compromised.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's get the facts straight. 👇&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;PHP2Shell is real.&lt;/strong&gt; Two critical vulnerabilities (CVE-2026-109618 and CVE-2026-109619) were discovered in PHP's core runtime.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;The threat is serious.&lt;/strong&gt; These vulnerabilities could allow attackers to execute malicious code on affected servers.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;PHP is not dead.&lt;/strong&gt; Discovering vulnerabilities doesn't automatically make a programming language obsolete.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;70% of websites being powered by PHP doesn't mean 70% have been hacked.&lt;/strong&gt; There's a difference between potential exposure and confirmed exploitation.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Security patches are available.&lt;/strong&gt; The PHP team released emergency updates on October 21, 2026, addressing these vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, what should developers do?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 Update affected PHP installations.&lt;/p&gt;

&lt;p&gt;🔹 Check official security advisories.&lt;/p&gt;

&lt;p&gt;🔹 Verify that your hosting provider has applied the necessary fixes.&lt;/p&gt;

&lt;p&gt;🔹 Monitor your applications for suspicious activity.&lt;/p&gt;

&lt;p&gt;🔹 Stop sharing unverified information.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;MY TAKE:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every technology can experience security vulnerabilities. What matters is how vulnerabilities are discovered, addressed, and managed.&lt;/p&gt;

&lt;p&gt;As software engineers, we should educate people with facts, not create unnecessary panic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't abandon a technology because of headlines. Understand the problem, apply the fixes, and keep building securely.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📢 Before sharing the next alarming PHP headline, verify the source.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;What do you think about the reactions to PHP2Shell?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;👨🏽‍💻 Abdulsalam Abdulrahman&lt;br&gt;&lt;br&gt;
Software Engineer | Tech Educator | SDG Advocate&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AMTECH | &lt;a class="mentioned-user" href="https://dev.to/abdulsalamamtech"&gt;@abdulsalamamtech&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  PHP #PHP2Shell #Cybersecurity #SoftwareEngineering #Laravel #WebDevelopment #SecureCoding #AMTECH #TechEducation #abdulsalamamtech
&lt;/h1&gt;

</description>
      <category>php2shell</category>
      <category>php</category>
      <category>security</category>
      <category>abdulsalamamtech</category>
    </item>
    <item>
      <title>How to Limit Battery Charging on Ubuntu Linux (Step-by-Step)</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Thu, 15 Oct 2026 10:41:30 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/how-to-limit-battery-charging-on-ubuntu-linux-step-by-step-526p</link>
      <guid>https://dev.to/abdulsalamamtech/how-to-limit-battery-charging-on-ubuntu-linux-step-by-step-526p</guid>
      <description>&lt;p&gt;Here is a clean, markdown-formatted guide ready to copy and paste directly onto your blog. It uses the 70% to 90% thresholds you requested as the example.&lt;/p&gt;

&lt;p&gt;How to Limit Battery Charging on Ubuntu Linux (Step-by-Step)&lt;/p&gt;

&lt;p&gt;Keeping your laptop plugged into a charger at 100% capacity constantly can degrade the battery over time. By setting charge thresholds, you can command your system to stop charging once it hits a healthy maximum limit (e.g., 90%) and only resume charging when the battery drops below a minimum threshold (e.g., 70%).&lt;br&gt;
Here is how to set this up using TLP, the ultimate Linux power-management tool.&lt;/p&gt;

&lt;p&gt;Step 1: Install TLP&lt;/p&gt;

&lt;p&gt;Open your terminal (Ctrl + Alt + T) and run the following command to update your package list and install the core TLP service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; tlp

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

&lt;/div&gt;



&lt;p&gt;Step 2: Configure Your Charge Limits&lt;/p&gt;

&lt;p&gt;Next, you need to edit TLP's main configuration file to set your custom thresholds. Open it using the terminal's text editor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/tlp.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use your arrow keys to scroll down, or press Ctrl + W to search for THRESH.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Locate the following lines, remove the # symbol from the beginning of each line to uncomment them, and set your desired values:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;START_CHARGE_THRESH_BAT0&lt;/span&gt;=&lt;span class="m"&gt;70&lt;/span&gt;
&lt;span class="n"&gt;STOP_CHARGE_THRESH_BAT0&lt;/span&gt;=&lt;span class="m"&gt;90&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use code with caution.&lt;br&gt;
(Note: BAT0 is the default battery name for most laptops. If you have a dual-battery laptop like a Lenovo ThinkPad, repeat this step for START_CHARGE_THRESH_BAT1 and STOP_CHARGE_THRESH_BAT1).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save and exit the file by pressing Ctrl + S and then Ctrl + X.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 3: Start and Enable the TLP Service&lt;/p&gt;

&lt;p&gt;To activate the new limits and make sure they apply every time your laptop boots up, run these three commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;tlp start
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;tlp.service
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start tlp.service
Use code with caution.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4: Verify Your Configuration&lt;/p&gt;

&lt;p&gt;To ensure everything was configured correctly and to verify that your laptop hardware supports software-level thresholds, run the battery status command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;tlp-stat &lt;span class="nt"&gt;-b&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use code with caution.&lt;/p&gt;

&lt;p&gt;Look at the end of the output. It should show your new limits active:&lt;br&gt;
• Charging start threshold: 70%&lt;br&gt;
• Charging stop threshold: 90%&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8zhf2yljjw3rqabeg835.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8zhf2yljjw3rqabeg835.png" alt=" " width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚠️ Important Hardware Limitation&lt;/p&gt;

&lt;p&gt;Battery thresholds rely heavily on your laptop's physical charging controller and Linux kernel support.&lt;/p&gt;

&lt;p&gt;• This feature works flawlessly out-of-the-box on most Lenovo ThinkPads, ASUS, and Dell laptops.&lt;/p&gt;

&lt;p&gt;• If sudo tlp-stat -b displays a message stating that charging thresholds are not supported or unsupported, your specific laptop manufacturer may require a dedicated BIOS configuration instead of software intervention.&lt;/p&gt;

&lt;p&gt;Check my other post on &lt;a href="https://dev.to/abdulsalamamtech/check-your-linux-pc-battery-capacity-n76"&gt;How to check your Linux PC battery capacity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow for more content like this!&lt;/p&gt;

</description>
      <category>hardware</category>
      <category>linux</category>
      <category>tutorial</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>How to check your Linux PC battery capacity</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Thu, 15 Oct 2026 10:32:58 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/check-your-linux-pc-battery-capacity-n76</link>
      <guid>https://dev.to/abdulsalamamtech/check-your-linux-pc-battery-capacity-n76</guid>
      <description>&lt;p&gt;Check your Linux PC battery capacity&lt;/p&gt;

&lt;p&gt;With just one command in your terminal or command line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo tlp-stat -b&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F694d2seiloz0o21lfe98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F694d2seiloz0o21lfe98.png" alt=" " width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check my other post on &lt;a href="https://dev.to/abdulsalamamtech/how-to-limit-battery-charging-on-ubuntu-linux-step-by-step-526p"&gt;How to Limit Battery Charging on Ubuntu Linux (Step-by-Step)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow for more content like this!&lt;/p&gt;

&lt;p&gt;More tip coming soon!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why you need to learn digital skills</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Sat, 03 Oct 2026 14:58:04 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/why-you-need-to-learn-digital-skills-2f1f</link>
      <guid>https://dev.to/abdulsalamamtech/why-you-need-to-learn-digital-skills-2f1f</guid>
      <description>&lt;h2&gt;
  
  
  Why You Need to Learn Digital Skills Today
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The world has changed. From banking and shopping to how we work, everything has gone digital. Staying relevant in today's world requires a new set of tools. Learning digital skills is no longer just an advantage; it is a necessity for survival and growth.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Digital Skills?
&lt;/h2&gt;

&lt;p&gt;Digital skills are the abilities required to use digital devices, communication applications, and networks to access, manage, and create information. They range from basic tasks like sending an email or using Microsoft Office, to advanced skills like building websites, analyzing data, or managing social media.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why You Should Learn Them
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Job Market Has Shifted: Over 80% of all professional jobs now require some level of digital literacy.&lt;/li&gt;
&lt;li&gt;Future-Proofing: Traditional jobs are evolving. Knowing tech ensures you will not be left behind as AI and automation grow.&lt;/li&gt;
&lt;li&gt;Work Freedom: Digital skills unlock the ability to work remotely from anywhere in the world.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to Learn &amp;amp; Their Direct Benefits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Digital Marketing: Helps you grow businesses or build your own brand online.&lt;/li&gt;
&lt;li&gt;Data Analysis: Allows you to turn raw numbers into smart business decisions.&lt;/li&gt;
&lt;li&gt;Web &amp;amp; App Development: Gives you the power to build websites, tools, and software.&lt;/li&gt;
&lt;li&gt;Graphic Design &amp;amp; Content Creation: Enables you to visually communicate ideas and capture attention.&lt;/li&gt;
&lt;li&gt;Cybersecurity: Teaches you how to protect valuable data and networks from online threats.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How &amp;amp; Where You Can Learn
&lt;/h2&gt;

&lt;p&gt;You do not need an expensive college degree to get started. You can learn at your own pace through online video courses, interactive bootcamps, and hands-on practice projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Top Free Platforms to Start Today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Coursera &amp;amp; edX: Offers free access to audit real classes from universities like Harvard and Google (pay only if you want the certificate).&lt;/li&gt;
&lt;li&gt;YouTube: The largest free library for step-by-step software and coding tutorials.&lt;/li&gt;
&lt;li&gt;freeCodeCamp: A completely free, hands-on platform to learn coding and web development.&lt;/li&gt;
&lt;li&gt;HubSpot Academy: Great for free inbound marketing, sales, and customer service certificates.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Your phone and laptop are more than just entertainment devices—they are your ticket to financial freedom. Spend just 30 minutes a day learning a new digital skill, and watch your career opportunities multiply.&lt;/p&gt;

</description>
      <category>digitalskills</category>
      <category>tech</category>
      <category>skills</category>
      <category>abdulsalamamtech</category>
    </item>
    <item>
      <title>How to deploy Next.js app to Hostinger shared hosting and alsoadd a github workflow (ci/cd)</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Tue, 19 May 2026 21:28:29 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/how-to-deploy-nextjs-app-to-hostinger-shared-hosting-and-alsoadd-a-github-workflow-cicd-4d4p</link>
      <guid>https://dev.to/abdulsalamamtech/how-to-deploy-nextjs-app-to-hostinger-shared-hosting-and-alsoadd-a-github-workflow-cicd-4d4p</guid>
      <description>&lt;p&gt;How to deploy Next.js app to Hostinger shared hosting and alsoadd a github workflow (ci/cd)&lt;/p&gt;

&lt;p&gt;You can bypass Hostinger's limitations entirely by building your application on GitHub Actions and automatically deploying the static files via FTP/SFTP. This means you do not need Node.js installed on your Hostinger account, and your local machine does not need to handle the build.&lt;/p&gt;

&lt;p&gt;You can bypass Hostinger's limitations entirely by building your application on GitHub Actions and automatically deploying the static files via FTP/SFTP. This means you do not need Node.js installed on your Hostinger account, and your local machine does not need to handle the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  📋 Prerequisites Before Setting Up
&lt;/h2&gt;

&lt;p&gt;You must first change your Next.js project to static export mode so GitHub can build it into flat HTML/CSS/JS files.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your next.config.mjs (or next.config.js) and add the export configuration:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="cm"&gt;/** @type {import('next').NextConfig} */&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;export&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="na"&gt;unoptimized&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Required for static export&lt;/span&gt;
     &lt;span class="p"&gt;},&lt;/span&gt;
   &lt;span class="p"&gt;};&lt;/span&gt;
   &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commit and push this change to your repository.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Step 1: Get FTP Credentials &amp;amp; Add to GitHub
&lt;/h2&gt;

&lt;p&gt;GitHub needs permission to upload files to your Hostinger server.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log into your Hostinger hPanel.&lt;/li&gt;
&lt;li&gt;Navigate to Websites &amp;gt; Manage &amp;gt; Files &amp;gt; FTP Accounts.&lt;/li&gt;
&lt;li&gt;Note your FTP Host, FTP Username, and FTP Password.&lt;/li&gt;
&lt;li&gt;Go to your repository on GitHub.&lt;/li&gt;
&lt;li&gt;Click Settings &amp;gt; Secrets and variables &amp;gt; Actions &amp;gt; New repository secret.&lt;/li&gt;
&lt;li&gt;Create the following three secrets:

&lt;ul&gt;
&lt;li&gt;FTP_SERVER (Your Hostinger FTP Host)&lt;/li&gt;
&lt;li&gt;FTP_USERNAME (Your Hostinger FTP Username)&lt;/li&gt;
&lt;li&gt;FTP_PASSWORD (Your Hostinger FTP Password)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚀 Step 2: Create the GitHub Actions Workflow
&lt;/h2&gt;

&lt;p&gt;This workflow will trigger every time you push to your main branch. It spins up a temporary virtual environment, installs Node.js, builds your Next.js app, and uploads the out folder to Hostinger.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the root of your local project, create a folder structure named .github/workflows/.&lt;/li&gt;
&lt;li&gt;Inside that folder, create a file named deploy.yml.&lt;/li&gt;
&lt;li&gt;Paste the following configuration into deploy.yml:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy Next.js to Hostinger&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt; &lt;span class="c1"&gt;# Change this to 'master' if your default branch is named master&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build-and-deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout Repository&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Setup Node.js&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v4&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-level&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;
          &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;npm'&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Dependencies&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Build Next.js Static Site&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm run build&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy via FTP to Hostinger&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SamKirkland/FTP-Deploy-Action@v4.3.5&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;server&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.FTP_SERVER }}&lt;/span&gt;
          &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.FTP_USERNAME }}&lt;/span&gt;
          &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.FTP_PASSWORD }}&lt;/span&gt;
          &lt;span class="na"&gt;local-dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./out/&lt;/span&gt;
          &lt;span class="na"&gt;server-dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./public_html/&lt;/span&gt; 
          &lt;span class="c1"&gt;# Use ./public_html/subfolder/ if hosting on a subdomain&lt;/span&gt;

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

&lt;/div&gt;






&lt;h2&gt;
  
  
  🛠️ Step 3: Trigger Your First Deployment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Save the deploy.yml file.&lt;/li&gt;
&lt;li&gt;Commit and push the new workflow to GitHub:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git add .github/workflows/deploy.yml next.config.mjs
   git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add GitHub Actions CI/CD deployment workflow"&lt;/span&gt;
   git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to the Actions tab on your GitHub repository page to watch the live build progress. Once it finishes green, your site will be updated live on Hostinger.&lt;/p&gt;

&lt;p&gt;If you hit any errors during the automated GitHub build or face issues with asset loading, let me know the error message or if you are hosting this on a subdomain so we can tweak the routing configuration.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>githubactions</category>
      <category>nextjs</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>step by step crud operation in motoko - how to store and retrieve data</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Sat, 09 May 2026 15:15:43 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/step-by-step-crud-operation-in-motoko-how-to-store-and-retrieve-data-34fp</link>
      <guid>https://dev.to/abdulsalamamtech/step-by-step-crud-operation-in-motoko-how-to-store-and-retrieve-data-34fp</guid>
      <description>&lt;p&gt;To store 1 question and 4 options in Motoko efficiently, you should define a structured Record type to hold the data, rather than a raw Buffer. If you need to store multiple of these questions in a resizable container, you would use a Buffer to hold those records.&lt;/p&gt;

&lt;p&gt;Here is the recommended implementation using an Actor to manage the question storage.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define the TypesUse a stable Record type to ensure the data persists across upgrades.
&lt;/li&gt;
&lt;/ol&gt;

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

type Option = Text;
type Question = {
    questionText : Text;
    options : [Option]; // Array of 4 options
    correctOptionIndex : Nat; // Index 0-3
};

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Implementation Using BufferThis actor initializes with a Buffer to store multiple Question records.
&lt;/li&gt;
&lt;/ol&gt;

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

import Buffer "mo:base/Buffer";
import Array "mo:base/Array";

actor QuestionManager {

    // Define the type for the question
    public type Question = {
        questionText : Text;
        options : [Text]; // Expected size 4
        correctOptionIndex : Nat; // 0, 1, 2, or 3
    };

    // Buffer is a resizable array
    let questionsBuffer = Buffer.Buffer&amp;lt;Question&amp;gt;(10);

    // Function to add a question
    public func addQuestion(q : Question) : async () {
        // Simple validation: Ensure 4 options
        if (q.options.size() == 4) {
            questionsBuffer.add(q);
        };
    };

    // Function to get all questions
    public query func getQuestions() : async [Question] {
        // Convert buffer to immutable array for returning
        return questionsBuffer.toArray();
    };

    // Function to get total question count
    public query func getCount() : async Nat {
        return questionsBuffer.size(); //
    };
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Motoko Concepts&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Used[Records]: { questionText : Text; ... } defines a structured object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[Buffer]: Buffer.Buffer(10) creates a mutable, resizable container, ideal for managing lists of data on the heap.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[Array]: [Text] is a fixed-size array, perfect for the 4 options, ensuring they are immutable and easily shared.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ToArray: questionsBuffer.toArray() converts the mutable buffer into a shared, immutable array format required for canister return values.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Run and test&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Starts the replica, running in the background&lt;/span&gt;
dfx start &lt;span class="nt"&gt;--background&lt;/span&gt;

&lt;span class="c"&gt;# Deploys your canisters to the replica and generates your candid interface. It basically deploys the fullstack application&lt;/span&gt;

dfx deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Read more...&lt;/strong&gt;&lt;br&gt;
&lt;a href="//motoko-book.dev/base-library/data-structures/buffer.html"&gt;Motoko Book&lt;/a&gt;&lt;br&gt;
&lt;a href="https://mops.one/buffer" rel="noopener noreferrer"&gt;Mops Docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>motoko</category>
      <category>icp</category>
      <category>crud</category>
      <category>abdulsalamamtech</category>
    </item>
    <item>
      <title>best architectural patterns approach for senior Laravel developers</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Mon, 04 May 2026 14:28:31 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/best-architectural-patterns-approach-for-senior-laravel-developers-8m4</link>
      <guid>https://dev.to/abdulsalamamtech/best-architectural-patterns-approach-for-senior-laravel-developers-8m4</guid>
      <description>&lt;p&gt;For senior Laravel developers, the best architecture focuses on modularity, testability, and separation of concerns, moving beyond basic MVC to Domain-Driven Design (DDD) or Action-based Architectures. &lt;/p&gt;

&lt;p&gt;Key patterns include using Repositories to abstract Eloquent, Services/Actions for complex business logic, and DTOs (Data Transfer Objects) for data integrity.&lt;/p&gt;

&lt;p&gt;Key Architectural Patterns for Senior Laravel Developers:Domain-Driven Design (DDD) / Modular Monolith: Structures code around business domains (Users, Orders) rather than technical layers (Controllers, Models), improving maintainability in large applications.&lt;/p&gt;

&lt;p&gt;Action/Service Pattern: Encapsulates business logic into single-purpose classes (e.g., CreateOrderAction), reducing Controller bloat and promoting reusability.&lt;/p&gt;

&lt;p&gt;Repository Pattern: Abstracts data access logic from the model. This allows swapping database implementations or caching layers without affecting business logic.&lt;/p&gt;

&lt;p&gt;Data Transfer Objects (DTOs): Used to pass structured data between application layers, ensuring type safety and reducing reliance on associative arrays.&lt;/p&gt;

&lt;p&gt;Event-Driven Architecture (Observer Pattern): Uses Laravel Events and Listeners to decouple side effects (e.g., sending emails, updating search indexes) from the main application flow.&lt;/p&gt;

&lt;p&gt;Strategy Pattern: Ideal for handling varying behaviors, such as multiple payment gateways (Stripe vs. PayPal), by selecting algorithms at runtime.&lt;/p&gt;

&lt;p&gt;Best Practices for Senior Implementation:Dependency Inversion Principle: Depend on abstractions (Interfaces) rather than concrete Eloquent models in service classes.&lt;/p&gt;

&lt;p&gt;Leverage Laravel Service Providers: Register bindings for repositories and services in the Service Container to manage dependencies cleanly.&lt;/p&gt;

&lt;p&gt;Avoid Over-Engineering: Start with solid Service/Action classes and adopt stricter DDD patterns as complexity grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Domain-Driven Design (DDD) / Modular Monolith in Laravel
&lt;/h2&gt;

&lt;p&gt;Domain-Driven Design (DDD) and Modular Monoliths in Laravel shift focus from technical layers (Controllers, Models) to business capabilities. This approach is ideal for complex enterprise systems like CRMs or financial platforms where intricate business rules can easily overwhelm standard MVC structures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Architectural Layers
&lt;/h2&gt;

&lt;p&gt;A common way to implement DDD in &lt;a href="https://laravel.com/" rel="noopener noreferrer"&gt;Laravel&lt;/a&gt; is to organize the app/ directory into three primary layers: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain Layer: The heart of the application containing pure business logic.&lt;/li&gt;
&lt;li&gt;Entities: Objects with a distinct, stable identity (e.g., a User or Order).

&lt;ul&gt;
&lt;li&gt;Value Objects: Immutable objects defined by their attributes (e.g., EmailAddress, MoneyAmount).&lt;/li&gt;
&lt;li&gt;Aggregates: Clusters of related objects treated as a single unit, managed by an "Aggregate Root" to ensure consistency.&lt;/li&gt;
&lt;li&gt;Domain Events: Indicators that something significant happened in the business (e.g., OrderPlaced).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Application Layer: Orchestrates domain objects to perform specific tasks (Use Cases). It often uses DTOs (Data Transfer Objects) to move data without exposing internal models.&lt;/li&gt;
&lt;li&gt;Infrastructure Layer: Handles technical implementation details like database persistence (Eloquent), external APIs, and mail services. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Implementing a Modular Monolith
&lt;/h2&gt;

&lt;p&gt;While DDD focuses on the "what," a Modular Monolith defines the "where." It keeps everything in one codebase but enforces strict boundaries between different business areas.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Structure: Modules are often housed in a top-level src/Modules/ or app/Modules/ directory. Each module contains its own routes, controllers, models, and tests.&lt;/li&gt;
&lt;li&gt;Encapsulation: Modules should only interact through defined interfaces or events to avoid "spaghetti" coupling.&lt;/li&gt;
&lt;li&gt;Communication: Inter-module communication is best handled via &lt;a href="https://laravel.com/docs/13.x/events" rel="noopener noreferrer"&gt;Laravel Events&lt;/a&gt; and Listeners. For example, the Orders module emits an event that the Inventory module listens to for stock updates.&lt;/li&gt;
&lt;li&gt;Tooling: Packages like &lt;a href="https://github.com/nWidart/laravel-modules" rel="noopener noreferrer"&gt;nwidart/laravel-modules&lt;/a&gt; or &lt;a href="https://github.com/InterNACHI/modular" rel="noopener noreferrer"&gt;InterNACHI/Modular&lt;/a&gt; are popular for scaffolding this structure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Choose This Path?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Long-term Maintainability: Clear boundaries prevent a "god-class controller graveyard" where business rules are scattered everywhere.&lt;/li&gt;
&lt;li&gt;Scalability: If a specific module grows too large or requires unique resources, it can be extracted into a separate microservice more easily because it is already isolated.&lt;/li&gt;
&lt;li&gt;Business Alignment: Developers and stakeholders use a "Ubiquitous Language," ensuring the code structure directly reflects real-world business processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consideration for Senior Devs: DDD has a steep learning curve and introduces significant boilerplate. For simple CRUD applications, Laravel's default MVC is usually more efficient.&lt;br&gt;
Would you like to see a folder structure example or a code snippet for a Laravel Domain Action?&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://medium.com/@harryespant/implementing-domain-driven-architecture-in-laravel-setup-advantages-and-practical-use-cases-5eac6dfeffaa" rel="noopener noreferrer"&gt;https://medium.com&lt;/a&gt;&lt;br&gt;
[2] &lt;a href="https://medium.com/@harryespant/implementing-domain-driven-architecture-in-laravel-setup-advantages-and-practical-use-cases-5eac6dfeffaa" rel="noopener noreferrer"&gt;https://medium.com&lt;/a&gt;&lt;br&gt;
[3] &lt;a href="https://ilyaskazi.medium.com/domain-driven-design-ddd-in-laravel-a-practical-guide-with-real-world-examples-7ef4b7f75896" rel="noopener noreferrer"&gt;https://ilyaskazi.medium.com&lt;/a&gt;&lt;br&gt;
[4] &lt;a href="https://www.youtube.com/watch?v=92uaRrY_1qw&amp;amp;t=23" rel="noopener noreferrer"&gt;https://www.youtube.com&lt;/a&gt;&lt;br&gt;
[5] &lt;a href="https://www.youtube.com/watch?v=29W8bvtii_g&amp;amp;t=17" rel="noopener noreferrer"&gt;https://www.youtube.com&lt;/a&gt;&lt;br&gt;
[6] &lt;a href="https://spartner.software/kennisbank/domain-driven-design-ddd" rel="noopener noreferrer"&gt;https://spartner.software&lt;/a&gt;&lt;br&gt;
[7] &lt;a href="https://laracasts.com/discuss/channels/general-discussion/need-guidance-on-choosing-the-right-architecture-for-a-laravel-application" rel="noopener noreferrer"&gt;https://laracasts.com&lt;/a&gt;&lt;br&gt;
[8] &lt;a href="https://dev.to/oskhar/domain-driven-laravel-build-great-systems-that-are-scalable-and-powerful-4458"&gt;https://dev.to&lt;/a&gt;&lt;br&gt;
[9] &lt;a href="https://medium.com/@harryespant/exploring-modular-monolithic-architecture-a-laravel-developers-guide-with-an-e-commerce-example-0548668ec222" rel="noopener noreferrer"&gt;https://medium.com&lt;/a&gt;&lt;br&gt;
[10] &lt;a href="https://www.youtube.com/watch?v=Sjw3IXUcfPQ" rel="noopener noreferrer"&gt;https://www.youtube.com&lt;/a&gt;&lt;br&gt;
[11] &lt;a href="https://medium.com/@harryespant/implementing-domain-driven-architecture-in-laravel-setup-advantages-and-practical-use-cases-5eac6dfeffaa" rel="noopener noreferrer"&gt;https://medium.com&lt;/a&gt;&lt;br&gt;
[12] &lt;a href="https://sevalla.com/blog/building-modular-systems-laravel/" rel="noopener noreferrer"&gt;https://sevalla.com&lt;/a&gt;&lt;br&gt;
[13] &lt;a href="https://www.iflair.com/laravel-modular-monolith-the-powerful-architecture-you-need/" rel="noopener noreferrer"&gt;https://www.iflair.com&lt;/a&gt;&lt;br&gt;
[14] &lt;a href="https://filamentphp.com/docs/5.x/advanced/modular-architecture" rel="noopener noreferrer"&gt;https://filamentphp.com&lt;/a&gt;&lt;br&gt;
[15] &lt;a href="https://ilyaskazi.medium.com/domain-driven-design-ddd-in-laravel-a-practical-guide-with-real-world-examples-7ef4b7f75896" rel="noopener noreferrer"&gt;https://ilyaskazi.medium.com&lt;/a&gt;&lt;br&gt;
[16] &lt;a href="https://www.youtube.com/watch?v=83mskSQnkWI&amp;amp;t=2" rel="noopener noreferrer"&gt;https://www.youtube.com&lt;/a&gt;&lt;br&gt;
[17] &lt;a href="https://dev.to/xwero/laravel-modular-folder-structure-4a94"&gt;https://dev.to&lt;/a&gt;&lt;br&gt;
[18] &lt;a href="https://medium.com/@ogitog/understanding-domain-driven-design-with-laravel-and-php-9fab206ff2fb" rel="noopener noreferrer"&gt;https://medium.com&lt;/a&gt;&lt;br&gt;
[19] &lt;a href="https://www.port.io/glossary/domain-driven-design" rel="noopener noreferrer"&gt;https://www.port.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn more about Laravel Architecture &amp;amp; Design Patterns:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://medium.com/@paulofelipemartins/laravel-best-practices-solid-clean-architecture-design-patterns-c0fab56fe40c" rel="noopener noreferrer"&gt;Laravel Best Practices: SOLID, Clean Architecture &amp;amp; Design Patterns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@harryespant/implementing-domain-driven-architecture-in-laravel-setup-advantages-and-practical-use-cases-5eac6dfeffaa" rel="noopener noreferrer"&gt;Implementing Domain-Driven Architecture in Laravel: Setup, Advantages, and Practical Use Cases&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to scale a Laravel PHP app like Facebook or Twitter (X)</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Sat, 02 May 2026 13:29:15 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/how-to-scale-a-laravel-php-app-like-facebook-or-twitter-x-2d88</link>
      <guid>https://dev.to/abdulsalamamtech/how-to-scale-a-laravel-php-app-like-facebook-or-twitter-x-2d88</guid>
      <description>&lt;p&gt;Scaling a Laravel application to handle high traffic like Facebook or Twitter requires a shift from a single-server setup to a horizontally scaled, stateless architecture. Key strategies include using Load Balancers (AWS/DigitalOcean), Redis for caching/sessions, database read/write splitting, queueing heavy tasks, and implementing Laravel Octane for performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Scaling Strategies:
&lt;/h2&gt;

&lt;p&gt;Horizontal Scaling (Load Balancing): Distribute traffic across multiple application servers using a load balancer. Ensure the application is stateless (e.g., storing sessions in Redis/database rather than locally).&lt;/p&gt;

&lt;h3&gt;
  
  
  Database Optimization:
&lt;/h3&gt;

&lt;p&gt;Read/Write Splitting: Use a primary database for writes and multiple replicas for reads.&lt;/p&gt;

&lt;p&gt;You must have actual database replication (Master-Slave) set up at the server level (e.g., via AWS RDS&amp;nbsp;, DigitalOcean, or manual MySQL configuration). Laravel does not perform the data synchronization itself; it only directs the traffic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="s1"&gt;'mysql'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s1"&gt;'driver'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'mysql'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'read'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s1"&gt;'host'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="s1"&gt;'192.168.1.1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Replica 1&lt;/span&gt;
            &lt;span class="s1"&gt;'192.168.1.2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Replica 2&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s1"&gt;'write'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s1"&gt;'host'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="s1"&gt;'192.168.1.3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Primary&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s1"&gt;'sticky'&lt;/span&gt;    &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Essential for data consistency&lt;/span&gt;
    &lt;span class="s1"&gt;'driver'&lt;/span&gt;    &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'mysql'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'database'&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DB_DATABASE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'forge'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="s1"&gt;'username'&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DB_USERNAME'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'forge'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="s1"&gt;'password'&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DB_PASSWORD'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="c1"&gt;// ... other options&lt;/span&gt;
&lt;span class="p"&gt;],&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://laravel.com/docs/13.x/database#read-and-write-connections" rel="noopener noreferrer"&gt;Laravel read and write docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=3CCwxLS8cB8" rel="noopener noreferrer"&gt;How to scale Laravel: beyond the basics (Advanced Laravel Scaling)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://webmobtech.com/blog/how-to-build-high-performance-scalable-laravel-app-best-practices" rel="noopener noreferrer"&gt;How to Build a High-Performance, Scalable Laravel App&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Considerations&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Sticky Connections: Setting 'sticky' =&amp;gt; true ensures that once a write operation occurs during a request, all subsequent read operations for that same request use the write connection. This prevents issues where a user saves data but cannot immediately see it due to replication lag on the read replicas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Load Balancing: Laravel will automatically choose a random host from the read array for each request, effectively load balancing your database traffic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replication Setup: Laravel manages the application-level routing of queries, but you must independently configure your database servers (like MySQL&amp;nbsp; or PostgreSQL) for Master-Slave replication so that data from the primary node is synced to the replicas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model Specificity: If you need a specific Eloquent model to always use a particular connection (other than the default), you can define the $connection property directly in the model class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transaction Handling: Database transactions in Laravel automatically use the write connection to ensure atomicity and consistency.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Indexing &amp;amp; Query Optimization: Add indexes for common queries, avoid table scans, and use eager loading (e.g., with()) to prevent N+1 query issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching Strategy:
&lt;/h3&gt;

&lt;p&gt;Redis: Use Redis for caching, session management, and queue management to reduce database load.&lt;/p&gt;

&lt;p&gt;Cache Data: Cache expensive queries, API responses, and frequently accessed data.&lt;/p&gt;

&lt;p&gt;Laravel Caching: Use &lt;code&gt;php artisan config:cache&lt;/code&gt; and &lt;code&gt;php artisan route:cache&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Queues and Asynchronous Processing:
&lt;/h3&gt;

&lt;p&gt;Offload slow tasks (e.g., sending emails, processing images) to queues using Redis or Amazon SQS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Content and Asset Management:
&lt;/h3&gt;

&lt;p&gt;CDN: Use a Content Delivery Network (e.g., Cloudflare, CloudFront) to serve images, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;Cloud Storage: Use Amazon S3 or similar services for storing user-uploaded media instead of local storage.&lt;/p&gt;

&lt;h3&gt;
  
  
  High Performance Engine:
&lt;/h3&gt;

&lt;p&gt;Laravel Octane: Utilize Octane with Swoole or RoadRunner to keep the application in memory, significantly increasing request throughput.&lt;/p&gt;

&lt;h3&gt;
  
  
  Infrastructure Requirements:
&lt;/h3&gt;

&lt;p&gt;Stateless Apps: Ensure FILESYSTEM_DRIVER is set to s3 or similar.Database Scaling: For massive scale, look beyond master-slave replication into partitioning or adopting NoSQL for specific use cases.&lt;/p&gt;

&lt;p&gt;Monitoring: Implement tools like Laravel Telescope or third-party solutions to monitor performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secure Your API with Modern Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laravel Sanctum: Perfect for SPAs, mobile apps, and token-based authentication.&lt;/li&gt;
&lt;li&gt;Laravel Passport: A full OAuth2 server implementation for more complex needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Smart API Versioning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;URL Versioning: /api/v1/users&lt;/li&gt;
&lt;li&gt;Header Versioning: Using a custom Accept header.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Multi-Layered Testing Strategy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unit Tests: Verify small, isolated pieces of code.&lt;/li&gt;
&lt;li&gt;Feature Tests: Test a complete feature from end to end.&lt;/li&gt;
&lt;li&gt;Browser Tests: Use Laravel Dusk to automate user interactions in a real browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Modern Deployment and Monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Error Tracking: Use services like Sentry or Bugsnag.&lt;/li&gt;
&lt;li&gt;Performance Monitoring: Tools like New Relic or Datadog provide deep insights.&lt;/li&gt;
&lt;li&gt;Logging: Centralized logging helps you debug issues quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building a high-performance, scalable Laravel application is a continuous journey. It begins with a solid architectural foundation. Then, it requires constant optimization, robust API design, and automated quality assurance. These are not just best practices; they are essential for success. &lt;a href="https://webmobtech.com/blog/how-to-build-high-performance-scalable-laravel-app-best-practices/" rel="noopener noreferrer"&gt;Read more from WebMob&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Resolving GitHub conflict: merge, rebase and fast-forward only</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Wed, 19 Nov 2025 14:02:47 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/resolving-github-conflict-merge-rebase-and-fast-forward-only-50fj</link>
      <guid>https://dev.to/abdulsalamamtech/resolving-github-conflict-merge-rebase-and-fast-forward-only-50fj</guid>
      <description>&lt;p&gt;Difference between:&lt;/p&gt;

&lt;p&gt;hint: git config pull.rebase false # merge&lt;br&gt;
hint: git config pull.rebase true # rebase&lt;br&gt;
hint: git config pull.ff only #&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fklkjdvzcjmy9bx0k03q8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fklkjdvzcjmy9bx0k03q8.png" alt=" " width="800" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll explain the three git pull strategies and help you choose the best one for your situation:&lt;/p&gt;

&lt;p&gt;Updated todo list&lt;/p&gt;

&lt;p&gt;Three Git Pull Strategies Explained&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;pull.rebase false (Merge Strategy) 🔀&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;git&amp;nbsp;config&amp;nbsp;pull.rebase&amp;nbsp;false&lt;br&gt;
What it does:&lt;/p&gt;

&lt;p&gt;Creates a merge commit when pulling changes&lt;br&gt;
Combines your local commits with remote commits&lt;br&gt;
Preserves full history of both branches&lt;br&gt;
Visual:&lt;/p&gt;

&lt;p&gt;Before&amp;nbsp;pull:&amp;nbsp;&amp;nbsp;Local:&amp;nbsp;&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;&amp;nbsp;Remote:&amp;nbsp;A&amp;nbsp;—&amp;nbsp;X&amp;nbsp;—&amp;nbsp;YAfter&amp;nbsp;pull:&amp;nbsp;&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;—&amp;nbsp;M&amp;nbsp;(merge&amp;nbsp;commit)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;\&amp;nbsp;&amp;nbsp;&amp;nbsp;/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;X&amp;nbsp;—&amp;nbsp;Y&lt;br&gt;
Pros:&lt;br&gt;
✅ Full history preserved&lt;br&gt;
✅ Easy to see when integrations happened&lt;br&gt;
✅ Safe for collaborative work&lt;/p&gt;

&lt;p&gt;Cons:&lt;br&gt;
❌ Messy commit graph with many merge commits&lt;br&gt;
❌ Harder to read git log&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;pull.rebase true (Rebase Strategy) 📚&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;git&amp;nbsp;config&amp;nbsp;pull.rebase&amp;nbsp;true&lt;br&gt;
What it does:&lt;/p&gt;

&lt;p&gt;Replays your local commits on top of remote changes&lt;br&gt;
Creates a linear history (no merge commits)&lt;br&gt;
Rewrites commit history&lt;br&gt;
Visual:&lt;/p&gt;

&lt;p&gt;Before&amp;nbsp;pull:&amp;nbsp;&amp;nbsp;Local:&amp;nbsp;&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;&amp;nbsp;Remote:&amp;nbsp;A&amp;nbsp;—&amp;nbsp;X&amp;nbsp;—&amp;nbsp;YAfter&amp;nbsp;pull:&amp;nbsp;&amp;nbsp;A&amp;nbsp;—&amp;nbsp;X&amp;nbsp;—&amp;nbsp;Y&amp;nbsp;—&amp;nbsp;B'&amp;nbsp;—&amp;nbsp;C'&lt;br&gt;
Pros:&lt;br&gt;
✅ Clean, linear history&lt;br&gt;
✅ Easier to read and understand flow&lt;br&gt;
✅ No merge commit clutter&lt;/p&gt;

&lt;p&gt;Cons:&lt;br&gt;
❌ Rewrites history (changes commit hashes)&lt;br&gt;
❌ Can cause issues if commits are already pushed&lt;br&gt;
⚠️ Slightly risky if you don't understand rebase&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;pull.ff only (Fast-Forward Only) ⚡&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;git&amp;nbsp;config&amp;nbsp;pull.ff&amp;nbsp;only&lt;br&gt;
What it does:&lt;/p&gt;

&lt;p&gt;Only allows fast-forward merges (linear history without new commits)&lt;br&gt;
Rejects any pull that would require a merge or rebase&lt;br&gt;
Forces you to manually resolve conflicts&lt;br&gt;
Visual:&lt;/p&gt;

&lt;p&gt;✅&amp;nbsp;ALLOWED&amp;nbsp;(fast-forward):&amp;nbsp;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Local:&amp;nbsp;&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;&amp;nbsp;&lt;br&gt;
Remote:&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;—&amp;nbsp;X&amp;nbsp;—&amp;nbsp;Y&amp;nbsp;&amp;nbsp;&lt;br&gt;
Result:&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;—&amp;nbsp;X&amp;nbsp;—&amp;nbsp;Y❌&amp;nbsp;&lt;/p&gt;

&lt;p&gt;REJECTED&amp;nbsp;(non-fast-forward):&amp;nbsp;&amp;nbsp;&lt;br&gt;
Local:&amp;nbsp;&amp;nbsp;A&amp;nbsp;—&amp;nbsp;B&amp;nbsp;—&amp;nbsp;C&amp;nbsp;&amp;nbsp;&lt;br&gt;
Remote:&amp;nbsp;A&amp;nbsp;—&amp;nbsp;X&amp;nbsp;—&amp;nbsp;Y&amp;nbsp;&amp;nbsp;→&amp;nbsp;Pull&amp;nbsp;fails!&amp;nbsp;You&amp;nbsp;must&amp;nbsp;rebase&amp;nbsp;or&amp;nbsp;merge&amp;nbsp;manually&lt;/p&gt;

&lt;p&gt;Pros:&lt;br&gt;
✅ Guarantees clean, linear history&lt;br&gt;
✅ Forces intentional conflict resolution&lt;br&gt;
✅ No accidental messy merges&lt;/p&gt;

&lt;p&gt;Cons:&lt;br&gt;
❌ Very strict; many pulls will fail&lt;br&gt;
❌ Requires extra manual steps&lt;br&gt;
❌ Not ideal for team collaboration&lt;/p&gt;

&lt;p&gt;📊 Comparison Table&lt;br&gt;
Feature merge   rebase  ff only&lt;br&gt;
History shape   Non-linear (branchy)    Linear  Linear&lt;br&gt;
Merge commits&lt;br&gt;&lt;br&gt;
✅ Created &lt;br&gt;
❌ None&lt;br&gt;&lt;br&gt;
❌ None&lt;/p&gt;

&lt;p&gt;Rewrites commits&lt;br&gt;&lt;br&gt;
❌ No&lt;br&gt;&lt;br&gt;
✅ Yes Depends&lt;/p&gt;

&lt;p&gt;Easy to read git log&lt;br&gt;&lt;br&gt;
❌ No&lt;br&gt;&lt;br&gt;
✅ Yes &lt;br&gt;
✅ Yes&lt;/p&gt;

&lt;p&gt;Safe for shared branches&lt;br&gt;&lt;br&gt;
✅ Yes &lt;br&gt;
❌ No&lt;br&gt;&lt;br&gt;
✅ Yes&lt;/p&gt;

&lt;p&gt;Risk of conflicts   Low Medium  High&lt;br&gt;
Best for teams&lt;br&gt;&lt;br&gt;
✅ Yes &lt;br&gt;
❌ Not really&lt;br&gt;&lt;br&gt;
✅ Sometimes&lt;/p&gt;

&lt;p&gt;🎯 Recommendation for Your Situation&lt;br&gt;
For resolving your current merge conflict in api-docs.json:&lt;/p&gt;

&lt;p&gt;Use pull.rebase false (Merge) ← RECOMMENDED&lt;/p&gt;

&lt;p&gt;git&amp;nbsp;config&amp;nbsp;pull.rebase&amp;nbsp;false&lt;br&gt;
Why?&lt;/p&gt;

&lt;p&gt;✅ You're working in a team repo (hngprojects/HNG-Portal-BE)&lt;br&gt;
✅ Your commits are likely already shared/pushed&lt;br&gt;
✅ Safe - doesn't rewrite history&lt;br&gt;
✅ Preserves the full narrative of changes&lt;br&gt;
✅ Standard practice for collaborative projects&lt;/p&gt;

&lt;p&gt;Your next steps:&lt;/p&gt;

&lt;p&gt;1.&amp;nbsp;Resolve&amp;nbsp;the&amp;nbsp;conflict&amp;nbsp;manually&amp;nbsp;in&amp;nbsp;api-docs.json (You&amp;nbsp;need&amp;nbsp;to&amp;nbsp;combine&amp;nbsp;the&amp;nbsp;auth&amp;nbsp;endpoints&amp;nbsp;+&amp;nbsp;job-types&amp;nbsp;endpoints)&lt;/p&gt;

&lt;p&gt;2.&amp;nbsp;Stage&amp;nbsp;the&amp;nbsp;resolved&amp;nbsp;filegit&amp;nbsp;add&amp;nbsp;storage/api-docs/api-docs.json&lt;/p&gt;

&lt;p&gt;3.&amp;nbsp;Complete&amp;nbsp;the&amp;nbsp;mergegit&amp;nbsp;commit&amp;nbsp;-m&amp;nbsp;"Merge:&amp;nbsp;resolve&amp;nbsp;conflicts&amp;nbsp;in&amp;nbsp;api-docs.json&amp;nbsp;-&amp;nbsp;combine&amp;nbsp;auth&amp;nbsp;and&amp;nbsp;job-types&amp;nbsp;endpoints"#&amp;nbsp;4.&amp;nbsp;Push&amp;nbsp;to&amp;nbsp;remotegit&amp;nbsp;push&amp;nbsp;origin&amp;nbsp;feature/add-job-types&lt;/p&gt;

&lt;p&gt;Would you like me to:&lt;/p&gt;

&lt;p&gt;✅ Help you resolve the conflicts in the file manually?&lt;br&gt;
📝 Generate a merged version of api-docs.json with both sets of endpoints?&lt;br&gt;
🔍 Review what content exists in each branch first?&lt;br&gt;
Let me know which you prefer!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://share.google/aimode/Tg8IfStKYvxoySTxN" rel="noopener noreferrer"&gt;Learn more about git rebase&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>softwaredevelopment</category>
      <category>development</category>
      <category>abdulsalamamtech</category>
    </item>
    <item>
      <title>Building a medical emergency AI agent boot using A2A protocol for HNG backend stage.</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Mon, 03 Nov 2025 23:32:30 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/building-a-medical-emergency-ai-agent-boot-using-a2a-protocol-for-hng-backend-stage-2l99</link>
      <guid>https://dev.to/abdulsalamamtech/building-a-medical-emergency-ai-agent-boot-using-a2a-protocol-for-hng-backend-stage-2l99</guid>
      <description>&lt;p&gt;Building a medical emergency AI agent boot using A2A protocol for HNG backend stage.&lt;/p&gt;

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

&lt;p&gt;Building Emergent AI and AI Agent that answers medical emergency related questions and give tips on what to do based on described emergency.&lt;/p&gt;

&lt;p&gt;It is a difficult thing to exactly know what to do in different emergency situation, the data is already out their is just to have the exact information of what to do on different situation before help arise can save lives and property.&lt;/p&gt;

&lt;p&gt;I wanted to be able to have an AI agent that can easily guide someone through this situation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech stack:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PHP/Laravel&lt;br&gt;
Laragent library&lt;br&gt;
Railway&lt;/p&gt;

&lt;p&gt;In short Emergent is a chat bot that answers #medical #emergency related questions &amp;amp; help with tips!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System design:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;User Message &lt;span class="o"&gt;(&lt;/span&gt;Telex&lt;span class="o"&gt;)&lt;/span&gt;
    ↓
JSON-RPC 2.0 Request
    ↓
Railway App Service &lt;span class="o"&gt;(&lt;/span&gt;NGINX Server&lt;span class="o"&gt;)&lt;/span&gt;
    ↓
Laravel Framework &amp;amp; API
    ↓
Gemini AI Agent
    ↓
Format &amp;amp; Return
    ↓
A2A Response
    ↓
Telex.im Display
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;💻 Building the Agent:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I set up Laravel&lt;br&gt;
Install Laragent&lt;br&gt;
Register my API KEY on Gemini&lt;br&gt;
Add the API_KEY to my .env file&lt;br&gt;
I test the agent ability&lt;br&gt;
I Implement the A2A Protocol&lt;br&gt;
I test it again&lt;br&gt;
I push to GitHub and deployed to Railway&lt;br&gt;
Result&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The challenges:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  I wasn't able to understand how a2a works.
&lt;em&gt;I go through the documentation and articles multiple times.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;  I wast not getting the right message.
&lt;em&gt;I went on to test and debug the codebase again.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;  Other AI model I used wasn't working.
&lt;em&gt;I tried multiple LLM before finally using Gemini.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;  Formatting the response and error.
&lt;em&gt;I created different methods to format the responses for error and success.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;  I have production error while deploying to Railway.
&lt;em&gt;I changed the PHP version from 8.2 to 8.3.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;  I wasn't able to integrate it with telex.
&lt;em&gt;An article and step by step guide was later sent to the slack group that is want I used to be able to setup my Agent.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Response agent api time &amp;lt;500ms&lt;br&gt;
Total response time ~2-3s&lt;br&gt;
Uptime 99.9%&lt;br&gt;
Success rate 99%&lt;/p&gt;

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

&lt;p&gt;Building Emergent AI Agent allow people to be able to seek emergency tips before help arrive and I was able to work on something extra-ordinary using AI and combining it with a technology new to me Telex A2A protocol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/abdulsalamamtech/hng-stage-3" rel="noopener noreferrer"&gt;https://github.com/abdulsalamamtech/hng-stage-3&lt;/a&gt;&lt;br&gt;
X (Twitter): &lt;a href="https://x.com/abdulsalamtech" rel="noopener noreferrer"&gt;https://x.com/abdulsalamtech&lt;/a&gt;&lt;br&gt;
Linkedin: &lt;a href="https://linkedin.com/in/abdulsalamamtech" rel="noopener noreferrer"&gt;https://linkedin.com/in/abdulsalamamtech&lt;/a&gt;&lt;br&gt;
Facebook: &lt;a href="https://facebook.com/abdulsalamamtech" rel="noopener noreferrer"&gt;https://facebook.com/abdulsalamamtech&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>showdev</category>
      <category>ai</category>
      <category>laravel</category>
    </item>
    <item>
      <title>Different type of action to take on delete in Laravel database migration</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Wed, 29 Oct 2025 11:01:36 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/different-type-of-action-to-take-on-delete-in-laravel-database-migration-348o</link>
      <guid>https://dev.to/abdulsalamamtech/different-type-of-action-to-take-on-delete-in-laravel-database-migration-348o</guid>
      <description>&lt;p&gt;Different type of action to take on delete in Laravel database migration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9geqn1xhb8wa28vn1ew.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9geqn1xhb8wa28vn1ew.png" alt=" " width="224" height="98"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When defining a foreign key in a Laravel migration, the &lt;strong&gt;onDelete&lt;/strong&gt; method determines what happens to the child records when the parent record is deleted. This allows you to manage data integrity at the database level. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are the different types of onDelete actions you can use:&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  cascade
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;CASCADE&lt;/strong&gt; action will automatically delete all child records when their parent record is deleted. This is useful for "has many" relationships &lt;em&gt;where the child records are meaningless&lt;/em&gt; without the parent. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example: If a user is deleted, all of their posts are also deleted. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Migration code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreignId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;constrained&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;cascadeOnDelete&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Migration code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;references&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;onDelete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'cascade'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  set null
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;SET NULL&lt;/strong&gt; action will set the foreign key on all child records to null when the parent record is deleted. This is useful for optional relationships &lt;em&gt;where the child record can still exist without the parent&lt;/em&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example: When a user is deleted, the user_id on their posts is set to null, allowing the posts to remain without an author.
&lt;strong&gt;Note:&lt;/strong&gt; Requirement: The foreign key column must be set as nullable() in the migration. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Migration code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreignId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;nullable&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;constrained&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;nullOnDelete&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Migration code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;unsignedBigInteger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;nullable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;references&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;onDelete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'set null'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  restrict
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;RESTRICT&lt;/strong&gt; action &lt;em&gt;prevents the parent record from being deleted as long as there are still child records referencing it&lt;/em&gt;. This is the default behavior if no onDelete action is specified. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example: If a category has associated products, you cannot delete the category until all products have been re-assigned or deleted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Migration code: No onDelete method is called.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreignId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'category_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;constrained&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;# OR&lt;/span&gt;

&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'category_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;references&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'categories'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;onDelete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'restrict'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  no action
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;NO ACTION&lt;/strong&gt; action is similar to RESTRICT. It defers the integrity check until the end of the transaction, but in practice, most database engines implement it the same way as RESTRICT. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Migration code: You can explicitly add this, though RESTRICT or no action is sufficient.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;foreign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;references&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;onDelete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'no action'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Choosing the right onDelete action&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Delete all child records&lt;/td&gt;
&lt;td&gt;cascade&lt;/td&gt;
&lt;td&gt;Deleting a user should also delete all of their comments.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keep child records and unset the foreign key&lt;/td&gt;
&lt;td&gt;set null&lt;/td&gt;
&lt;td&gt;Deleting an author should keep their articles, with the author field becoming blank.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prevent deletion until child records are removed&lt;/td&gt;
&lt;td&gt;restrict&lt;/td&gt;
&lt;td&gt;You cannot delete a product category if products are still assigned to it.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is also similar to on update.&lt;/p&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>ondelete</category>
      <category>abdulsalamamtech</category>
    </item>
    <item>
      <title>Deloy Next or React App to VPS</title>
      <dc:creator>Abdulsalam Abdulrahman (Amtech Digital)</dc:creator>
      <pubDate>Sat, 22 Mar 2025 20:55:28 +0000</pubDate>
      <link>https://dev.to/abdulsalamamtech/deloy-next-or-react-app-to-vps-2ald</link>
      <guid>https://dev.to/abdulsalamamtech/deloy-next-or-react-app-to-vps-2ald</guid>
      <description>&lt;p&gt;&lt;strong&gt;Step by Step how to deploy next or react application to vps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A. &lt;strong&gt;Login to your VPS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ssh user@hostname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;B. &lt;strong&gt;Generate SSH public key and add it to your GitHub project&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat ~/.ssh/id_rsa.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;C. &lt;strong&gt;Clone the project to your VPS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;D. &lt;strong&gt;Install all necessary packages&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
npm run build
npm install pm2 --save-dev
npx pm2 start npm --name my-project -- start -- --port=3001
npx pm2 restart my-project
npx pm2 save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Sometime this work's for vite application&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx pm2 start npm --name app-name -- run dev -- --port=3001
npx pm2 save
npx pm2 status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Use this on CD like GitHub action&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx pm2 restart app-name
npx pm2 save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;E. &lt;strong&gt;Visit the application on the provided port&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://hostname:3001

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Congratulations Your Website is live!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Note: There are some necessary adjustments you need to make based on the type of OS and application on the VPS.&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/abdulsalamamtech"&gt;@abdulsalamamtech&lt;/a&gt; #vps #deploy #next #react&lt;/p&gt;

</description>
      <category>abdulsalamamtech</category>
      <category>vps</category>
      <category>nextjs</category>
      <category>react</category>
    </item>
  </channel>
</rss>
