Just wanted to document my thoughts after learning Gatsby for the past 4 months. We’ve successfully put together the Good Music Good Times site with it.
Our architecture
Gatsby advantages
- Very cheap! There is no database or application server. Only integrations.
- Enhanced security since your integrations are from CICD machine to APIs
- Very fast since you’re not making network requests
- Versioned content and code together
- Easy to debug or replicate to other environments (literally just pull)
Gatsby disadvantages
- Not the best for single page app (SPA) but can work (not sure about scale)
- Changes only show after a CICD build occurs
- Need CICD as mentioned above (not a bad thing, just something to consider)
- Our simple builds take 5 minutes (maybe faster on Gatsby Cloud)
- Issues with libraries that assume window exists (like Firebase)
Considerations
- The
gatsby-node.js
file is pretty important but I glossed over it initially. You may use that file for your integrations when it builds. - I wonder if we could improve performance by running 1 query for all of the pages initially?
- Things like NetlifyCMS or Gatsby Cloud may seem expensive but are worth it in the long run