This repository is what we call a "subtree split": a read-only copy of one directory of the main repository. If you want to report or contribute, you should do it on the main repository: https://github.com/CrystallizeAPI/boilerplates.
The product storytelling boilerplate is a minimal eCommerce boilerplate built using AstroJS and Crystallize. You can also check out the live demo (deploy it) of this boilerplate.
- Setting up your project
- Instructions for running the project
- Accessing the development site
- Folder structure of the boilerplate
- Editing the components and the theme
- Deploying the project
To get started, head over to GitHub and clone the repository. Make sure to install all the required packages by running the following command for both the folders:
npm install
Running the project in development is straightforward. To start the development server, run the following command:
npm run dev
Once the development server is running, you will be able to browse to http://localhost:4321/.
![dounut-astro-dev-server](https://private-user-images.githubusercontent.com/26195876/304043864-d615da75-54dc-4866-a8fd-5054fca3a23e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDQyMTEsIm5iZiI6MTcyNDMwMzkxMSwicGF0aCI6Ii8yNjE5NTg3Ni8zMDQwNDM4NjQtZDYxNWRhNzUtNTRkYy00ODY2LWE4ZmQtNTA1NGZjYTNhMjNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIyVDA1MTgzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5MWMxMGU3MjE4ZTE1NWUxNWE1YmY4M2FlMDBiNjhhZDM3OThlNTg2OWU5MWYzZWQ1NmIyOGMzYmYzMTZmMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fDOwG549sfjXDTdgJ9Tu-lvGQ0CnerT-IoiYlMV1PMw)
This section provides you with a better understanding of the folder structure.
src/components
Contains all the components used throughout the application
src/use-cases
Includes the GraphQL queries and mutations used to communicate with Crystallize.
src/pages
Has all the individual pages the website contains.
All the theme related information can be edited in the tailwind.config.js file. This includes the colors, spacing, typography used throughout the application.
Components can be edited by heading over to the components folder in src.
The frontpage contains a grid and it is fetching all the grid related information (including the layout) from Crystallize. You can directly edit the grid in Crystallize for changes to take effect. Editing the styling such as the background and typography can be done in the grid-item component.
Individual product pages are using two components - one is the product component that contains the hero section, and the ‘Add to cart’ button and then the product-body component that can be edited to change the layout of the marketing information displayed on the page.
The basket, checkout, and the confirmation pages can be edited in their respective files located in the pages folder.
Please note that this boilerplate does not contain payment integrations such as Stripe. It is using a dummy payment method.