Giter VIP home page Giter VIP logo

hubble-frontend-pwa's Introduction


Headless E-Commerce Interface

Progressive Web App for your e-commerce platform based on Nuxt.js

  • An open source project
  • Installable as a Nuxt.js Module
  • Compatible with Shopware 6
  • Covers all common e-commerce features
  • Excellent performance and usability
  • Toolbox / framework for creating your own shop frontend

Documentation

Run npm run docs:dev to see the developer documentation or take a look at /docs.
Or visit the documentation online at docs.hubblecommerce.io.

hubble PWA Introduction for Developers on YouTube

Links

Demo | Website

Table of contents

Prerequisites

This guide focuses on installing hubble PWA as a Nuxt.js module only, so before moving on, make sure you meet the requirements first.

Installation

  1. Create a new Nuxt 3 Project
npx nuxi init nuxt-app
cd nuxt-app
npm install
  1. Install the hubble Nuxt module
npm i @hubblecommerce/hubble
  1. Add the module to nuxt.config.ts
modules: ['@hubblecommerce/hubble']
  1. Create a .env file in project root and fill credentials
API_SW_ACCESS_KEY = ''
API_BASE_URL      = ''

::: tip Read more about where to get the credentials in the supported e-commerce platforms section. :::

Build modes

Development

npm run dev

Production

npm run build
node .output/server/index.mjs

Features

hubble PWA is a Nuxt.js module. That means it relies on all the great features of Nuxt.js like:

  • All benefits of Vue 3 and Nuxt 3
  • Server Side Rendering
  • Dynamic Routing
  • Code-Splitting
  • Module Ecosystem (Composables)
  • Intuitive Developer Experience
  • Runtime Configuration

and enriches them to meet the demanding requirements of an e-commerce interface like:

This way hubble PWA can always be up-to-date to the fast-growing Nuxt.js ecosystem.

Performance

We aim for an intuitive and smooth interface experience no matter how many features you build in your shop. How we do it:

  • everything that's not necessary for SEO purposes will be loaded lazily via chunking and dynamic imports
  • uses as less global code as possible, everything is a Single-File-Component
  • uses only relevant parts of a CSS framework (Tailwind CSS)
  • measure performance with Google Lighthouse

SEO friendly

All content that is relevant for SEO purposes will be rendered server-side thanks to Nuxt.js universal mode. The rest will be loaded lazily to improve performance.

We also take care of:

  • Rich Snippets
  • Google Tag Manager
  • Enhanced e-commerce tracking

PWA

To us, a PWA means more than the ability to add your website to home-screen or enable push notifications. We want to make sure the interface actually feels like an intuitive, native app and hand you tools to achieve that like:

  • Excellent performance on mobile devices
  • Mobile first design approach
  • User input feedback via decent animations and transitions

Besides, hubble of course is shipped with a simple service worker for offline support. Feel free to adjust it to fit your caching approach needs. Other PWA Features like "Add to Home" or "Push Notifications" can be installed easily using the official Nuxt.js PWA Module.

Specialized in Shopware 6

Because hubble PWA was built for Shopware 6 primarily, it supports features like:

Roadmap

Thanks to the headless approach hubble is not tied to Shopware only, so we are constantly working on connecting other e-commerce frameworks. See our detailed roadmap for further information.

Contributing

Specific instructions for pull requests can be found here.

Support

If you like the hubble PWA, feel free to contribute and spread the word on social media. Also don't forget to give us a star on Github.

Stay updated

If you like to receive updates about updates and the latest releases just click on "watch" and select the information you like to get noticed about.

Meta

digital.manufaktur GmbH โ€“ [email protected]

Distributed under the MIT license. See LICENSE for more information.

hubble-frontend-pwa's People

Contributors

annakoehler avatar dally-dally avatar danielroe avatar dm-becker avatar dm-heinze avatar dm-neslihan avatar gar-nele avatar mpkix avatar philipp12345 avatar sebastianmaurer avatar zermoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hubble-frontend-pwa's Issues

[FEATURE] Refactoring Component CartItemList.vue

Is your feature request related to a problem? Please describe.
Under the aspects of the Vue.js coding guidelines:
As declared in the hubble coding guidelines, a Vue component should import other components / plugins / modules dynamically if possible, display context via v-text instead of v-html and use selfclosing tags if possible

Describe the solution you'd like
Therefore to standardize the CartItemList component exchange current imports with dynamic imports where possible, change v-html to v-text and add selfclosing tags.

[FEATURE] Refactoring Component CheckoutProgressBar.vue

