<?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>Forem: Parshuram Singh</title>
    <description>The latest articles on Forem by Parshuram Singh (@parshuram_singh).</description>
    <link>https://forem.com/parshuram_singh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3367366%2Fccfabc83-e00b-45a5-8668-8662bd700c7d.webp</url>
      <title>Forem: Parshuram Singh</title>
      <link>https://forem.com/parshuram_singh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/parshuram_singh"/>
    <language>en</language>
    <item>
      <title>From Code to Cloud: How Docker, CI/CD, and Deployment Platforms Work (Step by Step)</title>
      <dc:creator>Parshuram Singh</dc:creator>
      <pubDate>Mon, 08 Sep 2025 07:11:57 +0000</pubDate>
      <link>https://forem.com/parshuram_singh/from-code-to-cloud-how-docker-cicd-and-deployment-platforms-work-step-by-step-5gc1</link>
      <guid>https://forem.com/parshuram_singh/from-code-to-cloud-how-docker-cicd-and-deployment-platforms-work-step-by-step-5gc1</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Ever wondered how the code you write on your laptop becomes a live website that anyone in the world can access?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Behind the scenes, several tools and platforms work together:&lt;/li&gt;
&lt;li&gt;GitHub to manage and share your code&lt;/li&gt;
&lt;li&gt;Platforms like Vercel for quick hosting&lt;/li&gt;
&lt;li&gt;Docker containers for portability&lt;/li&gt;
&lt;li&gt;CI/CD pipelines for automation&lt;/li&gt;
&lt;li&gt;Cloud servers for scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this blog, we’ll break the process step by step using a simple React web app as an example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Local Development
&lt;/h2&gt;

&lt;p&gt;Every project starts on your computer.&lt;/p&gt;

&lt;p&gt;Example: a React app that displays your projects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app my-app
cd my-app
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see the app running locally at &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;br&gt;
.&lt;br&gt;
At this point, only you can see it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2: Pushing Code to GitHub
&lt;/h2&gt;

&lt;p&gt;Before deploying, you push your project to GitHub.&lt;/p&gt;

&lt;p&gt;Why? Because GitHub acts as your project’s source of truth:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores your raw code (React files, configs, Dockerfile, CI/CD workflows).&lt;/li&gt;
&lt;li&gt;Tracks every change (commits, branches, pull requests).&lt;/li&gt;
&lt;li&gt;Enables collaboration with teammates.&lt;/li&gt;
&lt;li&gt;Serves as the trigger point for CI/CD pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Think of GitHub as the workshop where your blueprints (code) live.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Deploying with Platforms like Vercel
&lt;/h2&gt;

&lt;p&gt;Platforms such as Vercel make deployment simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect your GitHub repo to Vercel.&lt;/li&gt;
&lt;li&gt;Every time you push code, Vercel:&lt;/li&gt;
&lt;li&gt;Pulls your latest code from GitHub&lt;/li&gt;
&lt;li&gt;Runs &lt;code&gt;npm run build&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Hosts the app on a public URL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✨ Key points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vercel = serverless hosting → no need to manage servers.&lt;/li&gt;
&lt;li&gt;Handles HTTPS, CDN, caching, and scaling for you.&lt;/li&gt;
&lt;li&gt;Great for static sites or simple web apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Benefit: beginner-friendly and fast&lt;br&gt;
❌ Limitation: less control over runtime and environment&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 4: Introducing Docker
&lt;/h2&gt;

&lt;p&gt;What if you want more control or want your app to run anywhere (cloud, on-premise, or another laptop)?&lt;/p&gt;

&lt;p&gt;That’s where Docker helps.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker Image = your app + OS + runtime + dependencies → all packaged together.&lt;/li&gt;
&lt;li&gt;Docker Container = a running instance of that image.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example Dockerfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Step 1: Build stage
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# Step 2: Serve with Nginx
FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build &amp;amp; run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t my-app:v1 .
docker run -p 8080:80 my-app:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your app runs inside Docker, independent of your machine setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Docker Hub (Image Repository)
&lt;/h2&gt;

&lt;p&gt;To share images, we use Docker Hub (like GitHub but for containers).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker tag my-app:v1 yourusername/my-app:v1
docker push yourusername/my-app:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Others can pull &amp;amp; run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull yourusername/my-app:v1
docker run -p 8080:80 yourusername/my-app:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Benefit: your app is now portable.&lt;/p&gt;

&lt;p&gt;👉 Notice the difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub = raw source code, where changes are tracked.&lt;/li&gt;
&lt;li&gt;Docker Hub = built images, ready to run anywhere.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are essential parts of the workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Cloud Deployment
&lt;/h2&gt;

&lt;p&gt;Instead of running containers locally, deploy them to cloud services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Cloud Run&lt;/li&gt;
&lt;li&gt;AWS ECS / Fargate&lt;/li&gt;
&lt;li&gt;Azure App Service for Containers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cloud pulls the image from Docker Hub.&lt;/li&gt;
&lt;li&gt;Runs it inside a container.&lt;/li&gt;
&lt;li&gt;App becomes publicly accessible.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 7: Continuous Integration &amp;amp; Deployment (CI/CD)
&lt;/h2&gt;

&lt;p&gt;Up until now, you’ve learned how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build Docker images locally&lt;/li&gt;
&lt;li&gt;Push them to Docker Hub&lt;/li&gt;
&lt;li&gt;Deploy them on the cloud&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That works fine for small projects, but imagine doing it manually every time you make a change.&lt;/p&gt;

