All Projects β†’ mirumee β†’ Saleor Storefront

mirumee / Saleor Storefront

Licence: bsd-3-clause
A GraphQL-powered, PWA, single-page application storefront for Saleor.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Saleor Storefront

Https Localhost
HTTPS server running on localhost
Stars: ✭ 122 (-79.36%)
Mutual labels:  hacktoberfest, pwa
Shopware Pwa
Shopware PWA for eCommerce. Headless storefront solution for Shopware 6, which communicates through the SalesChannel-API. Always Open Source, MIT license. Made with πŸ’™ by shopware AG & Vue Storefront.
Stars: ✭ 180 (-69.54%)
Mutual labels:  hacktoberfest, pwa
Storefront Ui
Customization-first, performance-oriented and elegant UI framework for eCommerce (and not only) based on Vue.js and Google Retail UX Playbook. Made with πŸ’š by Vue Storefront team and contributors.
Stars: ✭ 1,827 (+209.14%)
Mutual labels:  hacktoberfest, pwa
Maskable
Create and preview maskable icons in the browser!
Stars: ✭ 90 (-84.77%)
Mutual labels:  hacktoberfest, pwa
Hint
πŸ’‘ A hinting engine for the web
Stars: ✭ 3,280 (+454.99%)
Mutual labels:  hacktoberfest, pwa
Generator Ngx Rocket
πŸš€ Extensible Angular 11+ enterprise-grade project generator
Stars: ✭ 1,329 (+124.87%)
Mutual labels:  hacktoberfest, pwa
Emberclear
Encrypted Chat. No History. No Logs.
Stars: ✭ 157 (-73.43%)
Mutual labels:  hacktoberfest, pwa
Pwa Module
Zero config PWA solution for Nuxt.js
Stars: ✭ 1,033 (+74.79%)
Mutual labels:  hacktoberfest, pwa
Vue Firebase Auth Vuex
Vue FirebaseπŸ”₯ Authentication with Vuex
Stars: ✭ 248 (-58.04%)
Mutual labels:  hacktoberfest, pwa
Reactive Resume
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
Stars: ✭ 3,280 (+454.99%)
Mutual labels:  hacktoberfest, pwa
Commudle Ng
World's first community management platform. And it's free!
Stars: ✭ 81 (-86.29%)
Mutual labels:  hacktoberfest, pwa
Preact Cli
😺 Your next Preact PWA starts in 30 seconds.
Stars: ✭ 4,510 (+663.11%)
Mutual labels:  hacktoberfest, pwa
Vue Storefront
The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Ne…
Stars: ✭ 9,111 (+1441.62%)
Mutual labels:  hacktoberfest, pwa
React Most Wanted
React starter kit with "Most Wanted" application features
Stars: ✭ 1,867 (+215.91%)
Mutual labels:  hacktoberfest, pwa
Bikedeboa
A (Progressive) Web App to find, map and review bike parkings in the cities of Brazil.
Stars: ✭ 54 (-90.86%)
Mutual labels:  hacktoberfest, pwa
Saleor
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.
Stars: ✭ 14,720 (+2390.69%)
Mutual labels:  hacktoberfest, pwa
Hoverboard
Conference website template
Stars: ✭ 935 (+58.21%)
Mutual labels:  hacktoberfest, pwa
Ember Service Worker
A pluggable approach to Service Workers for Ember.js
Stars: ✭ 227 (-61.59%)
Mutual labels:  hacktoberfest, pwa
Cookiecutter Django Vue
Cookiecutter Django Vue is a template for Django-Vue projects.
Stars: ✭ 462 (-21.83%)
Mutual labels:  hacktoberfest, pwa
Upup
✈️ Easily create sites that work offline as well as online
Stars: ✭ 4,777 (+708.29%)
Mutual labels:  hacktoberfest, pwa

Saleor Storefront

1 copy 2x

Note: This project is a demonstration on how Saleor can be used. It’s not ready to be a starter but rather show how different cases can be handled and could be used as a recipe book. There will be breaking changes and the code is constantly evolving, so use at your own risk.

A GraphQL-powered, PWA, single-page application storefront for Saleor.

Features

Demo

See the public demo of Saleor Storefront!

Or launch the demo on a free Heroku instance.

Deploy

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js 12.0+
  • A running instance of Saleor.

To run the storefront, you have to set the NEXT_PUBLIC_API_URI environment variable to point to the Saleor GraphQL API. If you are running Saleor locally, with the default settings, NEXT_PUBLIC_API_URI is set to: http://localhost:8000/graphql/. To change it, either create a [.env.localfile](https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables) and add it there or set an env variable usingexport` command.

Installing

Clone the repository:

