Skip to content

Commit

Permalink
Merge pull request #10 from joshwcorbett/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
joshistoast committed Jun 23, 2023
2 parents da34ffb + ab6e6ba commit ead6e8b
Show file tree
Hide file tree
Showing 14 changed files with 724 additions and 100 deletions.
69 changes: 56 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,81 @@
# Svelte Storefront
# 🛍️ Svelte Storefront

This is my attempt to svelte-ify Shopify's Hydrogen storefront features. It's a work in progress, but I'm hoping to get it to a point where it's a good boilerplate/template for building a custom Shopify storefront with little hassle and built their favorite js framework (sveltekit).
🚧 This project aims to bring the magic of Shopify's Hydrogen storefront features to the Svelte world. This project is still on the assembly line, but I'm aiming to shape it into a go-to boilerplate/template that can ease the process of building a personalized Shopify storefront using everyone's beloved JavaScript framework - Sveltekit.

## To Do
**💧 What is Hydrogen?**<br />
Hydrogen is Shopify’s stack for headless commerce. It provides a set of tools, utilities, and best-in-class examples for building dynamic and performant commerce applications. Hydrogen is designed to dovetail with Remix, Shopify’s full stack web framework, but it also provides a React library portable to other supporting frameworks.

- [ ] Product Search
- [ ] Collection Filtering
## ⚡ Key Features

## Getting Started
All the features you'd expect from a modern headless eCommerce storefront, and more:

1. Clone the repo
2. Install Dependencies
- 🌐 **SSR**: Server-Side Rendering for superior SEO and initial load performance.
- 🎨 **Style-Free**: No predefined styles to hold you back. Freedom to create your unique storefront design.
- 💨 **Tailwind**: Lean and fast CSS framework tailored for modern frontend development.
- 🚀 **Fast**: Engineered for high-speed performance and optimal user experience.
- ⚙️ **Optimized**: Crafted with best practices for efficient resource utilization.
- 🧹 **Clean Code**: Well-structured, readable, and maintainable codebase.

## 🎈Shopify Features

Almost every aspect and feature of a Shopify theme is covered in this project. Here's a list of the features that are currently implemented:

- 🌐 URL-based Localization & Currency Conversion
- 🏬 Collection Pages
- 📦 Product Pages
- 🔍 Product Search
- 🔒 Authentication & Account Pages
- 📧 Customer account activation via email
- 🛒 Fully functional cart
- 📖 Blog Pages
- 🎟️ Discount URL handling
- 📃 Policy Pages
- 📑 Standard Shopify Pages

## 📝 To Do

- [ ] 🖼️ Optimized and performant images
- [ ] ↕️ Filtering & Sorting collections
- [ ] 🔗 Convert shopify links to local links where applicable

## 💡 Prerequisites

Before getting started, make sure you have the following:

- Node.js installed (preferably the latest version)
- A Shopify account and a store to work with
- Basic understanding of Svelte and JavaScript/TypeScript

## 🚀 Getting Started

1. 📂 Clone the repo
2. 💻 Install Dependencies

```bash
pnpm install
```

> You can use your package manager of choice, but I strongly recommend `pnpm`
3. Create a `.env` file in the root of the project and add the following variables
3. 🔑 Create a .env file in the root of the project and fill in the required variables

I've included a `.env.example` file to use as a template, the two variables that really only need to be changed are
An example .env.example file is provided to guide you, the two essentials that need replacing are:

```bash
PUBLIC_STOREFRONT_API_TOKEN="your-public-token-here"
PUBLIC_STORE_DOMAIN="your-store.myshopify.com"
# Optional
PUBLIC_STOREFRONT_API_VERSION="2023-04"
```

4. Run the project locally
> To get the `PUBLIC_STOREFRONT_API_TOKEN` and `PUBLIC_STORE_DOMAIN`, refer to the Shopify API Documentation [here](https://shopify.dev/docs/api/storefront#authentication).
4. 🚦 Run the project locally

```bash
pnpm dev
```

5. Profit!
5. 🎉 Start building your storefront!

Of course there's more to it than that, but this should get you started. I'll be adding more documentation as I go along (assuming I don't get burnt out).
There's more under the hood, and detailed documentation is coming soon.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/kit": "^1.20.4",
"@sveltejs/kit": "^1.20.5",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.43.0",
"eslint-plugin-svelte": "^2.31.0",
"postcss": "^8.4.24",
"svelte": "^3.59.2",
"svelte-check": "^3.4.3",
"svelte": "^4.0.0",
"svelte-check": "^3.4.4",
"sveltekit-superforms": "^1.1.1",
"tailwindcss": "^3.3.2",
"tslib": "^2.5.3",
Expand All @@ -31,7 +31,7 @@
"type": "module",
"dependencies": {
"@apollo/client": "^3.7.16",
"graphql": "^16.6.0",
"graphql": "^16.7.1",
"isbot": "^3.6.12",
"svelte-kit-cookie-session": "^3.4.1",
"tiny-invariant": "^1.3.1"
Expand Down
Loading

0 comments on commit ead6e8b

Please sign in to comment.