&lt;p&gt;🔴 The Manual Process (Repetitive &amp;amp; Error-Prone)&lt;/p&gt;

&lt;p&gt;Let’s say you change one line of code in your React component. To update your app online, you’d need to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Build a new Docker image
docker build -t my-app:v2 .

# Tag the image correctly
docker tag my-app:v2 yourusername/my-app:v2

# Push it to Docker Hub
docker push yourusername/my-app:v2

# SSH into cloud &amp;amp; pull image
docker pull yourusername/my-app:v2

# Stop old container, run new one
docker stop my-app
docker run -d -p 8080:80 --name my-app yourusername/my-app:v2

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

&lt;/div&gt;



&lt;p&gt;Now imagine doing this every single time you fix a bug, add a feature, or update content.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s repetitive.&lt;/li&gt;
&lt;li&gt;It’s easy to forget a step.&lt;/li&gt;
&lt;li&gt;Versioning can get messy (v2, v3, final-v3, final-final-v4 😅).&lt;/li&gt;
&lt;li&gt;On a team, multiple developers could overwrite or conflict with each other’s deployments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clearly, this doesn’t scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🟢 The Automated Process with CI/CD&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where CI/CD (Continuous Integration / Continuous Deployment) saves the day.&lt;/p&gt;

&lt;p&gt;Here’s how it works:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You push your code to GitHub.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This acts as the trigger.&lt;/li&gt;
&lt;li&gt;No need to run manual Docker commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CI (Continuous Integration) kicks in.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A GitHub Actions workflow (or Jenkins, GitLab CI, CircleCI, etc.) automatically:&lt;/li&gt;
&lt;li&gt;Checks out the latest code.&lt;/li&gt;
&lt;li&gt;Installs dependencies.&lt;/li&gt;
&lt;li&gt;Runs tests (optional but recommended).&lt;/li&gt;
&lt;li&gt;Builds a new Docker image with the latest code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The image is pushed to Docker Hub automatically.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The pipeline logs in with your Docker Hub credentials (stored securely as secrets).&lt;/li&gt;
&lt;li&gt;Tags the image with latest (or a commit hash / version number).&lt;/li&gt;
&lt;li&gt;Pushes it to Docker Hub without you lifting a finger.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CD (Continuous Deployment) takes over.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Depending on your setup, the pipeline can also:&lt;/li&gt;
&lt;li&gt;Trigger your cloud provider (Google Cloud Run, AWS ECS, Kubernetes, etc.).&lt;/li&gt;
&lt;li&gt;Pull the new image.&lt;/li&gt;
&lt;li&gt;Redeploy the container automatically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;End Result: Within minutes of pushing code, your app is updated online.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ Why This Matters&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consistency → Same steps run every time, no “works on my machine” issues.&lt;/li&gt;
&lt;li&gt;Speed → Deployments take minutes, not hours.&lt;/li&gt;
&lt;li&gt;Team-Friendly → Multiple developers can push code, pipeline handles merges and deployments.&lt;/li&gt;
&lt;li&gt;Error Reduction → No forgotten commands, no wrong tags.&lt;/li&gt;
&lt;li&gt;Scalability → Works the same whether you deploy once a week or 20 times a day.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: GitHub Actions CI/CD&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Docker Build &amp;amp; Deploy

