Astrofront | AstroJs + Shopify + Tailwind CSS + TypeScript Starter and Boilerplate
A free, production-ready astro.js template powered by Tailwind CSS and TypeScript, specifically designed for Shopify. Utilizes the Shopify Storefront API through GraphQL and providing everything you need to jumpstart your Astro project and save valuable time.
Made with โฅ by Themefisher
If you find this project useful, please give it a โญ to show your support.
๐ Demo | Page Speed (99%)๐
๐ Key Features
- ๐ Dynamic Products from Shopify Storefront API
- ๐ธ Checkout and Payments with Shopify
- ๐ Automatic Light/Dark Mode
- ๐ Fetching and Caching Paradigms
- ๐ Server Actions for Mutations
- ๐ User Authentication
- ๐งฉ Similar Products Suggestions
- ๐ Search, Sort, Different Views Functionality
- ๐ท๏ธ Tags & Categories & Vendors & Price Range & Product Variants Functionality
- ๐ผ๏ธ Single Product Image Zoom, Hover Effect, Slider
- ๐ Cart & Easy editing options for cart items
- ๐ Product Description on Multiple Tabs
- ๐ Netlify Setting Pre-configured
- ๐ Support Contact Form
- ๐ฑ Fully Responsive
- ๐ Dynamic Home Banner Slider
- ๐ Write and Update Content in Markdown / MDX
- โ Infinite Product Load on Scrolling
๐ 10+ Pre-designed Pages
- ๐ Homepage
- ๐ค About
- ๐ Contact
- ๐๏ธ Products
- ๐ฆ Product Single
- ๐ก Terms of services
- ๐ Privacy Policy
- ๐ Login
- ๐ Register
- ๐ซ Custom 404
๐ Getting Started
๐ฆ Dependencies
- shopify
- astro 5.6+
- node v20.10+
- npm v10.2+
- tailwind v4+
๐ Retrieve Shopify Token & Add Demo Products
- To get the tokens needed, create a Shopify partner account.
- Now go to 'stores' and select 'Add store.' Create a development store using the option 'Create development store'.
- Click on import products.
- Locate the 'products' CSV file in the public folder of the repository and upload it for demo products.
- On the admin dashboard, click on โSettingsโ at the bottom of the left sidebar.
- On the Settings page, click on โApps and sales channelsโ on the left sidebar.
- In the Apps and sales channels page that opens, click on โDevelop appsโ on the top right.
- Now, on the App development page that opens, click on โCreate an appโ.
- A โCreate an appโ popup opens. Fill in any name in the โApp Nameโ text box. In the App Developer text box, your name and email id is automatically fetched. Else type in the same email id you used while signing up for the Shopify store.
- Next, click on โConfigureโ in the Storefront API integration section.
- In the Storefront API access scopes, select and check all the boxes and click on โSaveโ and then โInstall appโ.
- Navigate to the 'API credentials' tab and locate three essential pieces of information. Subsequently, update your
.env
file by replacing the placeholder quotes("") in the.env.example
file with your Shopify credentials. - When adding your product, use the same alt title for images with the same color. This helps the first image appear as the color variant in the selector.
- We have the option to create additional collections for products.
๐ Setting Up the Hero Slider
- Go to the file
/src/config/config.json
in your Shopify project and find the 'hero_slider' section. Youโll see something like this: - Change the 'hero_slider' collection name to something of your choice.
- Then, go to your Shopify Partner Dashboard, navigate to Products > Collections, and create a collection with the same name you set in the config file (e.g., 'hidden-homepage-carousel').
- Add the products you want to display in the hero slider to this collection.