Gatsby starter project


#1

Hi all,

For anyone who wants to use GatsbyJS for their site, I’ve created a starter project which you can find on Github. You will also find a ‘source’ plugin that fetches data from Moltin and allows you to query and use that data with Gatsby.

The site uses much of the code from the example NextJS project from Moltin but with the styling tweaked and a few more features.

Appreciate any feedback. :slightly_smiling_face:


#2

More info

Site url: https://parmsang.github.io/gatsby-starter-ecommerce/
Repo: https://github.com/parmsang/gatsby-starter-ecommerce

I’ll update the readme this weekend with more info.


#3

Just wanted to let you guys know that the project is now listed on GatsbyJS starters. Even though I’ve written a basic source plugin for moltin, I’ve not added it to Gatsby’s plugin library. The plugin is available in my repo’s ‘plugins’ folder if anyone wants to use it.

Kyle Mathews of GatsbyJS tweeted it out, which I wasn’t expecting. Reaction has been awesome - was even retweeted by Dan Abramov.

Got some feedback and I’ve improved the site. Still I can make a few more tweaks.

Cheers,
Parm


#4

Amazing effort @gambit

I’ve been following the tweet for a few days now and the reaction has been amazing. As it stands 260 likes + 54 RTs. :heart:

We created the NextJS demo store in a way that allowed others to take it and expand. This is clearly proof that it was worth doing that way :tada:

:clap:


#5

Hi! I love the Gatsby Starter and really want to use it for my first Moltin project. I’m struggling to get it running with my own Moltin account though.

I can get the site running locally but where exactly do I need to change the APi keys in order to get my own products added to the site?

I have tried adding the .env file but doesn’t seem to do anything…

Any pointers would be greatly appreciated!


#6

Hey

As shown in this file https://github.com/parmsang/gatsby-starter-ecommerce/blob/master/gatsby-config.js you’ll be able to set the ENV with your client ID, the variable you’ll want to update is MOLTIN_CLIENT_ID

I hope this helps :smiley:


#7

Hello wlfnmn

Thank you for the positive comments. There was an issue with environmental variables so I’ve made a tweak to the code and updated the readme.