Is your feature request related to a problem? Please describe.
Under the aspects of the Vue.js coding guidelines:
As declared in the hubble coding guidelines, a Vue component should display context via v-text and use selfclosing tags if possible.

Describe the solution you'd like
Added context as v-text and selfclosing-tags.

[FEATURE] Refactoring Component Tabs.vue

Is your feature request related to a problem? Please describe.
Tabs.vue contains redundant code, the methods selectTab and selectTabInitial are the same with only minor differences.

Describe the solution you'd like
Refactoring of selectTab so it can replace selectTabInitial on startup, so that selectTabInitial can be removed.

[FEATURE] include components as dynamic imports

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should import other components / plugins / modules dynamically if possible. Therefore to standardize the ViewCategory component exchange current imports with dynamic imports where possible.

Describe the solution you'd like
Add conditionally used components as dynamic imports similar to other conditional imports for

Breadcrumbs,
ProductListingToolbar,
TextExcerpt,

Describe alternatives you've considered

Additional context

[FEATURE] Refactoring SelectableFacet.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should use self closing tags when possible and should have its own scss file with the same name.

Describe the solution you'd like
Change tags to be self closing, create scss file with the same name.

[FEATURE] Refactored AddToWishlist.vue and Icon-Set

Is your feature request related to a problem? Please describe.
Missing "filled-heart"-icon in set causing empty remove-from-wishlist-button.

Describe the solution you'd like
Switched Icon-set files to add icon-heart-filled to icon-set.

[FEATURE] Refactoring wishlist.vue

Is your feature request related to a problem? Please describe.
Reset Wishlist called error due to an unknown action.
Vue components should also be imported dynamically if possible and display content via v-text.

Describe the solution you'd like
Adjusted path to missing action, deleted empty class and added v-text.

[FEATURE] Refactoring Component WishlistLayer.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display content via v-text and import components dynamically.

Describe the solution you'd like
Added v-text and imported component dynamically.

[FEATURE] Refactoring summary.vue and related files

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should display content via v-text.

Furthermore summary conainer is not displayed properly in mobile view.

Describe the solution you'd like
Added v-text.
Fixed container-display in mobile-view.

[FEATURE] Refactoring Component Cookienotice.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display context via v-text and be selfclosing. Therefore to standardize the Cookienotice component the template need to change.

Describe the solution you'd like
Add selfclosing tag to template parts where necessary.

[FEATURE] Refactoring Component Totals.vue

Is your feature request related to a problem? Please describe.
Under the aspects of the Vue.js coding guidelines:
As declared in the hubble coding guidelines, a Vue component should display context via v-text and use selfclosing tags if possible.

Describe the solution you'd like
Added context as v-text and selfclosing tags.

[FEATURE] Refactoring ProductDetailManufacturer.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, images should be displayed with img-lazy whenever possible, should use v-text instead of v-html when displaying text and should have a scss file with the same name. Getting the link for the logo image source through a method called by the mounted lifecycle hook ist unnecessary and can be directly put in the src prop of img-lazy. The div surrounding img-lazy currently checks if the manufacturer_item exists which makes no sense since the else-if afterwards checks for the same thing, therefore the first v-if should instead check if an manufacturer image exists and displays it when it does.

Describe the solution you'd like
Change img tag to img-lazy , change v-html to v-text, create scss file with the same name, put dataProduct.manufacturer_item.logo directly in img-lazy src prop and change first v-if to check for dataProduct.manufacturer_item.logo.

[FEATURE] Refactoring Component ProductDetailGallery.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display images via img-lazy tag, not with img tag.

Describe the solution you'd like
Changing all occurrences of img to img-lazy.

[FEATURE] Refactoring Component NewsletterForm.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display context via v-text and be selfclosing, should display static text only through locales. Since NewsletterForm.vue is used only once in another component it does not need its props since they don't provide any specific dynamic information, they only consist of headlines which could easily be static strings in the component itself. The prop slogan is never used and can be deleted with its corresponding h2 tag.

Describe the solution you'd like
Change tags to self closing whenever possible, change static text to be translatable and make corresponding changes in locales, delete props and change its uses to static text, delete h2 tag of unused prop slogan and change scss accordingly, change newsletter-form tag in wishlist to not include props.

[FEATURE] Refactoring Component ProductDetailBuybox.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display content via v-text instead of v-html. The 2 div under the "Add to cart" comment is displayed through v-if with mediaqueries, one for small and one for medium and large screens. Deleting the first div and the v-if on the second div does not change change appearance on mobile, therefore shortening the template code and avoiding repetition.

