Alex Libby
Gatsby E-Commerce
A Practical Introduction to Creating E-Commerce Sites with the Gatsby Framework
1st ed.
Logo of the publisher
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/9781484266915 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-6691-5 e-ISBN 978-1-4842-6692-2
https://doi.org/10.1007/978-1-4842-6692-2
Alex Libby 2021
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
This is dedicated to my family, with thanks for their love and support while writing this book.
Introduction
Gatsby E-Commerce is for people who want to quickly create e-commerce sites that are efficient and fast, using the Gatsby framework and associated tools.
This project-oriented book simplifies the setting up of a Gatsby site as a starting point before beginning to explore the benefits of using Gatsby in an e-commerce environment and developing it into an e-commerce offer that we can customize according to your needs. It will equip you with a starting toolset that you can use to create future projects, incorporate into your existing workflow, and allow you to take your websites to the next level.
Throughout this book, I'll take you on a journey through constructing our example site. We will touch on subjects such as adding data sources, creating the catalog, and implementing a payment function and more showing you how easy it is to develop simple e-commerce sites that we can augment later quickly. With the minimum of fuss, we'll focus on topics such as sourcing data using GraphQL, turning it into useful content, and more right through to producing the final result viewable from any browser!
Gatsby is based on JavaScript, React, and Node.js, three of the most powerful tools available for developers: you can enhance, extend, and configure your site as requirements dictate. With Gatsby, the art of possible is only limited by the extent of your imagination and the power of JavaScript, React, and Node.js.
Gatsby E-Commerce gets you quickly acquainted with creating and manipulating e-commerce sites using a static site generator (SSG) approach. It's perfect for website developers who are already familiar with JavaScript and React and are keen to learn how to leverage the Gatsby framework. You may also be a developer for whom time is of the essence and simplicity is key; you need to produce efficient and properly optimized content in modern browsers using tools already in your possession.
Acknowledgments
Writing a book can be a long but rewarding process; it is not possible to complete it without the help of other people. I would like to offer a huge vote of thanks to my editors in particular Nancy Chen and Louise Corrigan. My thanks also to Alexander Nnakwue as my technical reviewer, James Markham for his help during the process, and others at Apress for getting this book into print. All have made writing this book a painless and enjoyable process, even with the edits!
My thanks also to my family for being understanding and supporting me while writing. I frequently spend lots of late nights writing alone or pass up times when I should be with them, so their words of encouragement and support have been a real help in getting past those bumps in the road and producing the finished book that you now hold in your hands.
Lastly, it is particularly poignant that the book was written at a time when the world faced global events of an unprecedented nature; it was too easy to think about those who lost the greatest thing we as humans could ever have. Having a project to work on no matter how simple or complex it might be helped me get through those tough times, and with the hope that we face a better future.
Table of Contents
Part I
Part II
Part III
Part IV
About the Author
Alex Libby
is a front-end engineer and seasoned computer book author, who hails from England. His passion for all things open source dates back to the days of his degree studies, where he first came across web development, and he has been hooked ever since. His daily work involves extensive use of React, Node.js, JavaScript, HTML, and CSS. Alex enjoys tinkering with different open source libraries to see how they work. He has spent a stint maintaining the jQuery Tools library and enjoys writing about open source technologies, principally for front-end UI development.
About the Technical Reviewer
Alexander Chinedu Nnakwue
has a background in mechanical engineering from the University of Ibadan, Nigeria, and has been a front-end developer for over 3 years working on both web and mobile technologies. He also has experience as a technical author, writer, and reviewer. He enjoys programming for the Web, and occasionally, you can also find him playing soccer. He was born in Benin City and is currently based in Lagos, Nigeria.
Part I
Alex Libby 2021
A. Libby Gatsby E-Commerce https://doi.org/10.1007/978-1-4842-6692-2_1
1. Getting Started
E-commerce is big business. Its huge.