Skip to main content

2 posts tagged with "about"

View All Tags

· 3 min read

I just turned 50 years old.

It's hard to believe that I took up coding only a mere 4 years ago, when I turned 46, at the start of Covid. With nothing to do during the lockdown, I decided to learn Javascript and React and transition all my websites to Gatsby and then Next.js. I worked with an amazing senior developer, Stan, back then, who I found by accident on Github. I learned a tremendous amount from Stan and still use most of the code he programmed on my production websites.

In hindsight my decision to transition away from monolithic platforms, like Wordpress, was not a great business decision. Coding is hard, and learning to code at 46, with 2 young children and a full-time business to run, is even harder. Coding is a never ending process of making mistakes, refactoring, and constant tweaking. It is extremely time-consuming. Ultimately, you end up sacrificing other aspects of your business to focus on coding.

However, I have yet to find an intellectual activity that is more satisfying than coding, and I have always held firm to the belief, that life is about learning. There is no greater joy than intellectual satisfaction, and coding gives you that in spades, which is probably why it's so addictive.

So after 4 years of learning to code, I'm happy to share my first pull request an implementation of the new Shopify Customer Account API on the Next.js Commerce repo. This pull request will allow anyone to use the new Shopify Customer Account API to login customers into their Next.js Commerce website, and eventually to perform critical customer actions, like review past orders, add addresses etc. I felt like this is a great addition to the Next.js Commerce repo because authentication remains a challenging part of any React application. The new Shopify Customer Accounts API, however, greatly simplifies authentication for headless platforms, and easily allows you to pass the logged in user to checkout.

The code for this pull request is admittingly not really too original, as it is based on Shopify's own Customer Account API implementaion on their Remix Hydrogen store and Shopify's docs. However, refactoring this code to use Next.js App router with RSC's, middleware, and server actions was a bit challenging. I did have to do quite a bit of searching and code tweaking before settling on, what I think is the best way to implement the Customer Account API on Next.js.

Of course, this pull request is not totally complete. I still have to actually implement order history, address creation etc. But, I think the current code does provide a reliable starting point for integrating the new Shopify Customer Account API into your Next.js project. Certainly, I look forward to getting feedback on the code, so it can be improved.

The actual code can be found on the this forked branch of Next.js Commerce. Documenation for setting this up correctly, can be found in our Create a Headless Shopify Site with Next.js Docs

· 2 min read

The technology driving e-commerce is rapidly changing with the advent of e-commerce solutions, like Shopify Hydrogen, that separate backend functionality from the frontend tooling. This trend is generally called "headless" commerce. I don't particularly like the term, headless commerce, but will use it for the remainder of this post, simply because it is an accepted industry definition for this type of commerce set up.

The problem with headless e-commerce is that even though it offers exciting possibilities, it remains complex and difficult to implement. This is partially due to the fact that headless commerce is relatively new, i.e. Shopify only bought Remix in 2022 to accelerate the development of Hydrogen. However, the difficulty with headless is also related to the fact that most headless solutions are built in some sort of Javascript script framework, like React, and Javascript frameworks are notorious for changing things up way too frequently. This leads to too many solutions to the same exact problem, and way too much much code refactoring, making it nearly impossible to develop themes that can stand the test of time.

Our goal at DaliCommerce, Inc. is to make the transition to headless commerce easier by providing a full suite of services based around core technologies that we believe will stand the test of time, given their wide acceptance, their use of core Javascript Web Standards, and the standardization of their platforms.

We are focused on three main areas:

  • Frontend e-commerce themes based on the Next.js App Router and powered by Shopify.
  • Serverless functions running off of Cloudflare Workers (Note: Next.js Middleware and Edge API routes both run on Cloudfare Workers).
  • Admin dashboards in Retool, which is an amazing tool to quickly build admin tools based on the technologies above.