<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Utpatrick on Medium]]></title>
        <description><![CDATA[Stories by Utpatrick on Medium]]></description>
        <link>https://medium.com/@utpatrick74?source=rss-e4378a5816d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9zjPExSbfnq9UUJt</url>
            <title>Stories by Utpatrick on Medium</title>
            <link>https://medium.com/@utpatrick74?source=rss-e4378a5816d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:30:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@utpatrick74/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kickstart Fullstack Development with a custom Node.js Template (HTML, CSS, JS)]]></title>
            <link>https://medium.com/@utpatrick74/kickstart-fullstack-development-with-a-custom-node-js-template-html-css-js-d408566f0a86?source=rss-e4378a5816d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d408566f0a86</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Utpatrick]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 21:29:44 GMT</pubDate>
            <atom:updated>2025-01-05T21:29:44.678Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Kickstart Fullstack Development with a custom Node.js Template (HTML, CSS, JS)</strong></p><p>Are you looking for a straightforward template to jumpstart your next full-stack project? I’ve got you covered. This Node.js project template includes everything you need to get started: user authentication, protected routes, and MongoDB integration all while using pure HTML, CSS, and JavaScript for the front end.</p><p>In this post, I’ll walk you through the key features of the template, its structure, and how you can get started with it in minutes.</p><h3>Why This Template?</h3><p>This template is perfect for developers who:</p><ul><li>Prefer working with vanilla HTML, CSS, and JavaScript for the front end.</li><li>Want a lightweight yet robust backend using Node.js and MongoDB.</li><li>Need built-in features like user authentication and protected routes.</li></ul><h3>Key Features</h3><ul><li><strong>User Authentication</strong>: Built-in JWT-based authentication system for secure access.</li><li><strong>Protected Routes</strong>: Middleware to secure endpoints for logged-in users only.</li><li><strong>MongoDB Integration</strong>: Pre-configured Mongoose models for database interaction.</li><li><strong>Scalable Structure</strong>: Modular file organization for easy scaling and maintenance.</li></ul><h3>How to Get Started</h3><h3>1. Clone the Repository</h3><pre>git clone https://github.com/Marlz74/template_node.js-html-css-js</pre><h3>2. Install Dependencies</h3><p>Run the following command in the projects root:</p><pre>npm install</pre><h3>3. Configure Environment Variables</h3><p>Create a .env file in the root directory and add the following:</p><pre>ACCESS_TOKEN_SECRET=your_access_token_secret<br>MONGO_CONNECTION_STRING=your_mongo_db_connection_string</pre><p><strong>Pro Tip</strong>: Use a strong ACCESS_TOKEN_SECRET for your JWT and ensure your MongoDB connection string is properly configured for either Atlas or local instances.</p><h3>4. Start the MongoDB Server</h3><ul><li>If you’re using a local instance, make sure it’s up and running.</li><li>For MongoDB Atlas users, ensure your cluster is active and accessible.</li></ul><h3>5. Run the Application</h3><p>Start the development server with:</p><pre>npm run dev</pre><p>You should now have a functional backend with authentication and basic routing.</p><h3>Template Structure</h3><p>Here’s how the project is organized:</p><pre>project-root/<br>├── public/<br>│   ├── css/<br>│   │   └── style.css<br>│   └── index.html<br>├── routes/<br>│   ├── usersRoute.js<br>│   └── authRoute.js<br>├── controllers/<br>│   └── usersController.js<br>├── models/<br>│   └── User.js<br>├── middleware/<br>│   └── authMiddleware.js<br>├── .env<br>├── app.js<br>├── db.js<br>├── server.js<br>└── package.json</pre><p>Each folder and file has a specific role:</p><ul><li>public/: Holds the static frontend files.</li><li>routes/: Defines API routes for users and authentication.</li><li>controllers/: Contains business logic for handling requests.</li><li>models/: Stores database schemas.</li><li>middleware/: Houses reusable middleware functions like authentication checks</li></ul><h3>Why Pure HTML, CSS, and JavaScript?</h3><p>Not every project requires the overhead of frameworks like React or Angular. By sticking to vanilla frontend technologies, this template offers:</p><ul><li>Simplicity for beginners.</li><li>Faster load times due to reduced complexity.</li><li>Easier customization for small-scale projects.</li></ul><h3>Next Steps</h3><p>Once you’ve set up the template, feel free to:</p><ul><li>Add more features and routes.</li><li>Customize the front end to match your project’s design.</li><li>Deploy the application using platforms like Heroku, Vercel, or AWS.</li></ul><h3>Try It Out Today</h3><p>This Node.js template is licensed under MIT, so you can freely use and adapt it for your projects. Check it out on <a href="https://github.com/Marlz74/template_node.js-html-css-js"><strong><em>GitHub</em></strong></a><strong><em> </em></strong>and let me know what you think!</p><p>Feel free to adapt this article structure to fit your voice and preferred writing style. Once you’re happy with it, you can publish it on Medium to share your work with the developer community!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d408566f0a86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Technical Deep Dive into Webhooks in PHP]]></title>
            <link>https://medium.com/@utpatrick74/technical-deep-dive-into-webhooks-in-php-2236e88c56a2?source=rss-e4378a5816d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/2236e88c56a2</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[php-developers]]></category>
            <dc:creator><![CDATA[Utpatrick]]></dc:creator>
            <pubDate>Thu, 29 Aug 2024 09:49:13 GMT</pubDate>
            <atom:updated>2024-08-29T09:49:13.285Z</atom:updated>
            <content:encoded><![CDATA[<p>Webhooks are a powerful tool in web development, allowing your application to receive real-time data from external services. This article explores how webhooks work under the hood, how to handle them effectively in PHP, and best practices for ensuring security and reliability.</p><p><strong>Understanding the Basics</strong></p><p>A webhook is an HTTP request sent from one server (provider) to another (receiver) when a specific event occurs. The provider sends data related to the event, usually in JSON format, to a predefined URL on your server.</p><p><strong>The Webhook Workflow:</strong></p><ol><li><strong>Event Trigger:</strong> An action occurs on the provider’s platform (e.g., payment completion, user signup).</li><li><strong>Webhook Request:</strong> The provider sends an HTTP POST request to your specified URL, containing event data.</li><li><strong>Response:</strong> Your server processes the data and responds with an HTTP status code (e.g., 200 OK).</li></ol><p><strong>Setting Up the Webhook Receiver in PHP</strong></p><p><strong>1. Create a PHP Endpoint:</strong></p><p>This endpoint will be the URL where the provider sends the webhook data. Here’s an example:</p><pre>&lt;?php<br>// webhook.php<br><br>// Read the raw POST data<br>$payload = file_get_contents(&#39;php://input&#39;);<br><br>// Decode the JSON payload<br>$data = json_decode($payload, true);<br><br>// Check for the desired event type<br>if (isset($data[&#39;event&#39;]) &amp;&amp; $data[&#39;event&#39;] === &#39;payment.success&#39;) {<br><br>  // Access specific data from the payload<br>  $paymentId = $data[&#39;data&#39;][&#39;id&#39;];<br>  $amount = $data[&#39;data&#39;][&#39;amount&#39;];<br>  $currency = $data[&#39;data&#39;][&#39;currency&#39;];<br>  $status = $data[&#39;data&#39;][&#39;status&#39;];<br><br>  // Process the data (e.g., update database, send email)<br>  // Example: Log to a file<br>  file_put_contents(&#39;webhook_log.txt&#39;, &quot;Payment ID: $paymentId, Amount: $amount $currency, Status: $status\n&quot;, FILE_APPEND);<br><br>  // Respond with success<br>  http_response_code(200);<br>  echo json_encode([&#39;status&#39; =&gt; &#39;success&#39;, &#39;message&#39; =&gt; &#39;Webhook received&#39;]);<br>} else {<br>  // Respond with error for invalid event<br>  http_response_code(400);<br>  echo json_encode([&#39;status&#39; =&gt; &#39;error&#39;, &#39;message&#39; =&gt; &#39;Invalid event&#39;]);<br>}<br>?&gt;</pre><p><strong>2. Configure the Webhook URL with the Provider:</strong></p><ul><li>Locate the webhook settings section in the provider’s dashboard.</li><li>Enter the URL of your webhook.php script (e.g., <a href="https://yourdomain.com/webhook.php).">https://yourdomain.com/webhook.php).</a></li><li>Specify the events you want to receive notifications for (e.g., payment success, order created).</li></ul><p><strong>3. Test the Webhook:</strong></p><p>Most providers offer ways to test webhooks by simulating events. This helps ensure your endpoint functions correctly.</p><p><strong>Handling Webhooks Securely</strong></p><p>Security is paramount when dealing with webhooks, as they involve sensitive data and direct server communication. Here are key practices:</p><p><strong>1. Verify the Webhook Signature:</strong></p><p>Many providers include a signature in the request headers to verify its legitimacy. Here’s an example of signature verification:</p><pre>&lt;?php<br>// webhook.php<br><br>$secret = &#39;your-secret-key&#39;;<br><br>// Get the raw POST data<br>$payload = file_get_contents(&#39;php://input&#39;);<br><br>// Retrieve the signature from headers<br>$headers = getallheaders();<br>$signature = $headers[&#39;X-Signature&#39;] ?? &#39;&#39;;<br><br>// Generate the expected signature<br>$expectedSignature = hash_hmac(&#39;sha256&#39;, $payload, $secret);<br><br>// Compare the signatures<br>if (hash_equals($expectedSignature, $signature)) {<br>  // Request is verified, process the webhook<br>  $data = json_decode($payload, true);<br>  // ... (process data)<br>} else {<br>  // Invalid signature, reject the request<br>  http_response_code(403);<br>  echo json_encode([&#39;status&#39; =&gt; &#39;error&#39;, &#39;message&#39; =&gt; &#39;Invalid signature&#39;]);<br>}<br>?&gt;</pre><p><strong>2. Handle Idempotency:</strong></p><p>Webhooks might be sent multiple times for the same event. Use a unique identifier (e.g., payment ID) to ensure actions are only performed once. Store this identifier in your database and check if the event has already been processed.</p><p><strong>3. Respond Quickly:</strong></p><p>Providers typically expect a response within a few seconds. If processing takes longer, acknowledge the request first and handle it asynchronously</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2236e88c56a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overcoming a Challenging Backend Problem: My Journey with Coderigi and the HNG Internship]]></title>
            <link>https://medium.com/@utpatrick74/overcoming-a-challenging-backend-problem-my-journey-with-coderigi-and-the-hng-internship-ea4131136881?source=rss-e4378a5816d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea4131136881</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[developement]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Utpatrick]]></dc:creator>
            <pubDate>Fri, 28 Jun 2024 14:40:21 GMT</pubDate>
            <atom:updated>2024-06-28T14:40:21.252Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>Hello, I’m Utibe Patrick Bassey, a fullstack developer at Coderigi with a passion for solving complex technical challenges. Recently, while working on our shipment web application, Kreater, I encountered a particularly demanding problem that pushed my skills to the limit. This experience not only strengthened my technical abilities but also deepened my appreciation for the complexities of backend development. As I share my journey and insights gained from tackling this challenge, I hope to inspire fellow developers facing similar hurdles.</p><h3><strong>The Challenge: Scaling, Refactoring, and API Optimization in Kreater</strong></h3><p>Kreater allows users to send and track shipments in real-time, presenting unique scalability and performance challenges as our user base grew. Optimizing our APIs to enhance response times became crucial amidst expanding feature demands. This led us to embark on a rapid code refactor to accommodate these requirements within tight deadlines.</p><h3><strong>Step-by-Step Solution</strong></h3><ol><li><strong>Identifying the Problem:</strong> Initially, we pinpointed performance bottlenecks in our APIs through profiling and monitoring. This revealed areas where inefficient query execution and data processing were slowing down operations.</li><li><strong>Refactoring and Modularization:</strong> To address these challenges, we modularized our codebase, breaking down components into smaller, manageable modules. This not only improved code maintainability but also facilitated targeted optimizations.</li><li><strong>Optimizing Query Efficiency:</strong> We fine-tuned SQL queries, introduced strategic indexing to minimize database load and enhance API responsiveness.</li><li><strong>Implementing Asynchronous Processing:</strong> Critical operations like real-time shipment tracking were optimized with asynchronous processing using message queues and background job processing.</li><li><strong>Load Testing and Performance Monitoring:</strong> Rigorous load testing with tools like Apache JMeter ensured our optimizations could sustain high traffic volumes. Continuous performance monitoring guaranteed ongoing efficiency.</li></ol><h3><strong>The Outcome</strong></h3><p>Our efforts resulted in significant improvements across the board. API response times were slashed, scalability was enhanced, and real-time tracking became smoother and more reliable, elevating user satisfaction.</p><h3><strong>Why the HNG Internship?</strong></h3><p>Participating in the HNG Internship is an exciting opportunity for me to further my skills and collaborate with industry peers on real-world projects. It’s an opportunity for me to learn more about modern technology and acquire practical experience that will advance my career.</p><p>I encourage you to explore the<a href="https://hng.tech/internship"> <strong><em>HNG Internship</em></strong></a> to discover how it can empower your journey in software development. For companies seeking talented developers,<a href="https://hng.tech/hire"> <strong><em>HNG Hire</em></strong></a> offers access to a pool of skilled interns and professionals.</p><h3><strong>Conclusion</strong></h3><p>Navigating the complexities of backend development requires a combination of technical skills, creativity, and perseverance. I look forward to applying these experiences to future endeavors and contributing meaningfully to the tech community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea4131136881" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BRC-20 is an exciting new development in the cryptocurrency world, but it can be a bit confusing at…]]></title>
            <link>https://medium.com/@utpatrick74/brc-20-is-an-exciting-new-development-in-the-cryptocurrency-world-but-it-can-be-a-bit-confusing-at-37ac6a54f095?source=rss-e4378a5816d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/37ac6a54f095</guid>
            <category><![CDATA[brc20]]></category>
            <dc:creator><![CDATA[Utpatrick]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 15:15:52 GMT</pubDate>
            <atom:updated>2024-01-21T15:15:52.315Z</atom:updated>
            <content:encoded><![CDATA[<p>BRC-20 is an exciting new development in the cryptocurrency world, but it can be a bit confusing at first. Here’s a breakdown of what I know about it, in case it helps:</p><h3><strong>What is it?</strong></h3><p>BRC-20 is a technical standard for creating and transferring fungible tokens on the Bitcoin blockchain. This might sound similar to ERC-20 tokens on Ethereum, but there are some key differences:</p><p>Platform: BRC-20 tokens live on the Bitcoin blockchain, while ERC-20 tokens live on the Ethereum blockchain.<br>Technology: BRC-20 tokens use ordinal inscriptions instead of smart contracts. This means they’re directly attached to Bitcoin satoshis (the smallest units of Bitcoin) with metadata encoded in JSON. Think of it like writing information on tiny pieces of paper and sticking them to Bitcoin itself.</p><h3><strong>What’s the big deal?</strong></h3><p>BRC-20 opens up new possibilities for the Bitcoin blockchain. Before, Bitcoin was mainly used for peer-to-peer transactions. Now, developers can create and use tokens for things like:</p><p>Decentralized finance (DeFi): Lending, borrowing, and earning interest on your crypto.<br>Stablecoins: Tokens pegged to the value of another asset, like the US dollar, for more stable transactions.<br>NFTs: Unique digital assets like collectibles and artwork.<br>Governance: Using tokens to vote on decisions that affect the development of the Bitcoin network.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37ac6a54f095" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling BRC20: Pioneering the Future of Decentralized Finance]]></title>
            <link>https://medium.com/@utpatrick74/unveiling-brc20-pioneering-the-future-of-decentralized-finance-d5c233e0931f?source=rss-e4378a5816d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5c233e0931f</guid>
            <category><![CDATA[brc20]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[crptocurrency]]></category>
            <category><![CDATA[decentralization]]></category>
            <dc:creator><![CDATA[Utpatrick]]></dc:creator>
            <pubDate>Sat, 06 Jan 2024 16:08:55 GMT</pubDate>
            <atom:updated>2024-01-06T16:08:55.664Z</atom:updated>
            <content:encoded><![CDATA[<p>In the fast-paced world of decentralized finance, BRC20 emerges as a beacon of innovation, redefining possibilities within the Bitcoin ecosystem. Born from the pioneering Bitcoin Ordinals protocol, BRC20 isn’t just a token standard — it’s a testament to boundless creativity, relentless innovation, and a thriving community united in reshaping the financial landscape.</p><h3><strong>Trailblazing Innovation</strong></h3><p>BRC20 isn’t bound by convention; it’s a paradigm shift in tokenization on the Bitcoin network. Leveraging the robust Bitcoin Ordinals protocol, it introduces a seamless mechanism for creating, minting, and transferring digital assets. Serialization of individual satoshis empowers users with the ability to craft diverse tokens, fostering an ecosystem rich in possibilities.</p><p>However, innovation within BRC20 transcends mere functionalities. It’s a symphony of collaborative effort, where developers, visionaries, and enthusiasts converge to push the boundaries of what’s achievable. The imminent launch of the Super App stands as a testament — an eagerly anticipated milestone promising enhanced accessibility and transformative utilities within the ecosystem.</p><h3><strong>The Resonance of Community</strong></h3><p>At the nucleus of BRC20’s success lies a vibrant and engaged community. More than just participants, they are architects shaping the ecosystem’s trajectory. The diversity of tokens — from meme-based to utility-focused — reflects the community’s boundless imagination. Discussions, collaborations, and innovations abound, fueling an ever-evolving ecosystem.</p><h3><strong>Anticipating Future Developments</strong></h3><p>As the BRC20 narrative unfolds, anticipation brims for forthcoming milestones. New tokens, pioneering use cases, and the imminent Super App release herald a future brimming with excitement. The Super App’s promise of enhanced accessibility and utility embodies the essence of BRC20’s commitment to democratizing decentralized finance.</p><h3><strong>Embrace the Journey</strong></h3><p>The allure of BRC20 isn’t confined — it’s an invitation to participate in an unfolding revolution. Enthusiasts, developers, and curious minds find an open canvas, an opportunity to innovate, collaborate, and contribute. BRC20 isn’t merely about digital assets; it’s about crafting a future where financial possibilities know no boundaries — a collaborative effort empowering individuals globally.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5c233e0931f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>