on:
  push:
    branches: [ main ]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Build Docker image
        run: docker build -t yourusername/my-app:${{ github.sha }} .

      - name: Login to Docker Hub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Push Docker image
        run: docker push yourusername/my-app:${{ github.sha }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🔑 Notice:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The image is tagged with the commit SHA (${{ github.sha }}) so every build is uniquely tied to a version of the code.&lt;/p&gt;

&lt;p&gt;No manual tagging, no mistakes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 Bottom line:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Without CI/CD → You’re a human deployment robot, repeating commands.&lt;/li&gt;
&lt;li&gt;With CI/CD → Deployments are automatic, reliable, and scalable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is exactly how real-world companies ship code dozens or even hundreds of times per day without breaking things.&lt;/p&gt;

&lt;h2&gt;
  
  
  End-to-End Summary
&lt;/h2&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%2F0y0qctoog9k2gzoom6zp.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%2F0y0qctoog9k2gzoom6zp.png" alt="End-to-End Summary of Code to Cloud workflow showing steps from local development to CI/CD deployment" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub → the workshop where code lives, collaboration happens, and pipelines are triggered.&lt;/li&gt;
&lt;li&gt;Vercel → quick, beginner-friendly deployments.&lt;/li&gt;
&lt;li&gt;Docker → makes apps portable and production-ready.&lt;/li&gt;
&lt;li&gt;Docker Hub → stores built images for sharing and deployment.&lt;/li&gt;
&lt;li&gt;Cloud → runs containers at scale.&lt;/li&gt;
&lt;li&gt;CI/CD → automates builds, tests, image pushes, and deployments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, these tools form the modern deployment pipeline that real companies use daily.&lt;/p&gt;

&lt;p&gt;With this setup, any project, portfolio, blog, or web app can be:&lt;/p&gt;

&lt;p&gt;✅ Built locally&lt;br&gt;
✅ Tracked in GitHub&lt;br&gt;
✅ Dockerized&lt;br&gt;
✅ Hosted anywhere&lt;br&gt;
✅ Updated automatically with CI/CD &lt;/p&gt;




&lt;p&gt;📌 &lt;em&gt;Thanks for reading!&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;If you found this guide helpful, let’s stay connected:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📝 Follow me on &lt;a href="https://dev.to/parshuram_singh"&gt;Dev.to&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💼 Connect on &lt;a href="https://www.linkedin.com/in/parshuram-singh/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🖥️ Peek into my work on &lt;a href="https://github.com/parshuramsingh" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 Explore my &lt;a href="https://my-portfolio-eta-nine-d8gvqtsq67.vercel.app/" rel="noopener noreferrer"&gt;Portfolio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🚀 Let’s code, learn, and build together!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>cicd</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AI Meets Blockchain: The Ultimate Guide to the Future of Trust, Automation &amp; Intelligence</title>
      <dc:creator>Parshuram Singh</dc:creator>
      <pubDate>Mon, 11 Aug 2025 03:36:45 +0000</pubDate>
      <link>https://forem.com/parshuram_singh/ai-meets-blockchain-the-ultimate-guide-to-the-future-of-trust-automation-intelligence-49e5</link>
      <guid>https://forem.com/parshuram_singh/ai-meets-blockchain-the-ultimate-guide-to-the-future-of-trust-automation-intelligence-49e5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“AI without trust is dangerous. Blockchain without intelligence is static. Together, they’re unstoppable.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We’ve all heard the hype around &lt;strong&gt;Artificial Intelligence&lt;/strong&gt; and &lt;strong&gt;Blockchain&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
But here’s the truth: &lt;strong&gt;Most people talk about them separately. Few truly understand the power of combining them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hi, I’m &lt;strong&gt;Parshuram Singh&lt;/strong&gt; — Full Stack &amp;amp; Blockchain Developer, diving deep into the exciting overlap between &lt;strong&gt;Hyperledger Fabric, Web3&lt;/strong&gt;, and &lt;strong&gt;AI-powered applications&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Over the past months, I’ve been experimenting with &lt;strong&gt;how AI can make blockchain smarter&lt;/strong&gt; and &lt;strong&gt;how blockchain can make AI safer&lt;/strong&gt; and what I’ve discovered has blown my mind.&lt;/p&gt;

&lt;p&gt;This isn’t just about buzzwords.&lt;br&gt;&lt;br&gt;
It’s about building a &lt;strong&gt;future where AI makes blockchain smarter&lt;/strong&gt; and &lt;strong&gt;blockchain makes AI safer, fairer, and more transparent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Whether you’re a &lt;strong&gt;student, developer, startup founder, or industry leader&lt;/strong&gt;, this guide will take you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;From &lt;strong&gt;zero to hero&lt;/strong&gt; on AI + Blockchain basics
&lt;/li&gt;
&lt;li&gt;Into &lt;strong&gt;real-world use cases&lt;/strong&gt; no one talks about
&lt;/li&gt;
&lt;li&gt;Through &lt;strong&gt;deep insights&lt;/strong&gt; into where this tech is heading
&lt;/li&gt;
&lt;li&gt;With &lt;strong&gt;actionable steps&lt;/strong&gt; so you can be part of it&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Part 1: Let’s Start Simple — AI &amp;amp; Blockchain in Plain English
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is AI?
&lt;/h3&gt;

&lt;p&gt;Artificial Intelligence (AI) is software that learns from data and makes decisions or predictions — from ChatGPT writing code to Google Maps predicting traffic.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Blockchain?
&lt;/h3&gt;

&lt;p&gt;Blockchain is a tamper-proof digital ledger where data is stored in blocks and linked in a chain. It’s decentralized, meaning no single company owns it.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Why Combine AI + Blockchain?
&lt;/h2&gt;

&lt;p&gt;Individually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI is &lt;strong&gt;powerful but opaque&lt;/strong&gt; — we don’t always know how it decides something.&lt;/li&gt;
&lt;li&gt;Blockchain is &lt;strong&gt;transparent but static&lt;/strong&gt; — it records data but doesn’t analyze it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI adds intelligence&lt;/strong&gt; to blockchain apps (predictive analytics, automation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blockchain adds trust&lt;/strong&gt; to AI (proof that AI outputs are genuine and unbiased).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This combo solves &lt;strong&gt;two major problems&lt;/strong&gt; in tech today:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Making AI more explainable and trustworthy
&lt;/li&gt;
&lt;li&gt;Making blockchain more adaptive and useful&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Part 2: Real-World AI + Blockchain Use Cases (From Now to the Future)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1️⃣ Healthcare Data Security &amp;amp; AI Diagnostics
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Blockchain stores encrypted patient records securely.&lt;/li&gt;
&lt;li&gt;AI analyzes patterns for early disease detection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; Hospitals can share data without risking privacy, and AI diagnoses are verifiable.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;BurstIQ&lt;/em&gt; — blockchain-powered health data exchange with AI insights.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2️⃣ Decentralized AI Marketplaces
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Blockchain enables marketplaces where anyone can share/sell AI models.&lt;/li&gt;
&lt;li&gt;Smart contracts ensure fair payment and usage rights.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; No single corporation controls AI — democratizing access.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Ocean Protocol&lt;/em&gt; — tokenized data and AI marketplace.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3️⃣ AI-Enhanced Smart Contracts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Smart contracts are automated agreements on blockchain.&lt;/li&gt;
&lt;li&gt;AI makes them adaptive — adjusting terms based on real-world data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; Supply chain contracts can adjust prices dynamically based on demand, weather, or risks.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4️⃣ Fighting Deepfakes &amp;amp; AI Misuse
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Blockchain stores a verifiable origin of images, videos, and AI-generated content.&lt;/li&gt;
&lt;li&gt;AI scans for manipulation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; Journalism, elections, and art remain authentic.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Truepic&lt;/em&gt; — blockchain-based media verification.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5️⃣ Supply Chain + Predictive AI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Blockchain ensures each product’s journey is recorded (authenticity).&lt;/li&gt;
&lt;li&gt;AI predicts shortages, delays, or fraud before they happen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it matters:&lt;/strong&gt; From farmers to retailers, everyone gains efficiency.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Part 3: The “Insider” Layer — Crucial Details Few Talk About
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔒 Blockchain Solves AI’s Black Box Problem
&lt;/h3&gt;

&lt;p&gt;AI often can’t explain its decisions (the “black box” issue). By storing AI training data, model versions, and decision logs on blockchain, &lt;strong&gt;every AI decision becomes traceable&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  💰 Tokenized AI Economies
&lt;/h3&gt;

&lt;p&gt;Imagine owning a fraction of an AI model and earning tokens whenever it’s used. Blockchain makes it possible through fractional ownership smart contracts.&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚠️ Challenges (Yes, There Are Some)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; AI needs fast computation; blockchain is slower for consensus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; Not all AI training data can be made public.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Energy:&lt;/strong&gt; Combining compute-heavy AI with blockchain must be energy-efficient.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Part 4: How YOU Can Get Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎓 If You’re a Student:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Learn &lt;strong&gt;Python for AI&lt;/strong&gt; + &lt;strong&gt;Solidity/Hyperledger for blockchain&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Build small projects (e.g., AI chatbot on blockchain).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💼 If You’re a Professional Developer:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Explore AI inference in decentralized apps (dApps).&lt;/li&gt;
&lt;li&gt;Integrate AI APIs into Web3 platforms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🏢 If You’re a Business Owner:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Identify processes needing both &lt;strong&gt;trust&lt;/strong&gt; and &lt;strong&gt;intelligence&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Start with pilot projects — e.g., AI-powered supply chain tracking.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Part 5: The Future of AI + Blockchain
&lt;/h2&gt;

&lt;p&gt;We’re heading towards:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI DAOs (Decentralized Autonomous Organizations)&lt;/strong&gt; — fully AI-run organizations with blockchain governance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-owning AI agents&lt;/strong&gt; — AI systems that own wallets and can transact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global Trust Layers&lt;/strong&gt; — AI decisions recorded immutably for cross-border trust.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Your Turn
&lt;/h2&gt;

&lt;p&gt;What excites you most about &lt;strong&gt;AI + Blockchain&lt;/strong&gt;?&lt;br&gt;&lt;br&gt;
Which industry do you think will adopt it first?&lt;/p&gt;

&lt;p&gt;Drop your thoughts below — let’s spark a discussion! 🔥&lt;/p&gt;




&lt;h2&gt;
  
  
  🙌 Connect with Me
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;a href="https://my-portfolio-eta-nine-d8gvqtsq67.vercel.app/" rel="noopener noreferrer"&gt;My Portfolio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐙 &lt;a href="https://github.com/parshuramsingh" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💼 &lt;a href="https://www.linkedin.com/in/parshuram-singh/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;✍️ &lt;a href="https://dev.to/parshuram_singh"&gt;My Dev.to Blog&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this post helped you &lt;strong&gt;see the bigger picture&lt;/strong&gt;, hit ❤️ and share it so more people understand the future we’re building.&lt;br&gt;
I’d love to connect with others working on Blockchain + AI. Drop your thoughts — what use case excites you the most?&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Thought:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The future isn’t AI &lt;strong&gt;or&lt;/strong&gt; Blockchain.&lt;br&gt;&lt;br&gt;
It’s &lt;strong&gt;AI + Blockchain&lt;/strong&gt; and it’s closer than you think.&lt;br&gt;
&lt;strong&gt;This fusion isn’t about man vs. machine — it’s about man + machine.&lt;br&gt;
And as developers, we have a front-row seat (and a ticket to build it)&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>ai</category>
      <category>web3</category>
      <category>future</category>
    </item>
    <item>
      <title>🤖 How AI Is Changing Frontend Development (and Why It Won’t Replace You)</title>
      <dc:creator>Parshuram Singh</dc:creator>
      <pubDate>Sun, 03 Aug 2025 09:36:06 +0000</pubDate>
      <link>https://forem.com/parshuram_singh/how-ai-is-changing-frontend-development-and-why-it-wont-replace-you-1bi5</link>
      <guid>https://forem.com/parshuram_singh/how-ai-is-changing-frontend-development-and-why-it-wont-replace-you-1bi5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“AI won’t replace developers—but developers who use AI will replace those who don’t.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s be honest — if you're building websites today, you’ve probably thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Will AI write code better than me someday?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As a frontend developer working with &lt;strong&gt;React, Tailwind CSS, and modern UI/UX workflows&lt;/strong&gt;, I’ve seen AI tools reshape &lt;em&gt;how&lt;/em&gt; we work — but not &lt;em&gt;why&lt;/em&gt; we work.&lt;/p&gt;

&lt;p&gt;In this blog, I’m breaking down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How AI is already integrated into frontend workflows&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why your creativity and decisions still matter more than ever&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to level up by &lt;em&gt;working with&lt;/em&gt; AI, not against it&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s dive in. 👇&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ 1. How AI is Already Changing Frontend Dev
&lt;/h2&gt;

&lt;p&gt;Here’s where AI is making a real impact on frontend development:&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 AI Code Autocomplete (Copilot, Codeium, Cursor)
&lt;/h3&gt;

&lt;p&gt;AI suggests entire functions, React hooks, and even components reducing boilerplate and decision fatigue.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Speeds up dev&lt;br&gt;&lt;br&gt;
❗ Still needs &lt;strong&gt;your logic&lt;/strong&gt; and sanity checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🎨 Design-to-Code (Uizard, Builder.io, Figma AI)
&lt;/h3&gt;

&lt;p&gt;You can now convert wireframes, screenshots, or sketches into Tailwind + React code. It’s scary fast.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Great for prototyping&lt;br&gt;&lt;br&gt;
❗ But lacks finesse — layout bugs, accessibility, and hierarchy still need &lt;em&gt;you&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🧪 Smart Testing &amp;amp; Bug Detection
&lt;/h3&gt;

&lt;p&gt;Some AI tools generate unit tests or catch suspicious behavior automatically (like Vercel AI, Replay.io).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Helps find edge cases early&lt;br&gt;&lt;br&gt;
❗ Still doesn’t understand &lt;em&gt;business context&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🧾 SEO, Copy &amp;amp; Content
&lt;/h3&gt;

&lt;p&gt;AI writes your alt text, meta tags, even page content.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Useful for blogs and marketing&lt;br&gt;&lt;br&gt;
❗ But only &lt;em&gt;you&lt;/em&gt; can bring authentic tone and emotion.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧑‍💻 2. What AI &lt;strong&gt;Can’t&lt;/strong&gt; Replace (Thankfully)
&lt;/h2&gt;

&lt;p&gt;Despite all that power, AI &lt;strong&gt;still can’t do your job&lt;/strong&gt; as a frontend dev. Why?&lt;/p&gt;

&lt;p&gt;Because your value lies in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🤝 &lt;strong&gt;Human-Centered Design Decisions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Contextual Thinking&lt;/strong&gt; (When to use a modal vs. new route?)&lt;/li&gt;
&lt;li&gt;🧩 &lt;strong&gt;Component Architecture&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;User Empathy &amp;amp; Accessibility&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Feedback Loops with Designers &amp;amp; PMs&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;💡 &lt;strong&gt;Creative Problem Solving&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We don’t just build UIs. We build experiences. That’s where AI stops — and where &lt;em&gt;you&lt;/em&gt; shine.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 3. How to Stay Ahead (Not Replaced)
&lt;/h2&gt;

&lt;p&gt;Instead of resisting AI, let it &lt;strong&gt;amplify&lt;/strong&gt; your workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Here’s what I’ve started doing:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🧠 Learning &lt;strong&gt;prompt engineering&lt;/strong&gt; for smarter Copilot/ChatGPT usage
&lt;/li&gt;
&lt;li&gt;⚡ Using AI to convert Figma designs into rough React + Tailwind skeletons
&lt;/li&gt;
&lt;li&gt;📏 Automating alt text, meta tags, and microcopy with review
&lt;/li&gt;
&lt;li&gt;🧪 Asking AI to generate unit test templates (then refining them manually)
&lt;/li&gt;
&lt;li&gt;📚 Staying up-to-date on ethical, privacy, and accessibility concerns with AI tools&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📌 TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AI is here and &lt;strong&gt;already changing&lt;/strong&gt; how we build for the web
&lt;/li&gt;
&lt;li&gt;But it’s &lt;strong&gt;not replacing frontend devs&lt;/strong&gt;—it’s amplifying them
&lt;/li&gt;
&lt;li&gt;Your unique edge = &lt;strong&gt;creativity, UX sense, and human decisions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Devs who &lt;em&gt;embrace&lt;/em&gt; AI will lead the next generation of product-building&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Let’s Chat
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Have you tried any AI tools in your frontend workflow yet?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Are you more &lt;em&gt;excited&lt;/em&gt; or &lt;em&gt;worried&lt;/em&gt; about this new wave?&lt;/p&gt;

&lt;p&gt;Drop your thoughts in the comments 💬 — I read and reply to every one!&lt;/p&gt;




&lt;h2&gt;
  
  
  🙌 Stay Connected!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔗 &lt;a href="https://my-portfolio-eta-nine-d8gvqtsq67.vercel.app/" rel="noopener noreferrer"&gt;My Portfolio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;✍️ &lt;a href="https://dev.to/parshuram_singh"&gt;My Dev.to Profile&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧠 &lt;a href="https://www.linkedin.com/in/parshuram-singh/" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧪 &lt;a href="https://github.com/parshuramsingh" rel="noopener noreferrer"&gt;Explore My GitHub Projects&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this article gave you insight, hit the ❤️ and &lt;strong&gt;share it with your dev friends or team&lt;/strong&gt; — let’s grow together as AI-native frontend builders.&lt;/p&gt;




&lt;p&gt;Thanks for reading. You’ve got this. 💻⚡&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>ai</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>How I Integrated Dev.to Blogs into My Portfolio: From Client-Side CORS to Full GitHub Automation</title>
      <dc:creator>Parshuram Singh</dc:creator>
      <pubDate>Thu, 31 Jul 2025 09:33:08 +0000</pubDate>
      <link>https://forem.com/parshuram_singh/how-i-integrated-devto-blogs-into-my-portfolio-from-client-side-cors-to-full-github-automation-2j4f</link>
      <guid>https://forem.com/parshuram_singh/how-i-integrated-devto-blogs-into-my-portfolio-from-client-side-cors-to-full-github-automation-2j4f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: Learn how I integrated my Dev.to blogs into my React portfolio, tackled CORS errors, fixed API caching bugs, and fully automated the blog fetch using GitHub Actions and Node.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🎯 Goal
&lt;/h2&gt;

&lt;p&gt;I wanted to showcase my &lt;strong&gt;Dev.to blog posts&lt;/strong&gt; on my React-based portfolio, with these goals in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ SEO-friendly (Google should index my blogs)&lt;/li&gt;
&lt;li&gt;✅ Fast loading&lt;/li&gt;
&lt;li&gt;✅ No CORS issues&lt;/li&gt;
&lt;li&gt;✅ Fully automated updates&lt;/li&gt;
&lt;li&gt;✅ Clean fallback if Dev.to is down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What started as a simple fetch turned into a deep integration journey — here's how I did it 👇&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Phase 1: The Naive Client-Side Fetch
&lt;/h2&gt;

&lt;p&gt;At first, I simply fetched my blog posts from Dev.to using their public API like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;js
useEffect(() =&amp;gt; {
  fetch('https://dev.to/api/articles?username=parshuram_singh')
    .then(res =&amp;gt; res.json())
    .then(data =&amp;gt; setBlogs(data));
}, []);

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Problems
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CORS errors in some browsers (like Brave)&lt;/li&gt;
&lt;li&gt;No SEO: Blogs were loaded after page render&lt;/li&gt;
&lt;li&gt;Unreliable: If Dev.to was down, my blog section broke&lt;/li&gt;
&lt;li&gt;Caching issue: The API returned different blog counts when logged in vs incognito&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 2: Vercel Serverless Function
&lt;/h2&gt;

&lt;p&gt;Next, I moved the logic to a serverless function on Vercel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// /api/getBlogs.js
export default async (req, res) =&amp;gt; {
  const response = await fetch(DEVTO_API_URL);
  const data = await response.json();
  res.status(200).json(data);
};

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pros
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Solved CORS issues&lt;/li&gt;
&lt;li&gt;Centralized logic&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cons
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Still a runtime fetch&lt;/li&gt;
&lt;li&gt;Still not SEO indexable&lt;/li&gt;
&lt;li&gt;Added function cold start time&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 3: Static File with Node Script
&lt;/h2&gt;

&lt;p&gt;To make things fast, SEO-friendly, and bulletproof, I wrote a Node script to fetch blog data and save it as a static file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// fetch-devto-blogs.js
const fs = require('fs'); // Import the 'fs' module
const fetch = require('node-fetch'); // Assuming node-fetch is installed for Node.js environments

async function fetchBlogs() {
  const response = await fetch('[https://dev.to/api/articles?username=parshuram_singh](https://dev.to/api/articles?username=parshuram_singh)');
  const blogs = await response.json();
  fs.writeFileSync('./public/blogs.json', JSON.stringify(blogs, null, 2));
}

fetchBlogs();

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

&lt;/div&gt;



&lt;p&gt;Now, my React app loads from blogs.json during build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const blogs = await fetch('/blogs.json').then(res =&amp;gt; res.json());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Massive Wins:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Static = super fast&lt;/li&gt;
&lt;li&gt;SEO-optimized&lt;/li&gt;
&lt;li&gt;No CORS&lt;/li&gt;
&lt;li&gt;Resilient (even if Dev.to is down)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 4: API Caching Mystery
&lt;/h2&gt;

&lt;p&gt;I hit a weird bug:&lt;br&gt;
In some browsers, the URL with per_page=100 returned only 1 blog!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Returned 1 blog in Brave (incognito)
curl "[https://dev.to/api/articles?username=parshuram_singh&amp;amp;per_page=100](https://dev.to/api/articles?username=parshuram_singh&amp;amp;per_page=100)"

# Returned 2 blogs in Chrome (logged in)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turns out, Dev.to's API caches responses differently based on login state — yikes!&lt;/p&gt;

&lt;p&gt;Fix: Remove per_page=100&lt;br&gt;
Just drop the param, and Dev.to gives a correct full list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const DEVTO_API_URL = '[https://dev.to/api/articles?username=parshuram_singh](https://dev.to/api/articles?username=parshuram_singh)';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Phase 5: GitHub Actions Automation
&lt;/h2&gt;

&lt;p&gt;To keep the blog feed updated, I automated the Node script using GitHub Actions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Fetch Dev.to Blogs

on:
  push:
    branches: [main]
  workflow_dispatch: # Allows manual trigger

jobs:
  fetch:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '20'
      - run: npm install node-fetch # Install node-fetch for the script
      - run: node fetch-devto-blogs.js
      - run: |
          git config --global user.name "GitHub Actions"
          git config --global user.email "actions@github.com"
          git add public/blogs.json
          git commit -m "Update blogs.json" || echo "No changes" # Commit only if changes exist
          git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Result:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;On every push, blogs are auto-fetched&lt;/li&gt;
&lt;li&gt;No manual update needed&lt;/li&gt;
&lt;li&gt;Blazing fast blog section&lt;/li&gt;
&lt;li&gt;Fully SEO-optimized&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Setup Recap
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Source&lt;/td&gt;
&lt;td&gt;Dev.to API (username=...)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fetching&lt;/td&gt;
&lt;td&gt;Node.js Script&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hosting&lt;/td&gt;
&lt;td&gt;Vercel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;&lt;code&gt;public/blogs.json&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automation&lt;/td&gt;
&lt;td&gt;GitHub Actions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CORS Issues&lt;/td&gt;
&lt;td&gt;Solved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SEO Support&lt;/td&gt;
&lt;td&gt;Static data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API Bug (Dev.to)&lt;/td&gt;
&lt;td&gt;Avoided &lt;code&gt;per_page=100&lt;/code&gt; param&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Avoid runtime fetch for public data use static where possible&lt;/li&gt;
&lt;li&gt;Always test public APIs in multiple browsers (incognito too!)&lt;/li&gt;
&lt;li&gt;GitHub Actions are great for automating content workflows&lt;/li&gt;
&lt;li&gt;Static files are simple, reliable, and perfect for SEO&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This blog chronicles a significant part of my journey in building a robust and efficient online portfolio. The insights gained from tackling CORS, optimizing for SEO, and automating content delivery have been invaluable.&lt;/p&gt;

&lt;p&gt;If you're integrating Dev.to or any API into your site, I hope this real-world account saves you hours of debugging and helps you build a more resilient application.&lt;/p&gt;

&lt;p&gt;Want to see this live? My portfolio is now up and running! Check it out: &lt;br&gt;
&lt;a href="https://my-portfolio-eta-nine-d8gvqtsq67.vercel.app/" rel="noopener noreferrer"&gt;My Portfolio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this helped or you liked the journey feel free to leave a comment below.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

&lt;p&gt;— Parshuram Singh&lt;/p&gt;

</description>
      <category>portfolio</category>
      <category>react</category>
      <category>devto</category>
      <category>githubactions</category>
    </item>
    <item>
      <title>How I Built a Trade Finance App on Hyperledger Fabric – A Complete Blockchain Project Walkthrough</title>
      <dc:creator>Parshuram Singh</dc:creator>
      <pubDate>Sat, 26 Jul 2025 08:02:27 +0000</pubDate>
      <link>https://forem.com/parshuram_singh/how-i-built-a-trade-finance-app-on-hyperledger-fabric-a-complete-blockchain-project-walkthrough-amb</link>
      <guid>https://forem.com/parshuram_singh/how-i-built-a-trade-finance-app-on-hyperledger-fabric-a-complete-blockchain-project-walkthrough-amb</guid>
      <description>&lt;p&gt;Hey Dev.to community!  I’m Parshuram Singh, a Frontend and Blockchain Developer, and I’m excited to walk you through my journey of building a Blockchain-Powered Trade Finance App using Hyperledger Fabric, Node.js, and React. This project automates a seven-step trade finance process creation, approvals, shipping, receipt, and payment leveraging blockchain for transparency and efficiency. Whether you’re new to blockchain or a seasoned dev, this blog will guide you from setup to a working app.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea: Why Blockchain for Trade Finance?
&lt;/h2&gt;

&lt;p&gt;Trade finance involves a complex workflow with applicants, banks, and beneficiaries coordinating shipments and payments. Traditional systems rely on paper-based processes and intermediaries, leading to delays and errors. Blockchain’s immutability and smart contracts offer a decentralized solution, ensuring a tamper-proof ledger accessible only to trusted parties.&lt;/p&gt;

&lt;p&gt;My goal was to create an app where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Applicant initiates a trade request.&lt;/li&gt;
&lt;li&gt;Banks (Issuing and Beneficiary) approve it.&lt;/li&gt;
&lt;li&gt;The Beneficiary ships goods with evidence.&lt;/li&gt;
&lt;li&gt;The Applicant confirms receipt.&lt;/li&gt;
&lt;li&gt;Payments are finalized all tracked on a blockchain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I chose Hyperledger Fabric for its permissioned network, Node.js for the backend, and React for the UI. Let’s build it step-by-step!&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Network Setup
&lt;/h2&gt;

&lt;p&gt;I built a full Hyperledger Fabric network from scratch using a custom script:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Containers:&lt;/strong&gt; Spun up peers, orderers, and certificate authorities (CAs) with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./network.sh up createChannel &lt;span class="nt"&gt;-c&lt;/span&gt; mychannel &lt;span class="nt"&gt;-ca&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Crypto Material:&lt;/strong&gt; Generated MSP and TLS certificates automatically via the script.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configuration Files:&lt;/strong&gt; Crafted a custom &lt;code&gt;connection.json&lt;/code&gt; for the SDK to interact with the network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private Channel:&lt;/strong&gt; Configured a private channel (mychannel) to isolate data access between trusted parties (banks, applicants, beneficiaries).&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Private channels enforce secure, selective data sharing, critical for enterprise use cases.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This setup ran on my Ryzen 5 machine with 16 GB RAM and Ubuntu 22.04, providing a robust foundation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Writing &amp;amp; Deploying Chaincode
&lt;/h2&gt;

&lt;p&gt;The smart contract (&lt;code&gt;TradeFinance.js&lt;/code&gt;), written in JavaScript with the fabric-contract-api, automates the trade finance logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Highlights&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Contract&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fabric-contract-api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TradeFinanceContract&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Contract&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;initLedger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Initializing Ledger: TradeFinanceContract&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;participants&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bank b1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bank&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bank b2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bank&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Applicant app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ben&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Beneficiary ben&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;];&lt;/span&gt;
        &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;participant&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;participants&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;putState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;participant&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;participant&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;createApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;applicationID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;productDetails&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;applicantRules&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;application&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;applicationID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;applicant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;beneficiary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ben&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;issuingBank&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;exportingBank&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;b2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nx"&gt;productDetails&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;applicantRules&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;evidence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;approvingEntities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
            &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PENDING_ISSUING_BANK&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;statusHistory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PENDING_ISSUING_BANK&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTxTimestamp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;putState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;applicationID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;application&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;application&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Additional methods: approveByIssuingBank, approveByBeneficiaryBank, etc.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;TradeFinanceContract&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;Deployment&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;./network.sh deployCC &lt;span class="nt"&gt;-ccn&lt;/span&gt; tradeFinance &lt;span class="nt"&gt;-ccp&lt;/span&gt; ../asset-transfer-basic/my-chaincode/ &lt;span class="nt"&gt;-ccl&lt;/span&gt; javascript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Verify Deployment&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;peer lifecycle chaincode querycommitted &lt;span class="nt"&gt;--channelID&lt;/span&gt; mychannel &lt;span class="nt"&gt;--name&lt;/span&gt; tradeFinance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Test an Invocation&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;peer chaincode invoke &lt;span class="nt"&gt;-C&lt;/span&gt; mychannel &lt;span class="nt"&gt;-n&lt;/span&gt; tradeFinance &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'{"function":"createApplication","Args":["T001","Laptops","COD"]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: App SDK + CLI Interactions
&lt;/h2&gt;

&lt;p&gt;I built a Node.js SDK app (&lt;code&gt;myapp.js&lt;/code&gt;) to enable communication with the blockchain.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;User Management: Registers and enrolls users via the wallet.&lt;/li&gt;
&lt;li&gt;Transactions: Submits and evaluates transactions.&lt;/li&gt;
&lt;li&gt;Queries: Fetches trade status by ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Gateway&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Wallets&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fabric-network&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;cors&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;connectToNetwork&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wallet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Wallets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;newFileSystemWallet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wallet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gateway&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Gateway&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;gateway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;connection.json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;appUser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;gateway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getNetwork&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mychannel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tradeFinance&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/create-application&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;productDetails&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rules&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contract&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;connectToNetwork&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;contract&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submitTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;createApplication&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;productDetails&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CLI Tool:&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;node myapp.js createApplication T001 &lt;span class="s2"&gt;"Laptops"&lt;/span&gt; &lt;span class="s2"&gt;"COD"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Debugging Like a Pro
&lt;/h2&gt;

&lt;p&gt;Debugging a Fabric network was a learning curve! Here’s how I tackled issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Docker Logs:&lt;/strong&gt; &lt;code&gt;docker logs &amp;lt;container_id&amp;gt;&lt;/code&gt; to troubleshoot peers and orderers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debug Mode:&lt;/strong&gt; Ran chaincode in debug mode inside containers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Common Fixes:&lt;/strong&gt; Resolved identity mismatches, endorsement policy failures, and config issues&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Debugging Fabric reveals its internals orderers sequencing transactions, peers validating them—making it a deep dive into its architecture!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 5: Performance Benchmarking with Caliper
&lt;/h2&gt;

&lt;p&gt;I used Hyperledger Caliper to test the smart contract under load.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;asset-transfer-basic/my-application
npx caliper launch manager &lt;span class="nt"&gt;--caliper-workspace&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--caliper-benchconfig&lt;/span&gt; benchmarks/trade-finance-benchmark.yaml &lt;span class="nt"&gt;--caliper-networkconfig&lt;/span&gt; networks/trade-finance-network.yaml &lt;span class="nt"&gt;--caliper-fabric-gateway-enable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Simulated 32000+ transactions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latency:&lt;/strong&gt; Measured average transaction time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Throughput:&lt;/strong&gt; Achieved up to 6000 TPS on my setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Success Rate:&lt;/strong&gt; Optimized logic to reduce failures&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This identified bottlenecks (e.g., endorsement delays) and guided optimizations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Key Concepts I Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; Fabric Internals: Orderers sequence, peers validate, channels isolate&lt;/li&gt;
&lt;li&gt; Identity Management: MSPs, TLS, and CAs secure the network&lt;/li&gt;
&lt;li&gt; Chaincode Lifecycle: Install, approve, commit process&lt;/li&gt;
&lt;li&gt; Business Logic: Secure state transitions and audits&lt;/li&gt;
&lt;li&gt; Docker Debugging: Microservice troubleshooting&lt;/li&gt;
&lt;li&gt; Benchmarking: Caliper for performance tuning&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  GitHub Repository
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/parshuramsingh/Blockchain_TradeFinance" rel="noopener noreferrer"&gt;View the full project on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Words
&lt;/h2&gt;

&lt;p&gt;This project immersed me in enterprise blockchain development, from spinning up a Fabric network to benchmarking with Caliper. It’s been a wild ride debugging Docker containers, and optimizing performance all while mastering Fabric’s depths. If you’re exploring Hyperledger Fabric, fork my repo, experiment, and share your insights!&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s Connect!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://linkedin.com/in/parshuram-singh" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://github.com/parshuramsingh" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow me for more real-world Blockchain + Frontend dev content! &lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;br&gt;
– &lt;strong&gt;Parshuram Singh&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Frontend + Blockchain Developer | Hyperledger | React | Smart Contracts | Java&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>smartcontract</category>
      <category>developers</category>
    </item>
  </channel>
</rss>