Describe the solution you'd like
Replace v-html with v-text and delete commented out code.
Shortening the code by deleting the media queries and the first div under the "Add to cart" comment.

[FEATURE] Refactoring Component LoginForm.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should contain english code.

Describe the solution you'd like
Exchanged german text with english.

[FEATURE] Refactoring TheMobileMenu.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should import components dynamically if possible.

Describe the solution you'd like
Imported components dynamically.

[FEATURE] Refactoring ProductListing.vue +.scss

Is your feature request related to a problem? Please describe.
s declared in the hubble coding guidelines, a component should import components dynamically and should not contain redundant code.

Describe the solution you'd like
Added dynamic import and deleted unused classes in styles.

[FEATURE] Refactored CartItemsListNonInteractive.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should display content via v-text and use selfclosing tags and display img using img-lazy.

Describe the solution you'd like
Added v-text, selfclosing tags and img-lazy-tag.

[FEATURE] Refactoring Component Pagination.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, static text should only be included translatable and tags should be self closing when possible.

Describe the solution you'd like
Change span tags to self closing and static text to translatable text by creating entries in locales for english and german.

[FEATURE] Refactoring Component TheFooterMobile.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display images via img-lazy tag which should have width and height attributes when possible and import components dynamically.

Describe the solution you'd like
Changing all occurrences of img to img-lazy. Changing import of the Newsletter component to dynamic import.

[FEATURE] Qty-Selector Positioning

Is your feature request related to a problem? Please describe.
Incorrect position/display of qty-selector.

Describe the solution you'd like
Adjusting .scss-files for correct display.

[BUG] Contribution: Watcher doesn't recognize changed in /modules in dev mode

Describe the bug
With a contributor setup as described in https://docs.hubblecommerce.io/pwa/contribution/contributionpwa.html, there are no changes applied when editing files in /modules.

Versions
hubble: 1.1.6
nuxt: 2.14.6
node: 10.20.1

Steps to Reproduce

  1. Setup hubble via contribution guide
  2. Start app in dev mode
  3. Change file in /modules/hubble-frontend-pwa/@hubblecommerce/core
  4. Nothing happened to file watcher

Expected behavior
The watcher should recognize a file change and copy the changed file to .hubble so nuxt can show the change in the frontend.

Current behavior
On file change, nothing happens.

[BUG] Multiple product-pictures caused by screen resizing

Describe the bug
Decreasing and increasing browser window/screensize cause display of multiple product-pictures.

Versions
hubble: 1.1.7
nuxt: 2.14.6
node: 10.20.0

Steps to Reproduce

  1. Go to Product-Details (Click on any product)
  2. Decrease browser window or change screensize via device tool to e.g. tablet-size (at least width: 1023px).
  3. Increase screensize back to desktop-size.
  4. See error in the form of two product-pictures.

Expected behavior
No change of the amount of pictures shown.

Current behavior
Each repetition of changing the screensize creates another product-picture.

[FEATURE] Refactoring Component ProductListingCard.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display content via v-text instead of v-html, should not contain commented out code and should use nuxt-link for internal navigation.

Describe the solution you'd like
Replace v-html with v-text, delete commented out code and replace anchor tag with nuxt-link.

[FEATURE] Refactoring OrderDetail.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should display content via v-text, use selfclosing tags and import components dynamically.

Describe the solution you'd like
Added v-text and dynamic import.

[FEATURE] Refactored ViewProduct.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should import components dynamically.
Furthermore Add-to-wishlist-button was not shown in desktop-view.

Describe the solution you'd like
Added dynamic imports of components.

Added wishlist-button to desktop-view and adjusted position.

[FEATURE] Refactored ProductDetailHeaderActions.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display content via v-text, use selfclosing tags if possible. Should have it's own .scss-file.

Describe the solution you'd like
Added v-text and selfclosing tags and created .scss-file.

[BUG] Search not functioning

Describe the bug
Search without any result and failing API request.

API Type
sw

Versions
hubble: 1.1.7
nuxt: 2.14.6
node: 10.20.0

Steps to Reproduce

  1. Click on Search input field
  2. type in any product title
  3. See not result after search
  4. press enter
  5. see error

Expected behavior
Searching, finding and listing products.

Current behavior
Finding no results and causing API request fail.

[BUG] Remove unused theme folder

Describe the bug
Unused theme folder can be removed.

Versions
hubble: 1.1.7
nuxt: v2.14.6
node: 12.16.3

