<?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 Oluwatobi Akanji on Medium]]></title>
        <description><![CDATA[Stories by Oluwatobi Akanji on Medium]]></description>
        <link>https://medium.com/@akanjioluwatobishadrach?source=rss-1c3d48a843ac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ps155FJfqXOqGtFeCmxfww.jpeg</url>
            <title>Stories by Oluwatobi Akanji on Medium</title>
            <link>https://medium.com/@akanjioluwatobishadrach?source=rss-1c3d48a843ac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 06:28:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akanjioluwatobishadrach/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[Why use Microfrontends]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/why-use-microfrontends-77bdc1d76e75?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/77bdc1d76e75</guid>
            <category><![CDATA[why-use-microfrontend]]></category>
            <category><![CDATA[micro-front-end]]></category>
            <category><![CDATA[implement-microfrontend]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Sun, 06 Apr 2025 21:16:00 GMT</pubDate>
            <atom:updated>2025-04-06T21:16:31.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lBbq79PSwUaRzXrP9j1K0Q.jpeg" /><figcaption>Photo: Marki Williams</figcaption></figure><p>In the <a href="https://medium.com/@akanjioluwatobishadrach/quick-guide-to-microfrontends-bcfc5762bd68">previous article on microfrontends</a>, I outlined two key reasons for their use: the presence of a content management system that houses the applications and the establishment of a consistent design system whose styling remains unchanged. In this article, I will explore additional reasons to adopt microfrontends.</p><ol><li><strong>Creation of a Composable Dashboard</strong>: Composable dashboards enable users to customize their views by combining a collection of widgets. These dashboards can either allow users to create predefined layouts with a finite number of combinations or require developer intervention for more personalized arrangements. The widgets that comprise the dashboard can be designed as microfrontends, maintaining low or no coupling with one another.</li><li><strong>Embedding Popups or Floating Widgets in Third-Party Sites</strong>: Popups and widgets intended for embedding in third-party sites operate as microfrontends that deliver specific functions within those sites. Integration of these floating widgets can occur automatically with a browser extension installation or may require manual setup by the developer of the third-party site. Additionally, the popup is designed to hide its markup from the host page to prevent any alterations to its styles. An example of such a microfrontend is the Grammarly suggestion popup.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77bdc1d76e75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Guide to Microfrontends]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/quick-guide-to-microfrontends-bcfc5762bd68?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcfc5762bd68</guid>
            <category><![CDATA[react-microfrontend]]></category>
            <category><![CDATA[implement-microfrontend]]></category>
            <category><![CDATA[frontend-architecture]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Sun, 30 Mar 2025 21:06:53 GMT</pubDate>
            <atom:updated>2025-03-30T21:06:53.815Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XFD4u2lNshNawl7aG8JvbQ.jpeg" /><figcaption>Microfrontend Image from <a href="https://www.infracloud.io/blogs/introduction-to-microfrontends/">https://www.infracloud.io/blogs/introduction-to-microfrontends/</a></figcaption></figure><h3>What are Microfrontends?</h3><p>Microfrontends are small JavaScript applications that can be embedded in a single page or across multiple pages. A microfrontend could be something simple like an input field, a checkout button, or a dashboard displaying various metrics.</p><h3>Why Use Microfrontends?</h3><p>The primary argument for adopting microfrontends is that frontend teams can be large and consist of different development groups with expertise in various frameworks. However, this structure can indicate underlying issues, as it lacks constraints that would require all teams to use a single framework such as React. Instead, it permits each team to choose their frontend framework and follow their development guidelines.</p><p>Here are two reasons why organizations might choose a microfrontend architecture:</p><p>1. <strong>Content Management Systems (CMS)</strong>: In CMS environments, interactive frontend applications may not need to be uniform across the entire website. Each application often requires separate management for different pages. Microfrontends can be implemented as standalone content blocks within the CMS.</p><p>2. <strong>Ubiquitous Design Systems</strong>: Technologies utilized across an organization’s tech stack can differ significantly. However, they generally converge on a common backend that serves content and a frontend built with HTML, CSS, and JavaScript that renders that content. For instance, PHP, Ruby on Rails, and Next.js may be used for various applications within an organization. When a unified design system is necessary, microfrontends can be beneficial. They can be compiled into JavaScript, allowing for consistency across different technologies. The design system can be developed in React while leveraging the advantages of web components.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcfc5762bd68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Restricted APIs in Frontend Local Development]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/using-restricted-apis-in-frontend-local-development-835a76503c0a?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/835a76503c0a</guid>
            <category><![CDATA[react-microfrontend]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[system-architecture]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[decouple]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Wed, 20 Nov 2024 21:09:13 GMT</pubDate>
            <atom:updated>2024-11-20T21:09:13.133Z</atom:updated>
            <content:encoded><![CDATA[<h4>The quest to decouple frontend development from the drag of real data import and API creation.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*zcAkuB3B_558DzB09bGo_g.png" /></figure><h4>Big vs Medium vs Small Software Companies</h4><p>In small organisations, a full stack approach to software development is usually employed to facilitate the development velocity and obviate the need for inter-team dependency and communication as observed in medium to large software companies. That is, in smaller companies, the frontend and backend are done by the same team thus removing the need to communicate changes between the frontend and backend team which is commonplace in medium to large software companies.</p><p>Because of the full stack approach employed by smaller software companies, the team seldom encounter issues regarding the API integration as the API development team is the same as the API integration team. However, in medium to large software organisations, API integration issues arise as frequently as there are new projects.</p><h4>API Integration Issues</h4><p>In my team, we have had our fair share of such issues as sometimes, the specified API structure differs from the developed API structure. This was resolved using a custom mock data structure to produce mock data for rapid development of the frontend.</p><p>However, another issue arose regarding integrating real data into the apps rapidly developed using the mock data. Since the mock data varies from the real data, blindly integrating the data into the application isn’t obtainable as some subtle data gaps may introduce inconsistencies across the app which shouldn’t get to production.</p><p>In situations like this, the frontend had to obtain the real data for local development use. At times, sourcing this data could cause delays in development and in other cases, individual PC differences could affect the data setup process thereby increasing the data setup time.</p><p>Furthermore, whenever data issues are encountered in production such as the alignment of a chart tick or timezones mismatch, the frontend developer usually needs to obtain similar data records for local testing and resolution. This results in fixes which could have taken a few minutes gulp hours due to data sourcing, import, and setup of the backend repo assuming there were breaking changes since the last local repo update.</p><p>The data setup issues forced the team into seeking solutions which obviate the need to source and import data for local development.</p><h4>Resolving Integration Issues</h4><p>The frontend has a script which reads entries from a field and dynamically injects script and style tags with the respective values attached. This assisted in implementing a method which we called “local tunnelling”.</p><p>With local tunnelling, the Javascript URL running on the localhost is inserted in a sandbox built into the production web application. This sandbox serves as the holding ground for yet-to-be-launched apps. Therefore, the frontend team found that inserting a reference to the localhost Javascript file loads the file into the sandbox and also allows the local Javascript file to make API calls to the restricted URLs in the sandbox environment.</p><p>This has ensured that the frontend team doesn’t need to source for data thus speeding up development. Likewise, the backend doesn’t need to run the Javascript repository locally to spin up the app and make changes to the secure API. What a backend developer needs to do is grab the staging JS URL and insert it into the dynamic script processing mechanism. This ensures the served JS file reads the local window.location.origin and makes calls to the API based on the web URL sniffed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=835a76503c0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Compression using Pako]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/data-compression-using-pako-5125160f5190?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/5125160f5190</guid>
            <category><![CDATA[uint8array]]></category>
            <category><![CDATA[react-app-state]]></category>
            <category><![CDATA[data-compression]]></category>
            <category><![CDATA[pako]]></category>
            <category><![CDATA[react-reducer]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Sat, 25 Nov 2023 21:04:39 GMT</pubDate>
            <atom:updated>2023-11-25T21:04:39.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RJMz57cKsVR4Igal" /><figcaption>Photo by <a href="https://unsplash.com/@chrisliverani?utm_source=medium&amp;utm_medium=referral">Chris Liverani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Storing and Utilizing Large Data from Frontend Applications</h4><p>In 2022, I encountered a large data transmission issue in a React application at my workplace. The application, a financial dashboard, uses various data visualization techniques. It employs React reducers to manage the state, which includes substantial data points over several years.</p><p>On the dashboard, users can adjust data points and save the application’s current state. This saved data, stored on the server, is of interest. As a result, my task was to improve data transmission since saving large amounts of data from regions like China can significantly slow response time. However, rewriting the saved data configuration was not an option for this task.</p><p>Therefore, I decided to use data compression techniques to minimize the size of the transmitted data. This led me to <a href="https://github.com/nodeca/pako">Pako</a>, a data compression library. For context, the state to be transferred to the backend is approximately 61 MB without compression.</p><h3>Compression</h3><p>Compressing the data was straightforward because I followed a guide provided with the package. Here is the snippet of code I used for data compression:</p><pre>export const compressData = (data) =&gt; {<br>  let compressedData;<br>  try {<br>    compressedData = deflate(JSON.stringify(data), {<br>      raw: true,<br>    });<br>  } catch (e) {<br>    throw new Error(e);<br>  }<br>  return compressedData;<br>};</pre><p>The compressed data is transferred to the server as a string of numbers separated by commas.</p><h3>Decompression</h3><p>Decompressing the saved data required me to use techniques not covered in the package guide, as it primarily focused on decompressing data that hasn’t been transmitted. The method used to decompress saved data differs from that used to decompress data still within the running application. Here are the steps I followed to decompress the saved data:</p><p>First, I converted the comma-separated strings into a number array. The goal was to transform the compressed data into the format expected by the Pako decompression method. This also resolved the “invalid distance too far back” error I encountered while trying to decompress the data stored as a string.</p><pre>const convertToNumberArray = (commaSeperatedString) =&gt;<br>  commaSeperatedString.split(&quot;,&quot;).map((string) =&gt; Number(string));</pre><p>Next, I transformed the number array into a Uint8Array and fed it into the decompression algorithm.</p><pre>export const decompressData = (compressedData) =&gt; {<br>  let decompressedData;<br>  const compressedDataArray = convertToNumberArray(<br>    compressedData<br>  );<br>  try {<br>    decompressedData = JSON.parse(<br>      inflate(new Uint8Array(compressedDataArray), {<br>        raw: true,<br>        to: &quot;string&quot;,<br>      })<br>    );<br>  } catch (e) {<br>    throw new Error(e);<br>  }<br><br>  return decompressedData;<br>};</pre><p>The data was compressed successfully. Initially, the data size was about 61 MB, but after compression, it reduced to about 1.5 MB. This improvement significantly enhanced the application’s response time for all users saving customized data.</p><p>Checkout Pako <a href="https://github.com/nodeca/pako">here</a>. <a href="https://github.com/nodeca/pako">https://github.com/nodeca/pako</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5125160f5190" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing LazerPay over XendFinance]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/choosing-lazerpay-over-xendfinance-ccb17ac36e5?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccb17ac36e5</guid>
            <category><![CDATA[xend-finance]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[lazerpay]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 20:36:17 GMT</pubDate>
            <atom:updated>2023-02-24T20:56:56.970Z</atom:updated>
            <content:encoded><![CDATA[<h4>Picking simplicity over sophistication</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OaheiwCLs5WCMWB-vgFmzQ.png" /></figure><p>Having developed a winning project during the Polygon 2022 hackathon, some individuals reached out to understand why I chose LazerPay over XendFinance to handle the core logic of the application. In this article, I outline the reasons I chose LazerPay over XendFinance.</p><ol><li>Simplicity: A visit to the <a href="https://lazerpay.finance/">LazerPay</a> site shows that the developers had the users, especially developers in mind. On the LazerPay homepage, I easily identified the links to explore the developer documentation. Compared to the <a href="https://xend.finance/">XendFinance</a> website, I was unable to identify direct links to their developer documentation.</li><li>API Documentation: LazerPay’s API documentation shows all the capabilities of the system and answers pertinent questions upfront about the usage of the API. I was able to quickly test the APIs using Postman. Unlike XendFinance, when I finally found their developer <a href="https://docs.xend.finance/merchant-api">documentation</a>, I struggled to understand how the APIs work. The swagger documentation link I found within the XendFinance documentation did not aid in comprehending how to plug into their API at first glance.</li><li>Business Logic: Unlike XendFinance, LazerPay already had some good business logic I intended to use for the EcoCycle website. For instance, it had an API to collect all transactions, top-up the LazerPay account, create products for sale, and convert the crypto to fiat currency. These functionalities were necessary for smooth development. I could not afford to attempt to figure out XendFinance’s APIs and then build such core business logic while I develop the EcoCycle application.</li></ol><p>Overall, the LazerPay developer guide is well-written compared to XendFinance’s. LazerPay’s API documentation includes well-crafted <a href="https://documenter.getpostman.com/view/20216295/2s7ZE7L42K">postman API documentation</a> too.</p><p>Haven’t read how I won the Polygon Africa 2022 hackathon, check this <a href="https://medium.com/@akanjioluwatobishadrach/learnings-from-polygon-africa-bootcamp-hackathon-2022-9fe41b73b7af">article </a>out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccb17ac36e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker memory exhaustion issue: Cause, Debugging, & Resolution]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/docker-memory-exhaustion-issue-cause-debugging-resolution-93881c745f1e?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/93881c745f1e</guid>
            <category><![CDATA[memories]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[docker-desktop]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Fri, 27 Jan 2023 20:56:17 GMT</pubDate>
            <atom:updated>2023-01-27T20:56:17.771Z</atom:updated>
            <content:encoded><![CDATA[<h4>Discover the culprit hogging your Docker allocated memory</h4><figure><img alt="Docker logo" src="https://cdn-images-1.medium.com/max/400/1*KWeXamv1oqIvzKLlPhn-rA.png" /></figure><h4>Docker</h4><p>Docker is a great platform for cross-platform system development and deployment. Although Docker abstracts most underlying host machine functionalities, it also consumes the host machine’s expensive resources. One of those resources is memory. The focus here is Docker Desktop: the software that enables the containerisation of applications on personal computers.</p><h4>Cause</h4><p>Containerised applications use both network and storage to perform operations. Since the network is ephemeral, persistent storage also known as volumes is usually one of the culprits of memory exhaustion. When I built a Nest JS application on docker, I noticed that after running docker compose up multiple times, the database failed to start. Below is a sample of the console error as it points to a memory exhaustion problem.</p><pre>[Note] InnoDB: 128 out of 128 rollback segments are active.<br>[Note] InnoDB: Creating shared tablespace for temporary tables<br>[Note] InnoDB: Setting file &#39;./ibtmp1&#39; size to 12 MB. Physically writing the file full; Please wait ...<br>[ERROR] InnoDB: preallocating 12582912 bytes for file ./ibtmp1 failed with error 22<br>[ERROR] InnoDB: Could not set the file size of &#39;./ibtmp1&#39;. Probably out of disk space<br>[ERROR] InnoDB: Unable to create the shared innodb_temporary<br>[ERROR] InnoDB: Plugin initialization aborted with error Generic error<br>[Note] InnoDB: Starting shutdown...<br>[Note] InnoDB: Removed temporary tablespace data file: &quot;ibtmp1&quot;<br>[ERROR] Plugin &#39;InnoDB&#39; init function returned error.<br>[ERROR] Plugin &#39;InnoDB&#39; registration as a STORAGE ENGINE failed.<br>[Note] Plugin &#39;FEEDBACK&#39; is disabled.<br>[ERROR] Unknown/unsupported storage engine: InnoDB<br>[ERROR] Aborting</pre><h4>Debugging</h4><p>One of the causes of memory issues in docker is when the build cache is full. Thus, I proceeded to clear the build cache using docker builder prune. This command clears out the build caches and frees the memory used to store cached build images.</p><p>However, the problem persisted. I was forced to run a docker system prune to remove all unused containers, networks, and images. On building the application and serving it using docker compose up, the issue persisted.</p><p>Then I had to prune all the volumes using docker volume prune .</p><p>With all the images, caches, containers, networks, and volumes cleared, the database started and worked fine.</p><h4>Resolution</h4><p>This befuddled me and I played detective to this issue. This is what I found:</p><ol><li>The node_modules folder being created wasn’t attached to any volume. Therefore, for every docker compose up, docker creates an anonymous volume for the node_modules. A long string of random alphanumeric characters represents the anonymous volume&#39;s name. The image below shows an example of an anonymous volume.</li></ol><figure><img alt="Anonymous volume on Docker Desktop" src="https://cdn-images-1.medium.com/max/1024/1*vrGlJeBbjdSe4Cybj_XiMw.png" /><figcaption>Anonymous volume on Docker Desktop</figcaption></figure><p>2. I had to update the docker-compose.yml file to make the node_modules save to a named volume. This also ensured that whenever I executed an npm install command at runtime, the changes reflect within the application. So instead of creating an anonymous volume as - /usr/src/app/node_modules, I changed it to create a named volume as - node_modules_data:/usr/src/app/node_modules . The code snippet below shows the faulty docker-compose.yml file.</p><pre>version: &#39;3.7&#39;<br><br>services:<br>  app-api:<br>    image: node:18-alpine<br>    container_name: app-api<br>    build:<br>      context: .<br>    command: npm run start:dev<br>    env_file:<br>      - .env<br>    ports:<br>      - ${APP_SERVER_PORT}:${APP_SERVER_PORT}<br>    volumes:<br>      - .:/usr/src/app<br>      - /usr/src/app/node_modules<br>    networks:<br>      app-network:<br>    depends_on:<br>      - app-mysql-server</pre><p>The code snippet below shows the docker-compose.yml file updated to use named volumes for node_modules.</p><pre>version: &#39;3.7&#39;<br><br>services:<br>  app-api:<br>    image: node:18-alpine<br>    container_name: app-api<br>    build:<br>      context: .<br>    command: npm run start:dev<br>    env_file:<br>      - .env<br>    ports:<br>      - ${APP_SERVER_PORT}:${APP_SERVER_PORT}<br>    volumes:<br>      - .:/usr/src/app<br>      - node_modules_data:/usr/src/app/node_modules<br>    networks:<br>      app-network:<br>    depends_on:<br>      - app-mysql-server</pre><p>So how did I discover that the anonymous volume was a node_modules volume? Simple! Here is what I did:</p><ol><li>I selected the anonymous volume in docker desktop.</li><li>I switched from the “IN USE” tab to the “DATA” tab to see the data contained in the volume. Voila! I saw that the data contents were installed node packages.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vw23S-0lJVjwyR3T4krxwA.png" /></figure><p>Docker memory exhaustion could be annoying but you might not need to nuke the images and volumes built previously. On one hand, if the docker issue stops you from building the application, it is most likely a build cache memory exhaustion issue. On the other hand, if the issue stops you from running the application, it is most likely a volume memory issue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93881c745f1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learnings from Polygon Africa Bootcamp & Hackathon 2022]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/learnings-from-polygon-africa-bootcamp-hackathon-2022-9fe41b73b7af?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fe41b73b7af</guid>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[oluwatobi-akanji]]></category>
            <category><![CDATA[ecocycle]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[polygon]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 09:32:17 GMT</pubDate>
            <atom:updated>2023-11-01T22:52:34.473Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>An inside scoop from the Polygon Africa hackathon’s first runner-up in the Beginner track.</strong></p><figure><img alt="Polygon blockchain logo" src="https://cdn-images-1.medium.com/max/1024/1*tXXZ02rXLOLlEUDH7jk5FQ.png" /></figure><h4><strong>Bootcamp Little Birdie</strong></h4><p>Like most young people in Nigeria, I use social media to catch up on what my friends and acquaintances have been up to. That was when I stumbled upon the Whatsapp status of my friend informing his network about the Polygon Africa Bootcamp 2022. Having seen the advertisement for the bootcamp and hackathon earlier on LinkedIn, I read through the advertisement copy, applied, and waited to be shortlisted.</p><h4><strong>Letter M is for Motivation</strong></h4><p>One might wonder what my motivation was for applying to the bootcamp and hackathon. First of all, the hackathon prizes looked juicy 😜. I imagined getting one of those prizes and all I could feel was the excitement of winning. But, applying to the bootcamp and participating in the hackathon does not guarantee that I would win any prize.</p><p>Second, I saw the bootcamp as an opportunity to upskill myself in web3. During the pandemic in 2020, one of my goals was to learn Solidity. But I wasn’t able to achieve learn Solidity due to several commitments and accomplishment of other goals such as learning about the cloud and obtaining certification from some cloud providers (I learnt about the cloud in 2020 and got certified by Google and Microsoft Azure).</p><p>Third, I viewed it as an opportunity to add a side project to my portfolio and also learn some accompanying technologies aside from Solidity.</p><p>Since my mantra is “earn and learn”, I saw the bootcamp as a good fit to both learn and most likely earn. Even if I didn’t win anything during the hackathon, I viewed listing any project I would work on in my portfolio as a win. Listing the project on my portfolio could translate to a potential increase in earning power.</p><h4><strong>Lessons Learnt</strong></h4><p>The two phases of the program, the bootcamp and the hackathon, enabled me to learn various technologies and skills.</p><p>During the bootcamp, I learnt a lot about Solidity. The concept of gas fascinated me about the development and deployment of a Solidity app to the blockchain. You see, just as most motor vehicles need gasoline to run, so does the Solidity app with gas. Aside from running a vehicle on gasoline, the vehicle’s owner is also concerned about the vehicle’s fuel efficiency. That is, the amount of fuel the vehicle guzzles per mile or kilometre. In Solidity, the developer has to ensure the application is gas efficient too. Gas efficiency helps to avoid paying exorbitant gas fees every time the application executes. I have applied this knowledge of gas fees in Solidity to other high-level programming languages by avoiding memory inefficient operations and optimizing functions for optimal memory utilisation.</p><p>During the hackathon, I chose to build the application idea using Next JS for the frontend and Nest JS for the backend. Having used React JS and Next JS for a couple of projects, it was a no-brainer for me to go with a frontend technology I was familiar with. However, compared to React JS and Gatsby JS which I was most familiar with, I had to learn some concepts in Next JS such as middleware. With middleware, I was able to implement the protected route mechanism seamlessly. Unlike in React JS where the validation to navigate to a protected route is usually performed in the frontend, I was able to leverage the middleware to authorise access to data on protected routes.</p><p>Furthermore, I used Nest JS to build the backend of the hackathon project. I utilised this opportunity to gain hands-on experience using Nest JS. The backend was hosted on Railway, an alternative to Heroku, using Docker. The mesh of these technologies enabled me learn much more about each technology.</p><h4><strong>The Project</strong></h4><p>Since I was focused on my mantra “earn and learn”, I had to think up ideas that were most likely to win. I turned to my idea book in which I have written several ideas. The idea that seemed implementable using a hybrid of Web2 and Web3 (Blockchain) was the garbage collection app idea I had written down in 2021.</p><figure><img alt="The garbage collection app idea I scribbled in a jotter in 2021" src="https://cdn-images-1.medium.com/max/1024/1*0ovIf0FBSx613XDXkH46dQ.png" /><figcaption>The garbage collection app idea I scribbled in a jotter in 2021</figcaption></figure><p>Next, I had to identify how Web3 could be integrated into the garbage collection application. The aspect of tokenomics stood out. Using the concept of tokenomics, a portmanteau of “token” and “economics”, I was able to establish the issuance of the application’s native token and its utility. Not forgetting that the application was yet to be named, I called it “EcoCycle”, a portmanteau of “Ecosystem” and “Recycle”. In EcoCycle, the native reward token is called EcoToken which can be used to obtain tax credit, get discounts on items purchased from approved EcoStores, or redeem items from approved EcoStores. To get an EcoToken, you need to participate in the EcoCycle system. That is, you either need to be a recyclable waste collector or processor. Once you either sell recyclable wastes for cash or you purchase recyclable wastes to be transformed into useful materials, you are rewarded with some amount of EcoToken. For payments, crypto stable coins such as USDT, USDC, BUSD, and DAI are used. With the idea of EcoCycle taking shape, I had to look for services that support the purchase of stablecoins in local currency and the transfer of those stablecoins.</p><figure><img alt="Scribbles on jotter showing rough sketch of EcoCycle and other services to consume in the application" src="https://cdn-images-1.medium.com/max/1024/1*JXdRLoSzPEl_1et4AbpjBA.jpeg" /><figcaption>Scribbles on jotter showing rough sketch of EcoCycle and other services to consume in the application</figcaption></figure><p>Two services that seemed to support the purchase of stablecoins in local currency and the transfer of the coins are XendFinance and LazerPay. I explored the documentation of XendFinance but found out it couldn’t fulfill most of EcoCycle’s needs. Thus, I had to turn to LazerPay. With LazerPay, most of EcoCycle’s present and future needs were already covered. However, LazerPay had a drawback too: EcoCycle couldn’t create accounts on behalf of its customers. I wanted the use of EcoCycle to be seamless such that any underlying service EcoCycle depends on such as LazerPay would be transparent to the user. The inability to register a customer on behalf of LazerPay made me design a workaround which works well but is neither user-friendly nor efficient. For the workaround, the user has to register and log into their accounts both on EcoCycle and LazerPay. Once the user can access the dashboard in LazerPay, the user needs to copy the public and secret keys, preferably testnet keys. In EcoCycle, the user navigates to the settings section and pastes the copied public and secret keys into their respective fields under the API Keys tab and saves them. In this way, EcoCycle can access and perform operations on the customer’s LazerPay account. To revoke EcoCycle’s access to a user’s LazerPay account, the public and secret keys are regenerated on the user’s LazerPay dashboard by the user.</p><p>I was not able to complete the EcoCycle application but have made significant progress in laying the foundation for the application.</p><figure><img alt="Scribbles on jotter showing a feature wish-list for EcoCycle" src="https://cdn-images-1.medium.com/max/1024/1*QCUwFLnS5doGRlAl8VzbXA.jpeg" /><figcaption>Scribbles on jotter showing a feature wish-list for EcoCycle</figcaption></figure><h4><strong>Next Steps</strong></h4><p>1.<strong> </strong>The payment feature for EcoCycle is yet to be completed. I will work on it to ensure seamless payments.</p><p>2. There is a waste pickup feature that needs work. I need to add the ability to use maps to schedule waste pickup just like ride-hailing apps.</p><p>3. I need to manage a customer’s transaction history and also populate the transactions table. Although the table has been designed, it is yet to be put to use because of its core data features that need to be completed.</p><p>4. I need to optimise the website for mobile devices. Although I used Material UI to rapidly build the website, the website is currently more desktop friendly than mobile.</p><p>5. Error messages need to be user-friendly. I will need to do some work on error handling and error messages.</p><p>6. Automated tests. The Next JS frontend and the Nest JS backend lack tests. I will begin including tests in both codebases. Furthermore, I will add API documentation, probably Swagger, to the NestJS backend.</p><p>7. I need to tidy up EcoCycle’s codebases as there are some code duplicates in the repositories. Furthermore, I intend to explore domain-driven architecture for the Nest JS backend as described in this <a href="https://dev.to/bendix/applying-domain-driven-design-principles-to-a-nest-js-project-5f7b">article</a>.</p><p>You can view the EcoCycle website at <a href="https://eco-cycle.vercel.app/">https://eco-cycle.vercel.app/</a>. You may experience issues signing up or creating an account, especially towards the end of the month. The service outage is likely to be caused by an exhaustion of the free credits I got from Railway which hosts EcoCycle’s backend. Railway is a hosting platform which gives free $5.00 of credit or 500 hours of usage per month for each user. I find Railway to be a good alternative to Heroku since Heroku stopped offering its services for free. You can check out EcoCycle’s codebase on github <a href="https://github.com/Oluwatobi-beebittech/EcoCycle">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MbAQYYWcWuDfLN4fdMhexw.png" /><figcaption>My scribbled note enumerating next steps for the EcoCycle project</figcaption></figure><h4>First-runner Up Announcement</h4><p>On 19th December 2022, the winners of the hackathon were announced and my project, EcoCycle, came second in the beginner category. You can read the blog which listed the winners per category <a href="https://polygon.technology/blog/announcing-the-hackathon-winners-of-polygon-bootcamp-africa">here</a>. Also, you can watch the recorded winner announcement session in the video clip below.</p><p><a href="https://youtube.com/clip/UgkxEuOIyJDvcjuYgmLRxXYmtFIZJ0wlZggv">✂️ EcoCycle Winning Announcement</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fe41b73b7af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Laravel 8 Website with React js Assets on Heroku]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/deploying-laravel-8-website-with-react-js-assets-on-heroku-57221dd141e7?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/57221dd141e7</guid>
            <category><![CDATA[laravel8]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 20:37:09 GMT</pubDate>
            <atom:updated>2021-07-30T20:37:09.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*z2hjkqYCIHkWHLu3pdxPnA.png" /></figure><p>In deploying my Laravel 8 website on Heroku, I encountered some issues which made me dig to rectify the issues. Consequently, this article outlines the steps needed to launch a Laravel 8 website which uses React js assets on Heroku.</p><figure><img alt="Heroku" src="https://cdn-images-1.medium.com/max/1024/1*kg8aAUNxI055OhNhT04srQ.png" /></figure><p><strong>Getting Started with Heroku</strong></p><p>Heroku officially supports 9 languages by providing their buildpacks. A Heroku buildpack is a set of opensource scripts used for compiling apps on Heroku.</p><ol><li>Sign Up on <a href="http://heroku.com/">Heroku</a></li><li>Download and install the <a href="https://devcenter.heroku.com/articles/heroku-cli">Heroku Command Line Interface (CLI)</a>.</li></ol><p>The Heroku CLI uses the terminal to easily create and manage the Heroku app.</p><p><strong>NOTE:</strong> Heroku depends on git so ensure you have git installed.</p><p>3. Navigate to the root folder of your Laravel 8 application from the command line.</p><p>4. Create a Procfile in the root folder.</p><p>The Procfile is used to define the processes that are to be executed when the app starts up. This includes specifying where the app server resides and commands to run during app release.</p><p><strong>NOTE: </strong>The Procfile should be named as Procfile without any extension such as .txt and following the letter casing. Procfile.txt or procfile are not valid names.</p><p>5. In the Procfile, insert this line of command</p><pre>web: vendor/bin/heroku-php-apache2 public/</pre><p>This command points the server Heroku automatically creates to the public/ folder where the Laravel content is to be served from. By default, it assumes the content is served from the root folder.</p><p>In the Procfile, you can specify a start up script to execute. For instance, you can run a bash script which contains commands to migrate and seed your database. <a href="https://www.youtube.com/watch?v=l2nD7oJaWpk&amp;list=PLIddmSRJEJ0sEY38mRTqiOJ4ivvymm_Ej&amp;index=16">See this tutorial</a></p><p>6. It is assumed that you have been using git and have been pushing your code to github or any other source code repositories. If not, initialize the project by executing this command in the root of the folder.</p><pre>git init</pre><p>To add the untracked files, use</p><pre>git add *</pre><p>To create a commit, use</p><pre>git commit -m “new commit”</pre><p>7. Next, log into Heroku using the command</p><pre>heroku login</pre><p>8. Your default browser will pop-up with this login screen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*K_dBZnepx2IPopgw6OHWRg.png" /><figcaption>Log in screen for CLI</figcaption></figure><p>9. After filling your details, you can then return to the CLI to issue more commands.</p><p>10. Since the React components of the Laravel +React application needs to be built, run this command to compile the React application.</p><pre>npm run production</pre><p>11. To prepare the Laravel application for production, execute these commands.</p><pre>composer install --optimize-autoloader --no-dev</pre><p>This command optimizes the composer autoloader class map. Check the <a href="https://laravel.com/docs/8.x/deployment">Laravel documentation</a> for details.</p><p>The cache, routing, and view of the Laravel app needs to be optimized using separate commands however, you can do all of these using</p><pre>php artisan optimize </pre><p>or</p><pre>php artisan optimize:clear </pre><p>If you are using Telescope, you may get an error such as</p><pre>In TelescopeServiceProvider.php line 10:</pre><pre>Class ‘Laravel\Telescope\TelescopeApplicationServiceProvider’ not found</pre><p>This could be because you installed Telescope without the — dev flag.</p><p>To resolve this error, change the APP_ENV variable in the env file to</p><pre>APP_ENV=production</pre><p>Then run this command</p><pre>php artisan config:clear</pre><p>Then run the php artisan optimize command again.</p><p>12. Next, add the files generated to git and commit the changes.</p><pre>git add *</pre><pre>git commit -m “prepared for production”</pre><p>13. Next, create the app on heroku using the CLI. The command syntax is heroku create &lt;app-name&gt;. That is if the app name is Doodle, you can create the heroku app using</p><pre>heroku create Doodle</pre><p>14. Generate a new application key for Laravel using</p><pre>php artisan key:generate --show</pre><p>Then copy the key into this command</p><pre>heroku config:set APP_KEY= &lt;The copied Key&gt;</pre><p>This sets the APP_KEY environment variable. Copy the key together with the “base64:”.</p><p>15. To set logging, use this command</p><pre>heroku config:set APP_LOG=errorlog</pre><p>This makes the application logs generated to be stored on heroku and not on the default Laravel log file.</p><p>16. You can now push your code from the local branch to the heroku master branch using</p><pre>git push heroku master</pre><p>If the branch you want to push from to the heroku master branch is not called master, use</p><pre>git push heroku &lt;branch_name&gt;:master</pre><p>17. With that, you have successfully deployed the Laravel website.</p><p>18. You might encounter an error where on opening the app url, it shows a blank page despite showing the title of the page on the browser tab. Use the key press combination</p><pre>Ctrl+Shift+U</pre><p>to open the console and inspect the Javascript output.</p><p>It may show errors like</p><pre>Mixed content or Requesting for an insecure content http://yourApp.herokuapp.com while using secure domain https://yourApp.herokuapp.com</pre><p>To solve this, set the ASSET_URL environment variable in heroku settings to the secure version of your website heroku domain. This error occured because the asset() helper was used and it uses http not https by default.</p><pre>ASSET_URL=https://yourApp.herokuApp.com</pre><p>You can read more on deploying your Laravel app on Heroku through these links:</p><ul><li><a href="https://masteringbackend.com/posts/deploy-laravel-to-heroku/">Deploying Laravel to Heroku</a></li><li><a href="https://betterprogramming.pub/hosting-your-laravel-app-on-heroku-198764167a85">Hosting Your Laravel App on Heroku</a></li><li><a href="https://devcenter.heroku.com/articles/getting-started-with-laravel">Getting Started with Laravel on Heroku</a></li><li><a href="https://www.geeksforgeeks.org/how-to-upload-laravel-app-to-heroku-cloud-application-platform/">How to upload Laravel App to Heroku Cloud Application Platform - GeeksforGeeks</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57221dd141e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Take a step back … and think]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/take-a-step-back-and-think-c867042c6a35?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/c867042c6a35</guid>
            <category><![CDATA[character]]></category>
            <category><![CDATA[coronavirus]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[rush]]></category>
            <category><![CDATA[think]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Sat, 30 May 2020 10:52:40 GMT</pubDate>
            <atom:updated>2020-05-30T10:52:40.100Z</atom:updated>
            <content:encoded><![CDATA[<h3>Take a step back … and think</h3><p>The rush is amazing. The thrill to get the task done as fast as possible with whatever tool. We like to rush things: our breakfast, prayer, commute, and even sleep. Rushing seems to now be on the decline due to the coronavirus pandemic but may pick up once it is over. But why rush? Is the rush worth it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*voCiPrWhYaE6AqJ5" /><figcaption>Photo by <a href="https://unsplash.com/@ling_gigi?utm_source=medium&amp;utm_medium=referral">Gigi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Rushing indicates a lot of things about a person’s personality. A person who rushes always may</p><ol><li>lack the ability to plan.</li><li>not have a priority.</li><li>allow others dictate what needs to be done per time.</li><li>have no goal in mind and can’t manage time.</li></ol><p>Sometimes, some things are just unplanned and need to be treated with utmost urgency. Definitely, those things may arise but not always.</p><p>Taking a step back to think through the action to be performed on a task helps to make the whole process clearer and better decisions are made. Today, I had to download sci-kit learn into a network simulation in GNS3. However, the terminal could not accept the latest version of sci-kit learn because it used python 3.5. The first option that popped up in my head was to upgrade the version of python which I quickly realized would mean lots of time lost. How did I know? I had done it before and it was not palatable. So I had to think through and chose to download a lower version of sci-kit learn that supports python 3.5. Within few minutes, I was through.</p><p>If I had taken the route of upgrading the version of python, I would not have written this article now. I would probably keep on trying to make other modules work due to the change in python version. Take a step back and think the situation through.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c867042c6a35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dilemma of Getting Started]]></title>
            <link>https://medium.com/@akanjioluwatobishadrach/dilemma-of-getting-started-e3f269919c9?source=rss-1c3d48a843ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3f269919c9</guid>
            <category><![CDATA[begin]]></category>
            <category><![CDATA[courage]]></category>
            <category><![CDATA[starting]]></category>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[experience]]></category>
            <dc:creator><![CDATA[Oluwatobi Akanji]]></dc:creator>
            <pubDate>Thu, 28 May 2020 11:30:09 GMT</pubDate>
            <atom:updated>2020-05-28T11:30:09.864Z</atom:updated>
            <content:encoded><![CDATA[<p>Beginning something most time takes as much courage as sustaining the tempo when it is being done. I have also faced challenges starting things which I consider new based on the portfolio of things which I have done. It is not easy getting started but once you do, things take shape as time progresses.</p><p>For a butterfly,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AvBezXh4_ZCyN1lA" /><figcaption>Photo by <a href="https://unsplash.com/@scw1217?utm_source=medium&amp;utm_medium=referral">Suzanne D. Williams</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>it looks beautiful but it had to get started. Stepping out of its cocoon from its pupa stage wasn’t easy but it strengthened its wings. It may not be easy but it is the experience that you obtain from it that matters. Start the task one at a time. Don’t shove the whole work down your throat. For a nest of ants to dismantle a carcass, it takes one bite at a time through collective effort. Your fears may hinder you, but that does not mean you are doing better by not getting started.</p><p>Get the experience; get started.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3f269919c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>