• Stars
    star
    152
  • Rank 243,434 (Top 5 %)
  • Language Liquid
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A modern template for developing Shopify-themes using Vuejs

shopify-modern

This proof-of-concept shows a method of creating an ecommerce experience for Shopify by using modern front-end development tools and techniques, while still leveraging some of the beneficial features of the Shopify system & infrastructure.

Overview

Shopify's Wordpress-like structure is as much fun to work with as Wordpress – "let's develop like it's 1999!" :-) These days we know that it can be done better.

This project shows a working, hybrid Shopify-template which still runs on the Shopify infrastructure. However, because of a very clear separation between Shopify and the front-end, we can develop the web experience using modern tools.

While this project template is NOT full-SPA, it helps by giving a roadmap for those wanting to transform an existing Shopify template into one which is both modern and full-SPA. The project already has features to help with that goal in mind.

Benefits

Here are some of the benefits of this framework / concept:

Framework

  • Modern development with Vuejs
  • Internationalization (i18n)
  • Special tags & filters (like in Shopify Liquid)
  • Clear separation between Shopify Liquid & Vuejs code & markup
  • Rendered page components determined using Vuejs routes paired with Shopify URLs.
  • Avoid any potential issues with Shopify 64k page-limit
  • Search-bot friendly (soon)

Shopify

  • Hosting / Scalability handled by Shopify
  • SEO friendly
  • Server-Side-Augmentation (ie, lightweight Server Side Rendering)
  • Settings / Config files still useful

Future

  • Clear path to full-SPA
  • Ability to do local development !

How it works

One of the main benefits is that the framework can serialize many of the Shopify data-objects. This serialized data can either be embedded in the primary HTML page or loaded later using HTTP requests. The corresponding front-end Vuejs objects can initialize themselves with either method.

Though this doesn't qualify as full server-side rendering, having embedded data speeds up the initial page draw since the information will not need to be loaded by subsequent AJAX requests.

In the future, there will be more control over which data is embedded and which is lazy-loaded after the first page render.

Steps to Template-Freedom

If you want to start integrating the ideas into an existing project, your main goal is to move almost all of the site information out of the Liquid templates. Two important steps for that would be:

  1. insert app anchors into HTML

    Depending on how far along you are with the transition, you can use one or many anchors which will be under control of your framework (eg, Vuejs).

    	<!-- a single anchor for the entire app (like in this project) -->
    	<div id="vueapp"></div>
    
    	<!-- one of many anchors for individual components -->
    	<div id="calendar-widget"></div>
    	<div id="product-picker-widget"></div>
    
  2. integrate a normal build process

    use Webpack or Gulp to generate a typical build file, eg dist/build.js.

    Do NOT include any of your front-end code in the Fluid templates. All of it should be inside of build.js, and that file being sourced from theme.liquid.

Setup

(rough notes!)

  1. Install Shopify Themekit
  2. Rename config-sample.yml to config.yml. Add your password, theme id, store name.
  3. Run webpack to re-pack code upon changes
  4. Run themekit to upload webpack output to Shopify

Libraries

This project uses these libraries:

Inspiration

Inspiration for this project came from the following:

References

More Repositories

1

DMC-Corona-Library

Development library for Corona SDK
Lua
82
star
2

Ghost-vs-Monsters---OOP

Re-write of Corona SDK mobile app Ghost vs Monsters into object-oriented architecture
Lua
34
star
3

DMC-Corona-UI

Advanced UI widgets for Corona SDK (w/ Styles & Themes)
Lua
30
star
4

lua-error

Robust error handling for Lua (try(), catch(), and finally() .... finally!)
Lua
20
star
5

lua-objects

Advanced object oriented module for Lua (OOP)
Lua
15
star
6

lua-corovel

Asynchronous, event-loop development environment for Lua (think nodejs, luvit, etc)
Lua
12
star
7

dmc-websockets

Corona SDK client library for the WebSocket protocol (RFC6455)
Lua
11
star
8

tos-tps-ttm-watchlist-indicator

TPS TTM watchlist indicator for ThinkOrSwim
TypeScript
9
star
9

dmc-dragdrop

A Drag and Drop module for the Corona SDK
Lua
5
star
10

lua-bytearray

powerful ByteArray class for Lua
Lua
5
star
11

Corona-App-Templates

sample structures for small, medium and large Corona SDK projects
Lua
4
star
12

dmc-multitouch

Add Move, Pinch, and Rotate to your Corona SDK display objects
Lua
3
star
13

lua-events-mixin

Add event capability to your Lua objects (e.g., event dispatch/listeners)
Lua
3
star
14

dmc-states-mixin

Front for lua-states-mixin for use with Corona SDK
Lua
2
star
15

lua-patch

adds various patches to Lua to enable cooler functionality (a la Python)
Lua
2
star
16

dmc-objects

Advanced object oriented module for Corona SDK OOP
Lua
2
star
17

lua-states-mixin

Add State Machine capability to your Lua objects
Lua
2
star
18

dmc-gestures

Gesture Recognizer library for the Corona SDK
Lua
2
star
19

DMC-Lua-Library

a collection of awesome Lua modules
Lua
2
star
20

dmc-autostore

Awesome automatic JSON-based storage for the Corona SDK
Lua
2
star
21

dmc-sockets

Asynchronous TCP sockets for Corona SDK
Lua
2
star
22

dmc-promise

Lua
1
star
23

dmc-touchmanager

Enables true multitouch capability in the Corona SDK
Lua
1
star
24

dmc-files

Lua
1
star
25

dmc-facebook

A kinder, gentler Facebook connector for the Corona SDK
Lua
1
star
26

lua-utils

Misc utility functions for Lua
Lua
1
star
27

lua-files

Read and write different file-types using Lua
Lua
1
star
28

dmc-kozy

Lua
1
star
29

dmc-wamp

Corona SDK client library for the WAMP protocol (http://wamp.ws/)
Lua
1
star
30

lua-promise

Promise design-pattern in Lua
Lua
1
star
31

lua-megaphone

in-app, global communication object
Lua
1
star
32

puppet-gitbox

Gitbox Puppet Module for Boxen
Ruby
1
star
33

dmc-lifecycle-mixin

Mixin to add light-weight Component lifecycle functionality to Corona SDK
Lua
1
star
34

dmc-performance

App performance testing tool for the Corona SDK
Lua
1
star
35

dmc-utils

Lua
1
star
36

dmc-trajectory

Easy parabolic trajectory motion for the Corona SDK
Lua
1
star
37

dmc-kolor

Fancy color handling for Corona SDK
Lua
1
star
38

dmc-corona-boot

boot file for modules in dmc-corona-library
Lua
1
star
39

dmc-netstream

a module for Corona SDK designed to receive streaming data over HTTP
Lua
1
star
40

feathers-gui

A FireStore-like interface for Feathersjs servers
TypeScript
1
star
41

dmc-navigator

Advance scene coordination for the Corona SDK
Lua
1
star
42

lua-e4x

Lightweight E4X XML processing in Lua
Lua
1
star
43

lua-class

Lua
1
star