Steps to Reproduce
The folder can be found inside the module folder: /hubble/core/assets/scss/hubbleplus

[FEATURE] Refactoring Component CartLayer.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should import components dynamically, use selfclosing tags and display content with v-text.

Describe the solution you'd like
Added v-text and selfclosing tags and imported component dynamically.

[FEATURE] Refactoring Component ProductDetailPrice.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, Vue components should display text via v-text.
Furthermore it should have it's own scss-file.

Describe the solution you'd like
Added v-text.
Refactoring scss-files: view-product.scss, product-detail-price.scss.

Additional context
Deleted deprecated version of vue-component.
Deleted unnecessary class.

[FEATURE] Refactoring Component PriceSlider.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display content via v-text instead of v-html.

Describe the solution you'd like
Replace v-html with v-text.

[FEATURE] Refactoring Component ViewCategory.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display content via v-text instead of v-html and should not contain commented out code. The 2 divs in the div with the class category-description are redundant since both would display the same content in any case.

Describe the solution you'd like
Replace v-html with v-text and delete commented out code.
Shortening the code by deleting the 2 divs under the div with the class category-description and moving their v-text into the parent.

[FEATURE] Refactoring ProductListingCard.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should use self closing tags when possible. since 2 img tags with v-if, that are displayed when the isSlider prop is either true or false, are essentially the same, except the first tag got an css class, it can be refactored to only one img tag with only the class being conditionally added when isSlider is false.

Describe the solution you'd like
Change tags to be self closing, delete the second img tag, remove v-if from the first tag and make the class change in dependecy with the isSlider prop.

[FEATURE] Refactoring Component ProductDetailAddToCart.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, components should import other components dynamically and should use self closing tags when possible.

Describe the solution you'd like
Change Loader component to import dynamically and change span tag to self closing.

[BUG] Horizontal content jumps when opening off canvas elements

Describe the bug
When opening an Off-Canvas-Element the main scrollbar disappears and the content resizes in width, so the content appears to jump.

Versions
hubble: 1.1.6
nuxt: 2.14.5
node: 12.12.0

Steps to Reproduce

  1. Open OffCanvas (e.g.: Wishlist)
  2. Content gets resized

Expected behavior
The width of the content should stay the same so that the content does not appear to resize for the user.

[FEATURE] Refactoring Component ViewProduct.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should display context via v-text instead of v-html and should not contain commented out code.

Describe the solution you'd like
Replace v-html with v-text in html tags and delete commented out code.

[FEATURE] Refactoring Component CustomerAccountInformation.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should use selfclosing tags and display content via v-text.

Describe the solution you'd like
Added v-text and selfclosing tags.

[FEATURE] Refactoring SelectableLimit.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should use self closing tags when possible and should have its own scss file with the same name.

Describe the solution you'd like
Change tags to be self closing, create scss file with the same name.

[FEATURE] Refactoring Component WishlistItemsList.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a Vue component should use img-lazy-tag instead of img and v-text instead of v-html.
Furthermore it shouldn't contain commented out code.

Describe the solution you'd like
Changed v-html to v-text and img to img-lazy and adjusted alt-info/title-info.

[BUG] Value of key 'Previous' is not a string or function

Describe the bug
When accessing sites with pagination the terminal shows warnings that 'Previous' is not a string or function. The reason for that is the change to a translatable string in an previous issue and not changing 'Previous' to 'Previous Page' when refactoring the component.

[FEATURE] Refactoring Component ProductListingFilter.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, components should not contain commented out code and should import components dynamically.

Describe the solution you'd like
Delete commented out code and import components dynamically.

[FEATURE] Edited add-to-cart-button (sm | md )

Is your feature request related to a problem? Please describe.
Button Icon (shopping-bag) jumps up and out of center after clicking.

Describe the solution you'd like
Hiding loader-ellipse in small button.

[FEATURE] Refactoring Component TheFooterDesktop.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, the site has to have a valid HTML Markup including alt tags on images, since 2 images have an alt-tag but not the alt-info tag that is required by the img-lazy component, the div that contains the image gets the alt tag and not the image itself.

Describe the solution you'd like
Changing of the alt tags to alt-info and add the title-info tag.

[FEATURE] Refactoring SelectableOrder.vue

Is your feature request related to a problem? Please describe.
As declared in the hubble coding guidelines, a component should use self closing tags when possible and should have its own scss file with the same name.

Describe the solution you'd like
Change tags to be self closing, create scss file with the same name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.