Kick off your project with this event boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React.
Live Demo: https://flotiqgatsbyshop1.gatsbyjs.io
This project use:
- Flotiq - Headless CMS for string your data (You can create account here)
- Tailwind - utility-first CSS framework
- Flotiq source plugin - connector for fetching data from Flotiq
- Flotiq components for react - components library designed and written to work perfectly with Flotiq Content Objects and display your data beautifully
This project works on node ^14.17.0 || >=16.0.0, we do not support node 15.
-
Start the project from template using Flotiq CLI
npm install -g flotiq-cli flotiq start [projectName] https://github.com/flotiq/flotiq-gatsby-shop-1.git [flotiqApiKey]
flotiqApKey
- Read and write API key to your Flotiq accountprojectName
- project name or project path (if you wish to start project in or import data from the current directory - use.
)
-
You can also start the project from template using Gatsby CLI
gatsby new flotiq-gatsby-shop-1 https://github.com/flotiq/flotiq-gatsby-shop-1.git
-
Configure application
The next step is to configure our application to know from where it has to fetch the data.
You need to create a file called
.env.development
inside the root of the directory, with the following structure:GATSBY_FLOTIQ_API_KEY=YOUR FLOTIQ API KEY GATSBY_FLOTIQ_QUANTITY_API_KEY=YOUR SCOPED FLOTIQ API KEY SNIPCART_API_KEY=YOUR SNIPCART API KEY GA_MEASUREMENT_ID=YOUR MEASUREMENT ID
-
Start developing.
Navigate into your new site’s directory and start it up.
cd flotiq-gatsby-shop-1/ gatsby develop
This step is optional and is not necessary if you used flotiq-cli to start the project.
If you wish to import example data to your account, before running
gatsby develop
run:flotiq import . [flotiqApiKey]
It will add four example objects to your Flotiq account.
Note: You need to put your Read and write API key as the
flotiqApiKey
for import to work, You don't need any content types in your account. -
Open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby Tutorial.Open the
flotiq-gatsby-shop-1
directory in your code editor of choice and editsrc/templates/index.js
. Save your changes and the browser will update in real time! -
Manage your content using Flotiq editor
You can now easily manage your content using Flotiq editor
Deploy this starter with one click on Gatsby Cloud:
You can also deploy this project to Heroku in 3 minutes:
Or to Netlify:
A quick look at the top-level files and directories you'll see in a Gatsby project.
.
├── .flotiq
├── .github
├── node_modules
├─┬ src
│ ├── assets
│ ├── components
│ ├── layouts
│ ├── pages
│ ├── sections
│ ├── style
│ └── templates
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .prettierignore
├── .prettierrc
├── app.json
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── LICENSE
├── netlify.toml
├── package.json
├── README.md
├── static.json
├── tailwind.config.js
└── yarn.lock
-
.flotiq
: This directory contains content types necessary to starter to work. -
.github
: This directory contains templates of GitHub issues. -
/node_modules
: This directory contains all packages that your project depends on (npm packages) and are automatically installed. -
/src
: This directory will contain all the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template.src
is a convention for “source code”. -
/src/assets
: This directory will contain all static assets for the project (images, favicons, custom fonts). -
/src/components
: This directory will contain all small build blocks for your templates and layouts. -
/src/layouts
: This directory will contain all layout templates for your pages. -
/src/pages
: This directory will contain all static pages for the project. -
/src/sections
: This directory will contain all big build blocks for your project. -
/src/style
: This directory will contain global styles for the project. -
/src/templates
: This directory will contain all templates for automatically generated pages. -
.eslintignore
: This file tells eslint which files it should not track / not fix. -
.eslintrc.js
: This is a configuration file for Eslint. Eslint is a tool to help keep the formatting of your code consistent automatically. -
.gitignore
: This file tells git which files it should not track / not maintain a version history for. -
.prettierignore
: This file tells prettier which files it should not track / not fix. -
.prettierrc
: This is a configuration file for Prettier. Prettier is a tool to help keep the formatting of your code consistent. -
app.json
: Configuration file for Heroku deploy. You can safely remove this file if you do not plan to deploy on Heroku. -
gatsby-browser.js
: This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser. -
gatsby-config.js
: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the config docs for more detail). -
gatsby-node.js
: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. -
LICENSE
: This Gatsby starter is licensed under the MIT license. -
netlify.toml
: Configuration file for Netlify deploy. You can safely remove this file if you do not plan to deploy on Netlify. -
package.json
: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc.). This manifest is how npm knows which packages to install for your project. -
README.md
: A text file containing useful reference information about your project. -
static.json
: Configuration file for caching the project. -
tailwind.config.js
: Configuration file for tailwind. -
yarn.lock
: This is an automatically generated file based on the exact versions of your yarn dependencies that were installed for your project. (You won’t change this file directly).
Looking for more guidance? Full documentation for Gatsby lives on the website. Here are some places to start:
-
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
-
To dive straight into code samples, head to the gatsby documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
Full documentation for Flotiq lives on this website.
Documentation for gatsby starters is here.
If you wish to talk with us about this project, feel free to hop on our .
If you found a bug, please report it in issues.