<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Erwin Otten</title>
    <description>The latest articles on DEV Community by Erwin Otten (@erwin).</description>
    <link>https://dev.to/erwin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F830500%2Ff8b293da-fe50-448c-8a92-105119b50e03.png</url>
      <title>DEV Community: Erwin Otten</title>
      <link>https://dev.to/erwin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/erwin"/>
    <language>en</language>
    <item>
      <title>Building a React.js, Next.js Magento 2 PWA with GraphCommerce</title>
      <dc:creator>Erwin Otten</dc:creator>
      <pubDate>Fri, 18 Mar 2022 15:08:19 +0000</pubDate>
      <link>https://dev.to/erwin/building-a-reactjs-nextjs-magento-2-pwa-with-graphcommerce-479g</link>
      <guid>https://dev.to/erwin/building-a-reactjs-nextjs-magento-2-pwa-with-graphcommerce-479g</guid>
      <description>&lt;p&gt;&lt;a href="https://www.graphcommerce.org/"&gt;GraphCommerce&lt;/a&gt; is a front-end framework used for building headless Magento e-commerce storefronts in React.js.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install and use node 14: &lt;code&gt;nvm install 14 &amp;amp;&amp;amp; nvm use 14&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install yarn: &lt;code&gt;npm install --global yarn&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;git clone git@github.com:graphcommerce-org/graphcommerce.git&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mkdir my-project&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp -R graphcommerce/examples/magento-graphcms/. my-project&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd my-project&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp -R .env.example .env&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rm CHANGELOG.md &amp;amp;&amp;amp; touch CHANGELOG.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rm -rf node_modules &amp;amp;&amp;amp; rm -rf .next&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Edit /package.json. Delete &lt;code&gt;"scripts": {...}&lt;/code&gt; and rename &lt;code&gt;scripts_local&lt;/code&gt; to&lt;br&gt;
&lt;code&gt;scripts&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start the development environment&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;yarn&lt;/code&gt; Install the dependencies&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yarn codegen&lt;/code&gt; Converts all .graphql files to typescript files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yarn dev&lt;/code&gt; Run the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Visit the development environment running at &lt;a href="http://localhost:3000"&gt;http://localhost:3000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it! GraphCommerce includes Magento-specific React components, pages, and utilities for building a high-end Magento PWA storefront.&lt;/p&gt;

&lt;p&gt;👉 To connect to your own Magento backend, refer to the &lt;a href="https://www.graphcommerce.org/docs/getting-started/create"&gt;GraphCommerce installation instructions&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
      <category>typescript</category>
      <category>magento</category>
    </item>
  </channel>
</rss>