git clone https://github.com/mirumee/saleor-storefront.git

Enter the project directory:

cd saleor-storefront

Using stable release

To use the official stable release, checkout to a release tag:

$ git checkout 2.11.0

See the list of all releases here: https://github.com/mirumee/saleor-storefront/releases/

Using development version

If you want to use the latest development version, checkout to the master branch:

$ git checkout master

Install NPM dependencies:

npm i

Run the development server:

npm start

Go to http://localhost:3000 to access the storefront.

Build

To compile the app run:

$ npm run build

To compile the app and export storefront to the static HTML run:

$ npm run build:export

To compile the app and run it in production mode with next server run:

$ npm run build:start

Cypress tests

If you want to run Cypress tests, make sure that all dependencies (including Cypress) are installed by running the install command.

npm i

Following environment variables are required to be set in order to be able to run tests properly:

  • API_URI - GraphQL API address.
  • STATIC_URL - static files destination url, eg. S3 bucket
  • CYPRESS_USER_NAME - username (email) for Storefront user.
  • CYPRESS_USER_PASSWORD - for the user mentioned above.

If you are running the Storefront from the perspective of Docker container, then you can run tests using following commands:

Headless mode:

cy:run

Cypress UI mode:

cy:open

If you want to run tests against your local development environment then use following commands:

Headless mode:

test:e2e:run

Cypress UI mode:

test:e2e:dev

Creating new components

All new components should follow Atomic Design Guidelines and be placed in src/@next/components directory.

Files structure can be generated using plop:

npm run generate

Modifying the Storefront

From Spectrum Post

Important Files

  • saleor-storefront/config/next/config.base.js - Base Next.js config file which contains webpack custom adjustments.
    • Can change name of the app (displayed when installed on mobile)
  • saleor-storefront/src/pages/app.tsx - Main entry point file. Render's the component, apollo-client, and others to the root div in index.html file above. Contains also head section - You can change the title of storefront here.
  • saleor-storefront/src/core/config.ts - Controls number of products shown per page, support email, gateway providers, social media, and some meta.
    • Can change support email
    • Can change products shown per page
    • Can change gateway providers
    • Can change social media links that are displayed in the footer
    • Can change some meta options
  • saleor-storefront/src/images/ - Holds all the images for logo, cart, favicon, etc.
    • Can change storefront logo, favicon, or add new images here.
  • saleor-storefront/src/globalStyles/scss/variables.scss - Contains base styles like colors, font size, container width, media breakpoints and more.
  • saleor-storefront/src/@next/globalStyles/ - Contains more base styles, themes, media, and constants.
  • saleor-storefront/src/views/ - This folder controls the views, or what is displayed for each page. Most views have a file named "Page.tsx" that controls the layout of the page and a file named "View.tsx" that calls the query and renders the component with the data.
    • Can add another view to storefront here. Requires adding a route (see routes below).
  • saleor-storefront/src/@next/pages/ - Second spot for modifying/adding different pages. This is the recommended directory to add new pages.
  • saleor-storefront/src/paths.ts - This folder contains all the paths. Here is where you add a new one.
  • saleor-storefront/src/pages/ - This folder contains files which are translated to Next.js routing. Here is where you add a new route.
    1. Export a new path in paths.ts
    2. Inside pages, create a new file with name correnspond to your desired route (read more here about nested routes). Import your view in the created route file end export it as a default export.
    3. To link to your new view import Link from "next/link" and use new path you created in paths.ts (make sure to import it)
  • saleor-storefront/src/app/App.tsx - This is main component that renders the , (explained below), and a couple other components.

Adding a Payment Gateway

  • saleor-storefront/src/core/config.ts - Add new gateway provider name here.
  • saleor-storefront/src/@next/components/organisms/ - Create a new folder for new payment gateway component here.
  • saleor-storefront/src/@next/components/organisms/PaymentGatewaysList/PaymentGatewaysList.tsx - Import new gateway component, create a new switch case to handle your gateway component.

Receiving confirmation emails

  • Set EMAIL_URL environment variable for Saleor core.
    • Using Docker - Add EMAIL_URL as new environment variable to both the api and worker service following the format here.
  • Issues getting emails working?
    • Gmail
      • Check to see that "Less secure app access" is turned ON. Under "Manage your Google Account" > Go to the security tab. By default, the setting is off for security reasons.
      • If using 2FA make sure to set an app password and use that in place of your normal login password.

Multichannel

  • Set [SALEOR_CHANNEL_SLUG] environment variable. - Default value: default-channel.

License

This project is licensed under the BSD-3-Clause License - see the LICENSE file for details

Crafted with ❀️ by Mirumee Software

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].