<?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 Xavier Mirabelli-Montan on Medium]]></title>
        <description><![CDATA[Stories by Xavier Mirabelli-Montan on Medium]]></description>
        <link>https://medium.com/@xaviemirmon?source=rss-351b6900c928------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*I6A7C6k64gMTvSCfLWVF6w.jpeg</url>
            <title>Stories by Xavier Mirabelli-Montan on Medium</title>
            <link>https://medium.com/@xaviemirmon?source=rss-351b6900c928------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 09:43:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@xaviemirmon/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[Effortless content editing: how Puck makes the complex—simple and flexible]]></title>
            <link>https://blog.xavie.mirmon.co.uk/effortless-content-editing-how-puck-makes-the-complex-simple-and-flexible-16cceed3875c?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/16cceed3875c</guid>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[puck]]></category>
            <category><![CDATA[platform]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[page-builder]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Wed, 03 Apr 2024 13:19:39 GMT</pubDate>
            <atom:updated>2024-04-03T13:19:39.021Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past few years, web development has accelerated like never before. I witnessed first-hand the impacts of COVID on businesses and how digital strategies were required to adapt overnight. Once thriving, brick-and-mortar operations needed to pivot overnight and move to digital. The goal became enabling our customer&#39;s websites, allowing them to pivot at a moment&#39;s notice and not sacrifice quality.</p><p>Around five years ago, solutions emerged to bridge this gap for SMEs and enterprises, such as Acquia Site Studio (which I’m most familiar with), Elementor, Builder.io, and React Bricks, to name a few. As great as all these solutions are and the speed of launch is incredible (<a href="https://www.acquia.com/resources/case-studies/15below">my former team built a site that would’ve taken three months in 10 days</a>), they all appear to suffer from a crucial drawback. To operate, they all require a subscription and use a black-box API, which creates a level of business risk.</p><h4>Enter Puck…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VoITcCuP6-UYbBih2SFZEA.png" /></figure><p>In September 2023, this all changed with a new open-source project called Puck. Puck is a react-based page-building solution that allows you to bring your first-party components into a drag-and-drop environment. It&#39;s an absolute game-changer!</p><p>This quote from simow sums it up nicely</p><blockquote>Wow, I’ve seen so many of these kinds of things over the years but this one is really special: extremely intuitive design, really powerful and flexible, and MIT licensed too. Super impressed. <br>— simonw<br><a href="https://news.ycombinator.com/item?id=37391848">https://news.ycombinator.com/item?id=37391848</a></blockquote><h3>Introduction to Puck</h3><p>Adding Puck to your React app opens a new world of content editing possibilities. Straightaway, you have a simple, easy-to-use UI that intuitively lets you drag and drop, rearrange, and edit your React components. It provides an editorial layer that can be built with consistencies in mind. The engineering team can build the UI to interact similarly even if multiple backend systems are used. So, non-technical only have to learn and be onboarded once without needing to understand the minutiae of your business&#39;s backend systems.</p><p>Behind the scenes, Puck has a robust JSON model, which makes integration to and from other content management systems incredibly straightforward. Puck leverages the core React functionality and first-party components, meaning existing libraries and design systems are easily used without much additional effort. An added advantage to this approach is simplicity — without the additional API layer, there is no need for complex data migrations. All you’re required to do is map the data to your React components.</p><p>Puck also has a customisable field architecture, a robust plugin system, and a composable approach for the UI and behaviours. It’s very modular and can be adapted easily to a bespoke page-building experience. For example, I’ve been leading a project using Puck as an alternative to Storybook for building a design system.</p><p>As they say, “actions speak louder than words,” here’s a quick demo.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4gILnWIOQq4&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4gILnWIOQq4&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2F4gILnWIOQq4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b3b1af15e03580814546009fdf16472/href">https://medium.com/media/3b3b1af15e03580814546009fdf16472/href</a></iframe><p>The demo above shows some of the main features of Puck:</p><ul><li>Editing the page title</li><li>The SEO heading hierarchy warning</li><li>Dragging and creating components on the page</li><li>Editing components</li><li>Dragging and creating a grid layout</li><li>Publishing changes</li><li>Undo/Redo</li></ul><p>If this has piqued your interest, there are some other pages which are worth delving into further to understand Puck:</p><ul><li><a href="https://measured.co/blog/building-a-react-page-builder-an-introduction-to-puck">Building a React Page Builder: An Introduction to Puck</a></li><li><a href="https://puckeditor.com/">Puck - The open-source visual editor for React</a></li><li><a href="https://demo.puckeditor.com/edit">Editing: /</a></li></ul><h3>Why low-code?</h3><p>Some of you might be asking. What’s the big deal about low-code, and why am I advocating it? Low code makes editing more accessible to non-technical users such as marketers and CMS editors. It gives them access to building blocks, enabling them to build website pages quickly.</p><p>Low-code website building has been around for a while, with Squarespace, Wix, and Weebly providing massive flexibility. However, this concept has taken longer to become available to more significant sites and platforms (for SMEs and enterprises). Bigger businesses require more governance and UI consistency, using a pre-built design system or adhering to specific branding guidelines. The challenge has been how your web platform provides enough flexibility not to stunt non-technical users&#39; creativity while maintaining your brand’s integrity.</p><p>When discussing low-code with others, I am often asked if low-code eliminates the need for developers. Having worked with low-code for nearly half a decade now, I can say that while it’s disruptive and transformative, developers are very much required to continue to build and evolve these low-code products. More often than not, it allows developers to expand their focus into new territories and the platform as a whole rather than getting bogged down in the little details.</p><h3>Conclusion</h3><p>Moving to a modular/component-based development approach makes your codebase more flexible and reuseable. Transitioning away from strictly defined templates to using reusable components is far more efficient, making more code sharable and reusable. Expanding this into a design system and platform, the scale compounds the positive ROI. Reducing the barrier to entry of your tooling means more of your teams can be involved earlier in a project, and your organisation can go further quicker.</p><p>Puck is a very exciting project because it offers new opportunities that have never been offered before. Previously, adding low code to your project provided benefits, but it had limitations around licencing and data models, which were deal breakers for many businesses.</p><p>If this is interesting to you and your business, please reach out to me <a href="https://www.linkedin.com/in/xavier-mirabelli-montan-5633203b/">on LinkedIn</a>. I’d love to chat about how I can help!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16cceed3875c" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/effortless-content-editing-how-puck-makes-the-complex-simple-and-flexible-16cceed3875c">Effortless content editing: how Puck makes the complex—simple and flexible</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MacOS users beware! AMOS Trojan]]></title>
            <link>https://blog.xavie.mirmon.co.uk/macos-users-beware-amos-trojan-2f03c0848b1f?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f03c0848b1f</guid>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[macos]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 16:41:22 GMT</pubDate>
            <atom:updated>2023-10-30T22:48:20.815Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gic2VDxj1eJryQBL" /><figcaption>Photo by <a href="https://unsplash.com/@jackson_893?utm_source=medium&amp;utm_medium=referral">Michael Geiger</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A couple of weeks ago, I experienced a first — a trojan horse on MacOS, and it wasn’t pretty…</p><p>As a lifetime MacOS user, I’ve always rested comfortably knowing that hackers generally target Windows over MacOS. That said, I’ve always installed AV as an added precaution as I know that in my line of work doing web development, there is often extra low-level access to the OS required.</p><p>I decided to organise myself for a recent project using the Notion app. As usual, I went to Google and typed “Notion Mac app.” There was a sponsored link in the results list, which I clicked on and downloaded the .dmg installer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*VqAklPi407nvhu7nR1J9yQ.png" /></figure><p>I opened the installer, which looked strange as it was missing some of the branding, but I didn’t think much of it and installed it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*-N1DeCjdwxj9fgkW.jpg" /><figcaption>An example installer for the Trading View app</figcaption></figure><p>Voilà installed right? Wrong—this is where the true horror and shock began!</p><p>I was “fortunately” alert to the fact that something wasn’t right when a terminal window opened and displayed some errors. This behaviour is entirely unexpected for a standard MacOS installer.</p><h3>Investigating the file</h3><p>Feeling that something was off, I ensured that my antivirus was up to date and put this file through a scan—no results. I then remembered from one of my favourite podcasts, Darknet Diaries, that there was a tool for uploading new virus signatures called ‘<a href="https://www.virustotal.com/gui/home/upload">Virus Total</a>.’ I uploaded the installer file there and it came back with the label of ‘trojan.stealer/amos’ so I had proof that I’d indeed been compromised.</p><h3>Removing the virus</h3><p>Rather alarmingly, at the time of this compromise, on 21st August 2023, I’d found only two antivirus tools (despite it being covered in the news in April 2023) Avast and AVG tools included this in their scans. I opted to install the latter, and it found and removed the trojan from my machine.</p><h3>How did I get duped?</h3><p>With the virus safely removed, I wondered how I downloaded it. The page I went to looked exactly like the Notion homepage. Luckily, I had the webpage still open, so I tried to see if there were any warning signs. Sh*t! the URL was <strong>https://notio.pw/</strong>?utm_campaign=CjwKCAjwloynBhBbEiwAGY25dEvBN5EbUsSvZIuvi2NQTrQH9IT9lsN2e3ztaoaiqXd1C_H3SYAoAhoCzvQQAvD_BwE&amp;utm_term={keyword}&amp;utm_medium=tm&amp;lpurl=https://www.notion.so/help/guides<br> Not <strong>https://notion.so,</strong> which is the domain for Notion.</p><h4>Was the Notion site compromised?</h4><p>I clicked on an ad with the link pointing to <a href="https://notion.so/">https://notion.so</a> and not .pw, so how did I get to the scammers&#39; site? Looking into the Notion site, it’s built using Next.js and Contentful, which is a relatively secure setup yet not completely impervious to vulnerabilities. I don’t think it came from there, but rather, the Ad itself and Google didn’t correctly verify the link was indeed pointed to the correct domain. <a href="https://redirect.viglink.com/?format=go&amp;jsonp=vglnk_169642162365113&amp;key=c1c7d488bb2df8a8b659d5d41634d304&amp;libId=lnbplafq010023dg000ULba5vadv1&amp;loc=https%3A%2F%2F9to5mac.com%2F2023%2F09%2F06%2Fmac-hit-by-atomic-stealer-malware-with-search-ads%2F&amp;v=1&amp;out=https%3A%2F%2Fwww.malwarebytes.com%2Fblog%2Fthreat-intelligence%2F2023%2F09%2Fatomic-macos-stealer-delivered-via-malvertising&amp;ref=https%3A%2F%2Fwww.google.com%2F&amp;title=Mac%20users%20hit%20by%20Atomic%20Stealer%20malware%20via%20malicious%20Google%20Search%20ads%20-%209to5Mac&amp;txt=researchers%20at%20Malwarebytes">An article on Malwarebytes</a> corroborates that what I’ve experienced is accurate, and the package is spread through ‘malvertising.’ To further that suspicion, the URL above contains this ‘&amp;lpurl=https://www.notion.so/help/guides’ query parameter at the end. The “lpurl” was the one that was displayed on the Google Ad I had clicked on, which was a legitimate Notion URL before it redirected me to the compromised site.</p><h3>What is the AMOS Stealer?</h3><p>The Atomic MacOS (AMOS) stealer is a sophisticated trojan horse virus which goes after your saved passwords, browser history/sessions and crypto wallets. It masquerades itself popular apps such Trading View, Notion, and Photoshop CC.</p><p>AMOS is licensed for $1000/m. via a private telegram channel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*PwbsngoN9M7EsWji" /><figcaption>Telegram channel | source: <a href="https://9to5mac.com/2023/04/28/atomic-macos-stealer-malware-steal-passwords/">https://9to5mac.com/2023/04/28/atomic-macos-stealer-malware-steal-passwords/</a></figcaption></figure><p>The <a href="https://9to5mac.com/2023/04/28/atomic-macos-stealer-malware-steal-passwords/">9-to-5 Mac article</a> does a great job of illustrating everything possible with AMOS.</p><h3>Stemming the flow of damage</h3><p>Knowing that I had been compromised, removing the virus wasn’t good enough. There were some extra steps I needed to do to minimise the damage.</p><h4>Report the ad</h4><p>The first thing I needed to do was get Google to remove the Ad. To do this, I clicked on the ellipsis icon of the sponsored result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*mmWq_lAuL32bNRQIZ_bvEg.png" /></figure><p>Then reported the ad to Google</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*e_NdSa1kjkRpVwZj1-O3VQ.png" /><figcaption>This is a legit ad, but it shows where to report</figcaption></figure><h4>Perform a whois and report abuse</h4><p>You can try reporting the malicious activity of a domain/server to its host by performing a whois lookup on <a href="https://whois.domaintools.com/">DomainTools</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*8LFxtRehiR8b5d8kwd41nw.png" /></figure><p>When sending an email to the registrar, I recommend using an anonymous email service such as <a href="https://proton.me/mail">ProtonMail</a>, as you can never be sure who is on the other side.</p><h4>Change your passwords and enable TFA</h4><p>Luckily, I use 1Password to manage my passwords. This meant my passwords were encrypted at rest in the vaults. However, I reset them all without knowing what was potentially stored in my MacOS keychain or Chrome auto-fills. As an additional precaution, I added two-factor authentication on sites that supported it.</p><h3>A note about Facebook…🤬</h3><p>I noticed that Facebook Ads had been created and users had been added to my accounts. I was flooded with emails like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*LCJ2VVZypHbRNZWL9PcjXQ.png" /></figure><p>It wasn’t until I enabled TFA that the flow of adding users stopped, indicating that the active session included in the compromise still persisted despite changing all my passwords and resetting the sessions.</p><p>The ads created were for a business in Vietnam, which is geographically about as far away from me as possible, and I’ve never had any previous interaction before or since. This fraudulent activity to Meta was met with this response nearly four weeks later.</p><blockquote>Thanks for contacting Meta.</blockquote><blockquote>Because our records do not indicate suspicious activity on your account, we will be unable to refund your purchase in this case. When you completed your purchase, you agreed to our Terms and Conditions by clicking the ‘Place Order’ button. Our Payment Terms are always available at <a href="https://www.facebook.com/ix_communication_platform/link_click_redirect/?REDIRECT_URI=https%3A%2F%2Fwww.facebook.com%2Fpayments_terms%2F&amp;data=ATO1WoYlhwxOgAJ-JSkSGOPB_ovQTkZvFROxANhITycbIa9c2fpkNfeWijPr5mfLv10t2WLPTy0voXN8Dadi2K5HGyw1LBTxbI7z_giPZhmLjueRSpR3mHsvIAk4870dIKgyhDcjmlplO1Bf0iosKtp4UEPQVojw9zlHH3VuAP4HmIY">http://www.facebook.com/payments_terms/</a>.</blockquote><blockquote>If you feel the amount you were charged for is incorrect, please follow this form while logged into the account you advertise with: <a href="https://www.facebook.com/ix_communication_platform/link_click_redirect/?REDIRECT_URI=https%3A%2F%2Fwww.facebook.com%2Fhelp%2Fcontact%2F649167531904667&amp;data=ATPGjfvcHOc-BriIc2lv97yvyXcCY5tYzzncoUT9-dNqraPi_JnJgYXiRkY85OAc0J3Bn1x9SIsUnx13w2e7PwhdTEt5kTHTmdeVNqVEm1xO2_NgTcOXIVfCW-2L2wDnBubniw1K_8Z4mpMK9sMseoKexUGsLX18rlC5wZdLbAyoFi0">https://www.facebook.com/help/contact/649167531904667</a></blockquote><blockquote>You can also learn how to secure your account here: <a href="https://www.facebook.com/ix_communication_platform/link_click_redirect/?REDIRECT_URI=https%3A%2F%2Fwww.facebook.com%2Fhelp%2F203305893040179&amp;data=ATMGSUXIiGCOI5yztPhkJbhDm9KNonjqVIK_4tE-XqxhHXWKsd4E0eY9lxnZRwBYIfG6QzsOnWUqLLm_sZTJtHGRODCd9Ci5dPcbtyXndKbulnEt075nHjYRVndEJT5w_Yz2UwYVxsnf1m0XSCBywvvMiXulh6ap_uDaSKAD0QEO6io">https://www.facebook.com/help/203305893040179</a></blockquote><blockquote>Thank you for understanding,</blockquote><p>Unfortunately, they closed my request despite following up, and I had to go directly to my bank to resolve this issue.</p><h3>Conclusion</h3><p>MacOS is definitely not without malware anymore. The AMOS Stealer is here, and it’s nasty. Users of Apple products need to be extra vigilant now to ensure that they remain malware-free. I consider myself quite tech-savvy, yet I still got stuck by this nastiness. There are a few precautions that I advise you to take that I am doing myself now:</p><ol><li>Double-check the URL of the site.</li><li>If something doesn’t look right, don’t install it!</li><li>Install a good AV (in this case, AVG or Avast)</li><li>Keep your passwords in a dedicated manager that is encrypted at rest (I recommend using Bitwarden or 1Password).</li><li>Turn on TFA.</li><li>Lock down your Facebook account where possible by removing app access, saved credit card details, and ad accounts.</li><li>Change away from Google and use another search engine.</li></ol><p>I hope this provides a good warning call for MacOS users, and if you use a Mac, you should think twice before clicking install.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f03c0848b1f" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/macos-users-beware-amos-trojan-2f03c0848b1f">MacOS users beware! AMOS Trojan</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Farewell Gatsby — it’s been one heck of a ride.]]></title>
            <link>https://blog.xavie.mirmon.co.uk/farewell-gatsby-its-been-one-heck-of-a-ride-cd18b91b0020?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd18b91b0020</guid>
            <category><![CDATA[next]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[gatsby]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Thu, 28 Sep 2023 16:45:11 GMT</pubDate>
            <atom:updated>2023-09-28T16:45:11.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>Farewell Gatsby — it’s been one heck of a ride.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t3ZPS4Dl3zZZTsNR" /><figcaption>Photo by <a href="https://unsplash.com/@vous?utm_source=medium&amp;utm_medium=referral">Bobby Johnson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In February, Netlify announced its <a href="https://www.netlify.com/press/netlify-acquires-gatsby-inc-to-accelerate-adoption-of-composable-web-architectures/#main">acquisition of Gatsby.js and Gatsby Cloud</a>. I was initially optimistic that this move was going to be a merger of two great players in the JAMstack space and a win-win for everyone. However, it appears to me that this was the beginning of the writing on the wall for the framework I’ve so loved and advocated for for nearly half a decade now.</p><p>Netlify assures us they are continuing to support and develop the Gatsby project. While this is true to a degree, some additional factors make this statement a bit thinly veiled to me.</p><h3>Velocity has slowed</h3><p>It only takes a look at the Github insights to gain a picture of how much development has slowed. It seems Netlify kept things going for a few months but now it’s dwindled down to next to nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4ls_bPzwEhemjmao1oCTw.png" /><figcaption>Gatsby Github commits in last year</figcaption></figure><h3>Founders no longer involved</h3><p>Gatsby’s co-founders Kyle Mathews and Sam Bhagwat are no longer with Netlify or contributing to the project. In addition to these key losses, critical members of the Gatsby team have been made redundant.</p><h3>Innovation is faltering</h3><p>Aside from adaptors, there isn’t really anything released of note. This time last year was the launch of <a href="https://www.gatsbyjs.com/gatsby-5/">Gatsby 5</a> which included great features such as partial hydration, Slices, GraphiQl v2, Head and Script components. A year later, there isn’t really much of note.</p><h3>What’s next?</h3><p>Well, Gatsby’s been an amazing launchpad into the world of React. So, I’ll be focussing my efforts building on the best frameworks for React. Currently, that leads me to Next.js but there are also a lot of new exciting projects in this space (Remix, Astro, etc.). While I do believe Netlify will continue to maintain and support Gatsby for a while to come, I can’t recommend you start your next project with it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd18b91b0020" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/farewell-gatsby-its-been-one-heck-of-a-ride-cd18b91b0020">Farewell Gatsby — it’s been one heck of a ride.</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading my blog to Gatsby 5]]></title>
            <link>https://blog.xavie.mirmon.co.uk/upgrading-my-blog-to-gatsby-5-264158f1a525?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/264158f1a525</guid>
            <category><![CDATA[upgrade]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[gatsby]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Wed, 16 Nov 2022 13:47:43 GMT</pubDate>
            <atom:updated>2022-11-16T18:39:03.583Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_FzBgY-wvKa7uLa8" /><figcaption>Photo by <a href="https://unsplash.com/@maxchen2k?utm_source=medium&amp;utm_medium=referral">Max Chen</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Gatsby 5 came out last Tuesday and I’ve just completed the upgrade of my blog from Gatsby 4 to Gatsby 5. In the past, this process had been painful and I was left pulling out my hair (something I can’t afford to do — male pattern baldness is real!).</p><p>You can see the results at <a href="https://xavie.mirmon.co.uk/">https://xavie.mirmon.co.uk</a>.</p><p><em>If you are curious about the benefits of upgrading to Gatsby 5 check out my other blog post about </em><a href="https://medium.com/xaviemirmon/gatsby-5-is-coming-fast-gets-faster-f515824dc515"><em>Gatsby 5’s enhancements</em></a><em>.</em></p><p>However, this experience was much simpler than I expected. The upgrade guide is extensive and helped walk me through the different steps required to upgrade. Fortunately for me, I have built my site on top of gatsby-theme-jodie built by a Gatsby core maintainer <a href="https://medium.com/u/dbc4d54987f4">LekoArts</a>. This theme was already ready for Gatsby 5, so I only needed to update any customisations I’d made through shadowing.</p><h3>A note on Gatsby Themes</h3><p>The more I work with Gatsby Themes and shadowing, the more I learn the intricate differences to the likes of contributed plugins/modules on CMS.’ Because we are essentially using Webpack to overlay files on top of one another the process of upgrading can look very different for you. I’ve found that there is extra effort required to update the shadowed files when an underlying file has changed compared to that of Drupal or WordPress. I was fortunate that the theme I use was updated quickly. However, your specific theme’s maintainer might take longer to push out an update so mileage may vary.</p><h3>New Feature! Medium teasers</h3><p>Because this process was so quick, I decided to add a new feature which shows a grid of Medium articles on the homepage. This was built using gatsby-source-medium and the new useStaticQuery hooks approach.</p><figure><img alt="Picture of new posts grid." src="https://cdn-images-1.medium.com/max/1024/1*bB8OchIcL0cFQ9hEK1TyIg.png" /></figure><p>I also used IFTTT to trigger my Gatsby Cloud builds when I publish a new article. 🔥🔥🔥🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=264158f1a525" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/upgrading-my-blog-to-gatsby-5-264158f1a525">Upgrading my blog to Gatsby 5</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gatsby 5 is coming—fast gets faster!]]></title>
            <link>https://blog.xavie.mirmon.co.uk/gatsby-5-is-coming-fast-gets-faster-f515824dc515?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/f515824dc515</guid>
            <category><![CDATA[gatsby]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Thu, 03 Nov 2022 16:00:45 GMT</pubDate>
            <atom:updated>2022-11-03T16:00:45.955Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rjiq5h_kDa0XE4MMR7iAgQ.png" /><figcaption>Gatsby 5 promo image — source: <a href="https://www.gatsbyjs.com/gatsby-5/">https://www.gatsbyjs.com/gatsby-5/</a></figcaption></figure><p>It’s official Gatsby 5 is dropping on November 8th 2022 and I cannot wait! As part of this update, there are many new fixes and improvements (which you can learn all about at <a href="https://gatsby.dev/5)">https://gatsby.dev/5)</a>. However, here are a few that I am most excited about.</p><h3>Slices API</h3><p>With the Slices API, you can now create components that are shared across multiple pages, e.g. headers and footers as a “Slice.” It’s similar to the Pages API, but for shared global components. This is advantageous for two main reasons. 1) When your site is building, rather than needing to build multiple instances of these components it does it once and splices that bundle in where required. 2) If you change one of your “Slices,” the slice itself is the only item that needs to be rebuilt as opposed to all of the pages that contain that component.</p><p>More info:</p><ul><li><a href="https://v5.gatsbyjs.com/docs/how-to/performance/using-slices/">Using Slices | Gatsby</a></li><li><a href="https://v5.gatsbyjs.com/blog/gatsby-slice-api">The Gatsby Slice API: High Precision Incremental Builds | Gatsby</a></li></ul><h3>Partial Hydration (beta)</h3><p>Currently, all pages rendered by Gatsby are “fully hydrated.” This means that static and highly interactive components are all treated equally. Without partial hydration, there is no way to instruct your site to parse or defer behaviours to the client which can lead to larger bundle sizes and time to interactive. Implementing partial hydration keeps your sites super quick!</p><p>More info:</p><ul><li><a href="https://www.gatsbyjs.com/blog/partial-hydration-beta-explained">Partial Hydration (Beta) Explained | Gatsby</a></li><li><a href="https://v5.gatsbyjs.com/docs/conceptual/partial-hydration/">Partial Hydration | Gatsby</a></li></ul><h3>Head API</h3><p>The “Head API” replaces react-helmet when adding SEO tags to the header. This API provides enhanced performance and de-duplication over react-helmet. It’s also incredibly simple to get started with, just add a Head function in your page templates to use this functionality.</p><p>More info:</p><ul><li><a href="https://www.gatsbyjs.com/blog/introducing-the-gatsby-head-api/">Introducing the Gatsby Head API | Gatsby</a></li><li><a href="https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-head/">Gatsby Head API | Gatsby</a></li></ul><h3>GraphiQL v2</h3><p>This is a small but exciting change. Gatsby v5 now includes GraphiQL v2 which contains some much-needed UI enhancements. These enhancements include tabs, dark mode and more.</p><h3>Wrapping up</h3><p>There are a lot more updates that I’ve not covered in this post such as new starters, the Script API, React 18, etc. You can find out more details in the blog post from Gatsby <a href="https://www.gatsbyjs.com/gatsby-5/">here</a>. V5 doesn’t seem to be as vast a product announcement as v4 but I see that as a positive. It’s clear to me that in this update a lot more care and attention has gone into migration paths and upgrades showing that Gatsby is a much more formidable product.</p><p><em>I am curious to know your thoughts. What are you most excited about with this release? Add it in the comments below.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f515824dc515" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/gatsby-5-is-coming-fast-gets-faster-f515824dc515">Gatsby 5 is coming—fast gets faster!</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The future of the CMS in 2022]]></title>
            <link>https://medium.com/@xaviemirmon/the-future-of-the-cms-in-2022-bff7937aeb56?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/bff7937aeb56</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[drupal]]></category>
            <category><![CDATA[dxp]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 15:15:43 GMT</pubDate>
            <atom:updated>2022-09-26T15:15:43.746Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I wrote a post about how in </em><a href="https://blog.xavie.mirmon.co.uk/what-does-a-cms-need-to-be-in-2018-d6ad8e341a1a"><em>2018 the CMS landscape was changing</em></a><em>. This is the promised follow-up post but it’s taken a bit longer than expected to get published 🤣. Fortunately, during this time new tools and terminologies have emerged which make this updated post easier to explain and write!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FDiDKW5-yuQp_8S6" /><figcaption>Photo by <a href="https://unsplash.com/@kmuza?utm_source=medium&amp;utm_medium=referral">Carlos Muza</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In my blog original post, I touched on two key points.</p><ol><li>decoupling presentation from your data source is great.</li><li>But, there is a missing piece which is the editorial experience.</li></ol><h3>Editing websites with ease</h3><p>Low code tools have been around for many years within the WordPress community and tools like Squarespace, Wix, and Weebly. Those aforementioned products are reluctant on the HTML structure and not an underlying fieldable data structure. These tools are great if all you need is a website, quickly, cheaply, and easily. If the requirements for a project expand beyond what is available out of the box or your content needs extend beyond just displaying on a website these solutions quickly aren’t suitable.</p><p>There are some new players on the block, Acquia Site Studio, Uniform, and Builder.io which for the first time have brought the possibility of low code to the enterprise sector.</p><ul><li><a href="https://uniform.dev/">Uniform: The Market-Leading Digital Experience Composition Solution</a></li><li><a href="https://www.builder.io/">Builder.io: Drag and drop Visual CMS</a></li><li><a href="https://www.acquia.com/products/drupal-cloud/site-studio">Site Studio</a></li></ul><h3>Speed to launch like never before</h3><p>Why is low code so important? In my last role, I witnessed first-hand how low-code tools such as Acquia Site Studio page-building can bring a site to market quicker than ever before. On one project, we helped launch over 300 sites in 18 months as opposed to the 60 months originally estimated.</p><ul><li><a href="https://www.acquia.com/resources/case-studies/bayer">Bayer</a></li><li><a href="https://coherence.digital/bayer">Our work - Bayer</a></li></ul><p>Low-code also helped our clients in travel when the pandemic hit. We were able to help rebuild their website, to aid a pivot to their business proposition, launching the new website in 10 days (yes that’s right — days not weeks).</p><p><a href="https://www.acquia.com/resources/case-studies/15below">15below</a></p><h4>The fundamental flaws</h4><p>Low code brings a host of new opportunities and gets us closer to bridging the gaps of the editorial experience that decoupling your CMS brings. Yet at the same time, the existing solutions all seem to suffer from a similar flaw. In order to be viable as a product on their own, low-code tools such as Uniform, Builder.io, and Acquia Site Studio, all require that you subscribe to an API service/platform.</p><p>Needing to subscribe to a hosted API service creates vendor lock-in and requires your data is sent outside of your CMS/data source. This is necessary to create a business model around the product alone. While this is a completely valid approach, it fails to deliver on larger data migrations because the underlying data structure is a black box. Also, in organisations where security and data ownership are key requirements these tools are a non-starter as they need to be sent to the platform API.</p><p><strong>The solution is simple—build your low-code solution based on open first-party data.</strong></p><p>This does mean that you need to look elsewhere for funding for the product such as becoming subject matter experts in the technologies, having additional services offering (such as personalization, content optimisation, hosting, and search), or gaining development efficiencies at scale.</p><h3>Why decouple?</h3><p>Since my original post in 2018 when decoupling was still very much in its infancy, the JAMStack scene has absolutely exploded. With tools such as Next and Gatsby in the picture, it simply doesn’t make sense to <strong><em>not</em></strong> use one of these frameworks. Compared to runtime build languages such as PHP these frameworks provide the following advantages:</p><ul><li>Speed</li><li>Scalability</li><li>Security</li><li>Unified data-layer</li></ul><p>Because they are based on React, you receive the improved rendering capabilities (Virtual DOM) straightaway. You are creating a separation of concerns. Optimizing the backend for backend tasks such as business logic and data manipulation serves as a quick and powerful API. While your presentation layer is optimised for creating the best, most performant user experiences. This is very important because I’ve worked on many Drupal websites where even with the best intentions, the data separation boundaries became blurred (I’m looking at you views-in-views).</p><h4>A world of new opportunity</h4><p>When you move away from the monolithic CMS, you open opportunities to create some fantastic new experiences for your end users. I’ve personally helped create Drupal APIs for billboards in Times Square, immersive spinning experiences, and Echo skills in addition to JAMstack websites.</p><ul><li><a href="https://www.framestore.com/work/digital-signage?language=en">Digital Signage</a></li><li><a href="https://www.imax.com/content/imax-pilot-immersive-indoor-cycling-studio-concept-0">IMAX To Pilot Immersive Indoor Cycling Studio Concept</a></li></ul><h4>Unified data</h4><p>In 2019, Gatsby coined the notion of a “content mesh” which is taking content/data from multiple sources (Drupal, WordPress, Contentful, Shopify, etc.) and distilling them into a single GraphQL data layer. Data unification allows developers to pick and pull information from many different sources but then feed it into one cohesive experience for users.</p><p>It also boosts, performance because (in addition to Static Site Generation) you are fetching the least possible amount of data rather than a complex series of chained queries.</p><h3>Improving the editorial experience</h3><p>One of the key points that I touched on in my last post was fractured and separate experiences when you decouple. All of a sudden you have more than one system and experience to manage. Tools such as Gatsby Cloud and Vercel have worked hard to make this better and now provide preview environments which update as you edit from your CMS. This is much better than the experience we had a few years ago without preview environments but it doesn’t quite go far enough.</p><h4>The “Experience Layer”…</h4><p>In my current role, I’m working on what I’ve dubbed the “Experience Layer.” It is an extension of the existing preview environments that joins the dots between your content and presentation layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WimALpFg6v_UnP_I2YjF4w.jpeg" /></figure><p>As an example of an “Experience Layer,” I’m currently focussing on a true WYSIWYG experience for websites that provides low-code page building for Gatsby. This is using the same React components for editing that are used to power the client-facing website. This solution integrates with the structured data provided by the JSON:API from Drupal and reads/writes the data.</p><p>Currently, the Experience Layer is focused on powering websites. However, in the future, I’m hoping to take this further and power additional experiences such as mobile apps using React Native, digital signage and voice interfaces.</p><h3>The CMS is dead — sort of…</h3><p>The main question here is what is a CMS in 2022? Well, today the lines around the capabilities of a CMS are blurred. Nowadays, client requirements for their digital presence extend much further than merely just having a website. I’ve seen requirements for integrating with PIM, PAM, DAM, CRM, CDP, ERP, Commerce, etc. (if there is an acronym for it a client probably wants it!) All of these integrations are blended together to meet the client’s specific needs and join the dots for their customers. While CMS’ still form a crucial part of this larger landscape, unlike 5 years ago they aren’t the primary part.</p><p>Every client’s needs are slightly different so when building a digital presence, the different functionalities need to be pluggable and modularised. This concept has been around a little while now and is called “composable architecture.” Conceptually, I think of this similarly to the plugin/module systems that exist in CMS’ but with cross-functional and cross-technology capabilities.</p><p>By looking at this broader remit and landscape, it becomes clear that in 2022 the CMS is a small part of the much bigger picture.</p><h4>Enter the world of the Digital Experience Platform (DXP)</h4><p>If in 2022 the CMS doesn’t cut it anymore then what does? Well luckily our friends at Gartner have come up with a new definition:</p><blockquote>A digital experience platform (DXP) is an integrated set of core technologies that support the composition, management, delivery and optimization of contextualized digital experiences.<br>(Gartner — <a href="https://www.gartner.com/en/marketing/glossary/digital-experience-platform-dxp-">https://www.gartner.com/en/marketing/glossary/digital-experience-platform-dxp-</a>)</blockquote><p>DXP is the next evolution of the CMS putting customer experience at the heart of your digital presence. Furthermore, this new world allows content managers to connect data from many more sources and output to many more channels.</p><p>There are many solutions that are aiming to tackle this. However, all solutions that currently exist (including the ones labelled open source), are all stuck behind a walled garden of proprietary code and services.</p><p><strong>I’m on a mission to change that and build a DXP based on open-source.</strong></p><p>If this journey sounds interesting, take a look at a look at a few of my other related posts:</p><ul><li><a href="https://blog.xavie.mirmon.co.uk/monorepos-in-php-89bdae57f221">Cross technology monorepo’s</a></li><li><a href="https://blog.xavie.mirmon.co.uk/running-gatsby-inside-a-docker-container-on-macos-5e98a77787df">Running Gatsby inside a Docker® Container on macOS</a></li></ul><p>And… let’s connect!</p><p>👉 <a href="https://xavie.mirmon.co.uk/">xavie.mirmon.co.uk</a></p><p>👉 <a href="https://twitter.com/xaviemirmon">Follow me on Twitter</a></p><p>👉 <a href="https://www.linkedin.com/in/xavier-mirabelli-montan-5633203b">Connect on LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bff7937aeb56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross technology monorepo’s]]></title>
            <link>https://blog.xavie.mirmon.co.uk/monorepos-in-php-89bdae57f221?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/89bdae57f221</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[drupal-9]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[drupal-development]]></category>
            <category><![CDATA[monorepo]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Tue, 06 Sep 2022 16:40:28 GMT</pubDate>
            <atom:updated>2022-09-26T15:12:32.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iViPs1WFT9_AWhBy" /><figcaption>Photo by <a href="https://unsplash.com/@ilyapavlov?utm_source=medium&amp;utm_medium=referral">Ilya Pavlov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Having worked with React, Gatsby, and other JS frameworks, for the past few years, I’ve become quite accustomed to using monorepos. Whether it be Lerna or Yarn Workspaces, they are commonplace in JS but not very prevalent in PHP frameworks and I’ve not seen any examples in Drupal yet…</p><h3>What is a monorepo?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*ZORRKJxUPdQPK6MxUH-gNg.png" /></figure><p>First off, you might be asking what a monorepo is. That is an excellent question. A monorepo is a single code repository, that releases many packages. The opposite is a “many-repo” where you have a single repo for each package.</p><h3>Who uses monorepos?</h3><p>Monorepos are used across a plethora of different businesses including Symfony, Laravel, Meta, Alphabet, and Microsoft. It is claimed that Windows is actually the world’s largest monorepo currently in existence!</p><h3>Should I use a monorepo?</h3><p>There are many arguments for and against monorepos. I’ve found that it really depends on your specific use case as to whether it is beneficial or not.</p><p>Monorepos are great for managing multiple packages with shared APIs. Need to refactor one package? Easy! Just change your references elsewhere in the repo. Monorepos are also great in that you can share common tooling. Do you have multiple PHP packages that should share the same testing pipelines? Put them all in the same place. In my use case, it’s hugely advantageous to have a monorepo that can share scripts to provision microservices, test them and orchestrate them together.</p><p>Having a monorepo is hugely advantageous for open-source projects or projects like Windows or Facebook that have a lot of interdependencies. They are all or nothing when it comes to cloning the code so good if you are wishing to restrict access to specific packages.</p><h3>Sounds great — how come it’s not really used in PHP?</h3><p>Before we answer that, we need to look at where Monorepos are prevalent — the JS community. If we dig a bit deeper and compare package managers for JS (NPM) and PHP (Composer) there are two fundamental differences, NPM lets you publish without a repo whereas Composer requires it. Every Composer package needs a corresponding repo.</p><h3>Enter [READ-ONLY] repos</h3><p>In order to get this working with Composer, you will need to create a series of “[READ-ONLY]” repos. In GitHub (or your GIT service/server), create a repo for each of your packages that can be synced to Composer. To sync I use the tool created by Fabien Potencier (the creator of Symfony) called <a href="https://github.com/splitsh/lite">SplitSH Lite</a>. This package combined with a <a href="https://github.com/acrobat/subtree-splitter">GitHub Action</a> updates my package repos in real-time.</p><h3>Project structure</h3><p>To manage my monorepo, I have the following folder structure which allows me to mix and match technologies best suited for the project:</p><pre>├── backend</pre><pre>│   ├── packages</pre><pre>│   └── starters</pre><pre>├── docs</pre><pre>├── frontend</pre><pre>│   ├── deprecated-packages</pre><pre>│   ├── packages</pre><pre>│   └── starters</pre><pre>└── scripts</pre><p>Key things to note — regardless of the technology used, I like having the following structure for my applications that live inside the monorepo.</p><h4>Packages</h4><p>Packages are the modular pieces of code that should be separately installed.</p><h4>Starters</h4><p>Starters are a collection of packages that are used together as a starting point for your application.</p><h4>Deprecated Packages</h4><p>Sunsetted packages that may have been previously used but are no longer supported.</p><p>In this example, my project has the following applications/tooling some with packages and services, others without:</p><h4>Backend</h4><p>This is a Drupal web service with a MySQL DB. It contains packages which are custom Drupal modules, themes, profiles, etc. and starters which are differently composed website starter kits. I’ve used the <a href="https://github.com/tmdk/composer-workspaces-plugin">Composer Workspaces</a> plugin to connect the packages and starters together</p><h4>Docs</h4><p>This is a standalone Gatsby docs site.</p><h4>Frontend</h4><p>This is a React/Gatsby application for static site generation for the frontend of the application. It contains packages which are the functionality around page building, design system, the admin UI etc. and starters which are differently composed website starter kits. I’ve used yarn workspaces to connect the packages and starters together</p><h4>Scripts</h4><p>A standalone scripts repo for provisioning, testing, and development utilities.</p><h3>In conclusion</h3><p>Monorepos greatly simplify development in the right context. With the correct tools, we can bring this to PHP libraries/frameworks and deliver truly composable experiences. With the setup outlined above different technologies aren’t a barrier and the tools that are best suited to the job can be used. I’m really excited to move forwards with this approach and join key players in the industry as I develop new tools and products.</p><h3>Further reading</h3><ul><li><a href="https://devblogs.microsoft.com/bharry/the-largest-git-repo-on-the-planet/">The largest Git repo on the planet</a></li><li><a href="https://semaphoreci.com/blog/what-is-monorepo">What is monorepo? (and should you use it?) - Semaphore</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4w3-f6Xhvu8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4w3-f6Xhvu8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4w3-f6Xhvu8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bd09ed725550e4956e250317eacab5aa/href">https://medium.com/media/bd09ed725550e4956e250317eacab5aa/href</a></iframe><ul><li><a href="https://medium.com/@adamhjk/monorepo-please-do-3657e08a4b70">Monorepo: please do!</a></li><li><a href="https://medium.com/@luisvieira_gmr/building-large-scale-react-applications-in-a-monorepo-91cd4637c131">Building large scale react applications in a monorepo</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89bdae57f221" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/monorepos-in-php-89bdae57f221">Cross technology monorepo’s</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Gatsby inside a Docker® Container on macOS]]></title>
            <link>https://blog.xavie.mirmon.co.uk/running-gatsby-inside-a-docker-container-on-macos-5e98a77787df?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e98a77787df</guid>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[gatsby]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Tue, 17 May 2022 11:00:05 GMT</pubDate>
            <atom:updated>2022-05-17T11:00:05.399Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cmrmbt0XmnfQhNRIZj4tNg.png" /></figure><p>If like me, you want to run a Gatsby site using “develop” mode inside a Docker® container on macOS, there are a few things that you need to do first for it to run as expected.</p><h3>Why is any of this necessary?</h3><p>macOS has historically been plagued with performance issues surrounding mounting local filesystems into the containers. The best compromise (and it certainly is a compromise) is to mount your local filesystem as an NFS volume. Doing so improves performance quite a bit over the traditional BIND mount but comes with a caveat. NFS on macOS doesn’t support fsevents. This isn’t a problem for most applications, but when using Gatsby, it’s reliant on fsevents to notify of any changes.</p><p>Docksal which I am using for local development has <a href="https://docs.docksal.io/core/volumes/#overview">a great article</a> that explains the different mount types across OS’ and the compromises/advantages of each.</p><h3>Telling Gatsby it’s in a Docker® environment</h3><p>First off, we need to let Gatsby know that it’s being run inside a container and not just on the host machine as it’s expecting. We need to add the host -h parameter to our startup command to do this and set it to 0.0.0.0. For me this is:</p><p>yarn develop -h 0.0.0.0</p><p>My container isn’t exposing Gatsby’s default port, 8000, but rather 3000. I need to add a port parameter -p to my command for this to be recognised. My final command looks like this:</p><p>yarn develop -h 0.0.0.0 -p 3000</p><p>Voilà—our site now loads in Docker! However, there is a massive problem when we update our files nothing updates 😞.</p><h3>Getting Hot Reloads to work</h3><p>Because we are using NFS, Webpack doesn’t know when to update our files because it’s waiting on the FSNotify event but remember NFS doesn&#39;t support this. Instead, we need to set webpack to poll for these changes to your .js, .jsx, .ts, .tsx, etc. files based on a set number of milliseconds. This is quite easy we just need to add the following config into our gatsby-node.js:</p><pre><em>exports</em>.onCreateWebpackConfig = ({ <em>actions </em>}) =&gt; {<br>  <em>actions</em>.setWebpackConfig({<br>    watchOptions: {<br>      aggregateTimeout: 200,<br>      poll: 1000,<br>      ignored: &#39;**/node_modules&#39;,<br>    },<br>  })<br>}</pre><p>If like me your site is reliant on .md or .mdx files, the changes above won’t help and pickup changes to those files.</p><p>Fear not! the workaround to this is quite easy. The plugins can use Chokidar polling you just need to enable it. The easiest way to do this set the CHOKIDAR_USEPOLLING=true environment variable. Now when we make changes, Gatsby will pick them up and rebuild.</p><p>Finally, we need to configure our site to send these updates to our browser.</p><h3>Notifying our browser of the HMR updates</h3><p>Gatsby uses Hot Module Reloading (HMR) to send the updates from our site to the browser over a socket connection. By default, this is done by exposing a connection over a random port. However, now that our site is running in a container we need to make this predictable. First, we need our container to expose another port, not in use (e.g 5001). Then, we need to add this port as an environment variable INTERNAL_STATUS_PORT=5001</p><p><strong>That’s it! Now if we restart our site everything will behave as expected inside a Docker® container — yay!</strong></p><h3>Wrapping it all up together on Docksal</h3><p>I hope this guide has helped you. If like me you’re using Docksal, the following info adding this (in tandem with the changes to your gatsby-node.js) to your .docksal/docksal.yml file you be up and running quickly!</p><pre>services:<br>  gatsby_site:<br>    hostname: gatsby<br>    extends:<br>      file: ${HOME}/.docksal/stacks/services.yml<br>      service: cli<br>    labels:<br>      - io.docksal.virtual-host=${VIRTUAL_HOST}<br>      - io.docksal.virtual-port=3000<br>    ports:<br>      - &quot;5001:5001&quot;<br>    environment:<br>      - INTERNAL_STATUS_PORT=5001<br>      - CHOKIDAR_USEPOLLING=true<br>    working_dir: /var/www<br>    command: [&quot;bash&quot;, &quot;-lc&quot;, &quot;yarn develop -H 0.0.0.0 -p 3000&quot;]<br>    depends_on:<br>      - cli</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e98a77787df" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/running-gatsby-inside-a-docker-container-on-macos-5e98a77787df">Running Gatsby inside a Docker® Container on macOS</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A note about Gatsby Cloud Preview’s internals]]></title>
            <link>https://blog.xavie.mirmon.co.uk/a-note-about-gatsby-cloud-previews-internals-e05cb6f81b5c?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/e05cb6f81b5c</guid>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[gatsby]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Fri, 21 Jan 2022 17:49:51 GMT</pubDate>
            <atom:updated>2022-01-21T17:49:51.032Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*MhiDESDsxMLzlA1xf8-EeA.png" /></figure><p>It’s been a while since I’ve used Gatsby Cloud Preview for reviewing my sites. I recently ran into an issue that caught me a bit off guard. My site was working flawlessly on my local setup using gatsby develop. However, as soon as I pushed my site to Gatsby Cloud it built but then loaded a white screen on my SSR pages. I checked the logs and there weren’t any errors, hmmm… 🤔.</p><p>Through some debugging (and it was also confirmed on a Gatsby webinar), I found out that <strong>Gatsby Cloud Preview is no longer powered by the </strong><strong>gatsby develop command but an optimised version of </strong><strong>gatsby build and </strong><strong>gatsby serve.</strong></p><p>When I ran gatsby build &amp;&amp; gatsby serve I was able to see there were some issues with my SSR pages needing the window when being compiled and because the page was being SSR’d the window wasn’t available.</p><p>More on that <a href="https://medium.com/@xaviemirmon/using-window-with-gatsbys-runtime-ssr-mode-ab6a6d42e20a">here</a></p><p>If you’re using Gatsby Cloud and notice odd behaviours that</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e05cb6f81b5c" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/a-note-about-gatsby-cloud-previews-internals-e05cb6f81b5c">A note about Gatsby Cloud Preview’s internals</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using “window” with Gatsby’s runtime SSR mode]]></title>
            <link>https://blog.xavie.mirmon.co.uk/using-window-with-gatsbys-runtime-ssr-mode-ab6a6d42e20a?source=rss-351b6900c928------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab6a6d42e20a</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[gatsby]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[Xavier Mirabelli-Montan]]></dc:creator>
            <pubDate>Fri, 21 Jan 2022 17:47:14 GMT</pubDate>
            <atom:updated>2022-01-24T10:00:55.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OD8BTN6gD9QRq1H5aKJMfg.jpeg" /></figure><p>I’ve been working with Gatsby v4 and it’s been awesome! For those of you who aren’t already aware, Gatsby v4 <a href="https://www.gatsbyjs.com/docs/conceptual/rendering-options/">introduces two exciting new render modes</a> in addition to the already powerful Static Site Generation (SSG), Deferred Static Generation (DSG), and Server Side Rendering (SSR).</p><p>DSG is great to decrease your build times if you have a lot of pages that aren’t receiving much traffic useful for your SEO rankings.</p><p>SSR is something I’ve been playing around with as it is perfect for fetching and shaping data in real-time without impacting the client’s browser performance. This is great if you have a dashboard or a page builder that requires a fresh initial data fetch on load.</p><p>Under the hood, Gatsby will find page templates containing the getServerData() and render them server-side when the page is requested. This functionality behaves like the SSR that happens at build time but at runtime.</p><p><strong>If any of the code used in your page template relies on the browser e.g. </strong><strong>window then you will need do a check that it’s available.</strong> Otherwise, you will get a bunch of nasty “Window is undefined” errors during the gatsby serve process. To add to the confusion, they won’t be present on gatsby develop so it’s only when you are deploying that your site will stop working — boo!</p><p>It’s to fix as outlined <a href="https://www.gatsbyjs.com/docs/debugging-html-builds/#how-to-check-if-window-is-defined">here</a>. Or my preferred option is a simple short-circuit.</p><pre>const isBrowser = typeof window !== &quot;undefined&quot;</pre><pre>export default function MyComponent() {</pre><pre>let loggedIn = false</pre><pre>isBrowser &amp;&amp; window.localstorage.getItem(&quot;isLoggedIn&quot;) === &quot;true&quot;</pre><pre>return &lt;div&gt;Am I logged in? {loggedIn}&lt;/div&gt;</pre><pre>}</pre><p>I’ve raised a Github issue to help make the docs a bit clearer but for now the solution above does the trick!</p><p><a href="https://github.com/gatsbyjs/gatsby/issues/34519">New SSR Render Mode Documentation Unclear · Issue #34519 · gatsbyjs/gatsby</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab6a6d42e20a" width="1" height="1" alt=""><hr><p><a href="https://blog.xavie.mirmon.co.uk/using-window-with-gatsbys-runtime-ssr-mode-ab6a6d42e20a">Using “window” with Gatsby’s runtime SSR mode</a> was originally published in <a href="https://blog.xavie.mirmon.co.uk/">Xavier Mirabelli-Montan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>